Package com.tibco.patterns.learn.api.project

## Class DatasetResult

- java.lang.Object
- - com.tibco.patterns.learn.api.project.DatasetResult

-     public final class DatasetResult
      extends java.lang.Object

  Stores model training results for one dataset. Objects of DatasetResult are returned from Learn API. No need to construct them in Learn UI code. It is a read-only view of COErrorRate.IterationResult that provides access to specific statistics used in Learn UI. It could potentially provide a view to a result class of another convergence observer. Client code may construct DatasetResult independently from IterationResult. It may also obtain a copy of the IterationResult object to get access to the advanced statistics that do not have getters in DatasetResult.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DatasetResult​(COErrorRate.IterationResult coResult)` | Copies information from given IterationResult to this object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `double` | `errorRate()` |
    `double` | `falseNegRate()` |
    `double` | `falsePosRate()` |
    `COErrorRate.IterationResult` | `getIterationResult()` | May be used to get access to statistics not directly exposed by DatasetResult methods.
    `boolean` | `isConverged()` | Use this method with validation dataset result.
    `boolean` | `isPerfectResult()` |
    `double` | `meanConf()` |
    `double` | `noPredictionRate()` |
    `java.lang.String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### DatasetResult

          public DatasetResult​(COErrorRate.IterationResult coResult)

      Copies information from given IterationResult to this object. Can be used to avoid creating DatasetResultType when dataset results are not stored in XML.
      Parameters:
        `coResult` - - result from model training or evaluation. Not null.

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

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

    - #### getIterationResult

          public COErrorRate.IterationResult getIterationResult()

      May be used to get access to statistics not directly exposed by DatasetResult methods. Modifying the returned object has no effect on this DatasetResult object.
      Returns:
        a copy of the IterationResult object stored in DatasetResult.

    - #### errorRate

          public double errorRate()

      Returns:
        model error rate

    - #### falsePosRate

          public double falsePosRate()

      Returns:
        false positive rate

    - #### falseNegRate

          public double falseNegRate()

      Returns:
        false negative rate

    - #### noPredictionRate

          public double noPredictionRate()

      Returns:
        the rate of examples that can't be predicted by this model

    - #### meanConf

          public double meanConf()

      Returns:
        mean prediction confidence (for all examples)

    - #### isConverged

          public boolean isConverged()

      Use this method with validation dataset result.
      Returns:
        whether the error rate is below the COErrorRate's default target error rate.

    - #### isPerfectResult

          public boolean isPerfectResult()

      Returns:
        true if all examples in the dataset were predicted correctly.