Package com.tibco.patterns.learn.rlink

## Class ConfStats

- java.lang.Object
- - com.tibco.patterns.learn.rlink.ConfStats

- All Implemented Interfaces:
    `Confidence`

      public class ConfStats
      extends java.lang.Object
      implements Confidence

  Confidence measure based on submodel statistics. Immutable class.

  For older Learn models this is the only measure available. It is based on the number of true and false training pairs seen for the subset with each label. It does not take into account the particular scores involved. The confidence is the same for all feature scores in the same subset.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ConfStats()` | Create an instance with default values.
    `ConfStats​(int halfCount, double balanceWeight)` | Create an instance with specific parameter values.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getConfType()` | Return the confidence type.
    `double` | `getDblArg​(int idx)` | Return a double parameter.
    `int` | `getIntArg​(int idx)` | Return an integer parameter.
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ConfStats

          public ConfStats()

      Create an instance with default values.

    - #### ConfStats

          public ConfStats​(int halfCount,
                           double balanceWeight)

      Create an instance with specific parameter values.
      Parameters:
        `halfCount` - The number of training pairs needed to reach a confidence measure of 0.5. The default value is 5000. Note this is a count of the total number of pairs in the entire training session. Not the number of pairs in a single training iteration. Use -1 to let it default.
        `balanceWeight` - The proportion of the final measure attributed to the balance of yes and no labels seen. The default value is 0.3. Use -1.0 to let it default.

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getConfType

          public int getConfType()

      Return the confidence type.
      Specified by:
        `getConfType` in interface `Confidence`
      Returns:
        the confidence type for the Stats measure.

    - #### getIntArg

          public int getIntArg​(int idx)

      Return an integer parameter. The first parameter is the halfCount.
      Specified by:
        `getIntArg` in interface `Confidence`
      Parameters:
        `idx` - the integer parameter index, zero based.
      Returns:
        The half_count value for index 0, -1 otherwise.

    - #### getDblArg

          public double getDblArg​(int idx)

      Return a double parameter. The first parameter is the balance weight.
      Specified by:
        `getDblArg` in interface `Confidence`
      Parameters:
        `idx` - the double parameter index, zero based.
      Returns:
        balance weight for index 0, -1.0 for all others.