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

## Interface EvaluationContext<L,Self extends EvaluationContext<L,? super Self>>

- Type Parameters:
    `L` - Type of label.
    `Self` - Type of evaluation context.
  All Superinterfaces:
    Serializable
  All Known Implementing Classes:
    BinaryClassificationEvaluationContext, EmptyContext

      public interface EvaluationContext<L,Self extends EvaluationContext<L,? super Self>>
      extends Serializable

  Classes with this interface are responsible for preparatory computations before model evaluation. For example if we don't know what is positive and negative label we can define it in automatically way using such evaluation context.

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `aggregate(LabeledVector<L> vector)` Aggregates statistic from vector of sample.
    `static <L extends Serializable> EmptyContext<L>` | `empty()` Returns default empty context.
    `Self` | `mergeWith(Self other)` Merges statistics of this and other context.
    `default boolean` | `needToCompute()` Returns true if this contexts should be evaluated through map-reduce.

- - ### Method Detail

    - #### aggregate

          void aggregate(LabeledVector<L> vector)

      Aggregates statistic from vector of sample.
      Parameters:
        `vector` - Vector.

    - #### mergeWith

          Self mergeWith(Self other)

      Merges statistics of this and other context.
      Parameters:
        `other` - Other context.
      Returns:
        New merged context.

    - #### needToCompute

          default boolean needToCompute()

      Returns true if this contexts should be evaluated through map-reduce.
      Returns:
        True if this contexts should be evaluated through map-reduce.

    - #### empty

          static <L extends Serializable> EmptyContext<L> empty()

      Returns default empty context.
      Returns:
        Empty context.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020