org.apache.ignite.ml.selection.scoring.evaluator.context

## Class BinaryClassificationEvaluationContext<L extends Serializable>

- java.lang.Object
- - org.apache.ignite.ml.selection.scoring.evaluator.context.BinaryClassificationEvaluationContext<L>

- All Implemented Interfaces:
    Serializable, EvaluationContext<L,BinaryClassificationEvaluationContext<L>>

      public class BinaryClassificationEvaluationContext<L extends Serializable>
      extends Object
      implements EvaluationContext<L,BinaryClassificationEvaluationContext<L>>

  This context tries to define positive and negative labels for estimation of binary classifier.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BinaryClassificationEvaluationContext()` Creates an instance of BinaryClassificationEvaluationContext.
    `BinaryClassificationEvaluationContext(L firstClsLbl, L secondClsLbl)` Creates an instance of BinaryClassificationEvaluationContext.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `aggregate(LabeledVector<L> vector)` Aggregates statistic from vector of sample.
    `L` | `getFirstClsLbl()` Returns first class label.
    `L` | `getSecondClsLbl()` Returns second class label.
    `BinaryClassificationEvaluationContext<L>` | `mergeWith(BinaryClassificationEvaluationContext<L> other)` Merges statistics of this and other context.

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

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

    - ### Methods inherited from interface org.apache.ignite.ml.selection.scoring.evaluator.context.EvaluationContext

      `empty, needToCompute`

- - ### Constructor Detail

    - #### BinaryClassificationEvaluationContext

          public BinaryClassificationEvaluationContext()

      Creates an instance of BinaryClassificationEvaluationContext.

    - #### BinaryClassificationEvaluationContext

          public BinaryClassificationEvaluationContext(L firstClsLbl,
                                                       L secondClsLbl)

      Creates an instance of BinaryClassificationEvaluationContext.
      Parameters:
        `firstClsLbl` - First class lbl.
        `secondClsLbl` - Second class lbl.

  - ### Method Detail

    - #### aggregate

          public void aggregate(LabeledVector<L> vector)

      Aggregates statistic from vector of sample.
      Specified by:
        `aggregate` in interface `EvaluationContext<L extends Serializable,BinaryClassificationEvaluationContext<L extends Serializable>>`
      Parameters:
        `vector` - Vector.

    - #### mergeWith

          public BinaryClassificationEvaluationContext<L> mergeWith(BinaryClassificationEvaluationContext<L> other)

      Merges statistics of this and other context.
      Specified by:
        `mergeWith` in interface `EvaluationContext<L extends Serializable,BinaryClassificationEvaluationContext<L extends Serializable>>`
      Parameters:
        `other` - Other context.
      Returns:
        New merged context.

    - #### getFirstClsLbl

          public L getFirstClsLbl()

      Returns first class label.
      Returns:
        First class label.

    - #### getSecondClsLbl

          public L getSecondClsLbl()

      Returns second class label.
      Returns:
        Second class label.

${current.year} Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023