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

## Class Evaluator

- java.lang.Object
- - org.apache.ignite.ml.selection.scoring.evaluator.Evaluator

-     public class Evaluator
      extends Object

  Evaluator that computes metrics from predictions and ground truth values.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Evaluator()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <K,V> EvaluationResult` | `evaluate(DatasetBuilder<K,V> datasetBuilder, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor, Metric... metrics)` Evaluate model.
    `static <K,V> double` | `evaluate(IgniteCache<K,V> dataCache, IgniteBiPredicate<K,V> filter, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor, Metric metric)` Computes the given metric on the given cache.
    `static <K,V> double` | `evaluate(IgniteCache<K,V> dataCache, IgniteBiPredicate<K,V> filter, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor, MetricName metric)` Computes the given metric on the given cache.
    `static <K,V> double` | `evaluate(IgniteCache<K,V> dataCache, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor, Metric metric)` Computes the given metric on the given cache.
    `static <K,V> double` | `evaluate(IgniteCache<K,V> dataCache, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor, MetricName metric)` Computes the given metric on the given cache.
    `static <K,V> double` | `evaluate(Map<K,V> dataCache, IgniteBiPredicate<K,V> filter, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor, Metric metric)` Computes the given metric on the given cache.
    `static <K,V> double` | `evaluate(Map<K,V> dataCache, IgniteBiPredicate<K,V> filter, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor, MetricName metric)` Computes the given metric on the given cache.
    `static <K,V> double` | `evaluate(Map<K,V> dataCache, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor, Metric metric)` Computes the given metric on the given cache.
    `static <K,V> double` | `evaluate(Map<K,V> dataCache, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor, MetricName metric)` Computes the given metric on the given cache.
    `static <K,V> EvaluationResult` | `evaluateBinaryClassification(IgniteCache<K,V> dataCache, IgniteBiPredicate<K,V> filter, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor)` Evaluate binary classifier by default metrics (see package classification).
    `static <K,V> EvaluationResult` | `evaluateBinaryClassification(IgniteCache<K,V> dataCache, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor)` Evaluate binary classifier by default metrics (see package classification).
    `static <K,V> EvaluationResult` | `evaluateBinaryClassification(Map<K,V> dataCache, IgniteBiPredicate<K,V> filter, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor)` Evaluate binary classifier by default metrics (see package classification).
    `static <K,V> EvaluationResult` | `evaluateBinaryClassification(Map<K,V> dataCache, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor)` Evaluate binary classifier by default metrics (see package classification).
    `static <K,V> EvaluationResult` | `evaluateRegression(IgniteCache<K,V> dataCache, IgniteBiPredicate<K,V> filter, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor)` Evaluate regression by default metrics (see package regression).
    `static <K,V> EvaluationResult` | `evaluateRegression(IgniteCache<K,V> dataCache, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor)` Evaluate regression by default metrics (see package regression).
    `static <K,V> EvaluationResult` | `evaluateRegression(Map<K,V> dataCache, IgniteBiPredicate<K,V> filter, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor)` Evaluate regression by default metrics (see package regression).
    `static <K,V> EvaluationResult` | `evaluateRegression(Map<K,V> dataCache, IgniteModel<Vector,Double> mdl, Preprocessor<K,V> preprocessor)` Evaluate regression by default metrics (see package regression).

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

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

- - ### Constructor Detail

    - #### Evaluator

          public Evaluator()

  - ### Method Detail

    - #### evaluate

          public static <K,V> double evaluate(IgniteCache<K,V> dataCache,
                                              IgniteModel<Vector,Double> mdl,
                                              Preprocessor<K,V> preprocessor,
                                              Metric metric)

      Computes the given metric on the given cache.
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
        `metric` - The metric.
      Returns:
        Computed metric.

    - #### evaluate

          public static <K,V> double evaluate(IgniteCache<K,V> dataCache,
                                              IgniteBiPredicate<K,V> filter,
                                              IgniteModel<Vector,Double> mdl,
                                              Preprocessor<K,V> preprocessor,
                                              Metric metric)

      Computes the given metric on the given cache.
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `filter` - The filter.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
        `metric` - The metric.
      Returns:
        Computed metric.

    - #### evaluate

          public static <K,V> double evaluate(IgniteCache<K,V> dataCache,
                                              IgniteModel<Vector,Double> mdl,
                                              Preprocessor<K,V> preprocessor,
                                              MetricName metric)

      Computes the given metric on the given cache.
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
        `metric` - The metric name.
      Returns:
        Computed metric.

    - #### evaluate

          public static <K,V> double evaluate(IgniteCache<K,V> dataCache,
                                              IgniteBiPredicate<K,V> filter,
                                              IgniteModel<Vector,Double> mdl,
                                              Preprocessor<K,V> preprocessor,
                                              MetricName metric)

      Computes the given metric on the given cache.
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `filter` - The given filter.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
        `metric` - The metric name.
      Returns:
        Computed metric.

    - #### evaluate

          public static <K,V> double evaluate(Map<K,V> dataCache,
                                              IgniteModel<Vector,Double> mdl,
                                              Preprocessor<K,V> preprocessor,
                                              Metric metric)

      Computes the given metric on the given cache.
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given local data.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
        `metric` - The binary classification metric.
      Returns:
        Computed metric.

    - #### evaluate

          public static <K,V> double evaluate(Map<K,V> dataCache,
                                              IgniteBiPredicate<K,V> filter,
                                              IgniteModel<Vector,Double> mdl,
                                              Preprocessor<K,V> preprocessor,
                                              Metric metric)

      Computes the given metric on the given cache.
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `filter` - The given filter.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
        `metric` - The binary classification metric.
      Returns:
        Computed metric.

    - #### evaluate

          public static <K,V> double evaluate(Map<K,V> dataCache,
                                              IgniteModel<Vector,Double> mdl,
                                              Preprocessor<K,V> preprocessor,
                                              MetricName metric)

      Computes the given metric on the given cache.
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given local data.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
        `metric` - The binary classification metric.
      Returns:
        Computed metric.

    - #### evaluate

          public static <K,V> double evaluate(Map<K,V> dataCache,
                                              IgniteBiPredicate<K,V> filter,
                                              IgniteModel<Vector,Double> mdl,
                                              Preprocessor<K,V> preprocessor,
                                              MetricName metric)

      Computes the given metric on the given cache.
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `filter` - The given filter.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
        `metric` - The binary classification metric.
      Returns:
        Computed metric.

    - #### evaluateBinaryClassification

          public static <K,V> EvaluationResult evaluateBinaryClassification(IgniteCache<K,V> dataCache,
                                                                            IgniteModel<Vector,Double> mdl,
                                                                            Preprocessor<K,V> preprocessor)

      Evaluate binary classifier by default metrics (see package classification). TODO: IGNITE-12156
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
      Returns:
        Computed metrics.

    - #### evaluateBinaryClassification

          public static <K,V> EvaluationResult evaluateBinaryClassification(IgniteCache<K,V> dataCache,
                                                                            IgniteBiPredicate<K,V> filter,
                                                                            IgniteModel<Vector,Double> mdl,
                                                                            Preprocessor<K,V> preprocessor)

      Evaluate binary classifier by default metrics (see package classification).
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `filter` - The filter.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
      Returns:
        Computed metrics.

    - #### evaluateBinaryClassification

          public static <K,V> EvaluationResult evaluateBinaryClassification(Map<K,V> dataCache,
                                                                            IgniteModel<Vector,Double> mdl,
                                                                            Preprocessor<K,V> preprocessor)

      Evaluate binary classifier by default metrics (see package classification).
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
      Returns:
        Computed metrics.

    - #### evaluateBinaryClassification

          public static <K,V> EvaluationResult evaluateBinaryClassification(Map<K,V> dataCache,
                                                                            IgniteBiPredicate<K,V> filter,
                                                                            IgniteModel<Vector,Double> mdl,
                                                                            Preprocessor<K,V> preprocessor)

      Evaluate binary classifier by default metrics (see package classification).
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `filter` - The given filter.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
      Returns:
        Computed metrics.

    - #### evaluateRegression

          public static <K,V> EvaluationResult evaluateRegression(IgniteCache<K,V> dataCache,
                                                                  IgniteModel<Vector,Double> mdl,
                                                                  Preprocessor<K,V> preprocessor)

      Evaluate regression by default metrics (see package regression).
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
      Returns:
        Computed metrics.

    - #### evaluateRegression

          public static <K,V> EvaluationResult evaluateRegression(IgniteCache<K,V> dataCache,
                                                                  IgniteBiPredicate<K,V> filter,
                                                                  IgniteModel<Vector,Double> mdl,
                                                                  Preprocessor<K,V> preprocessor)

      Evaluate regression by default metrics (see package regression).
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `filter` - The given filter.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
      Returns:
        Computed metrics.

    - #### evaluateRegression

          public static <K,V> EvaluationResult evaluateRegression(Map<K,V> dataCache,
                                                                  IgniteModel<Vector,Double> mdl,
                                                                  Preprocessor<K,V> preprocessor)

      Evaluate regression by default metrics (see package regression).
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
      Returns:
        Computed metrics.

    - #### evaluateRegression

          public static <K,V> EvaluationResult evaluateRegression(Map<K,V> dataCache,
                                                                  IgniteBiPredicate<K,V> filter,
                                                                  IgniteModel<Vector,Double> mdl,
                                                                  Preprocessor<K,V> preprocessor)

      Evaluate regression by default metrics (see package regression).
      Type Parameters:
        `K` - The type of cache entry key.
        `V` - The type of cache entry value.
      Parameters:
        `dataCache` - The given cache.
        `filter` - The given filter.
        `mdl` - The model.
        `preprocessor` - The preprocessor.
      Returns:
        Computed metrics.

    - #### evaluate

          public static <K,V> EvaluationResult evaluate(DatasetBuilder<K,V> datasetBuilder,
                                                        IgniteModel<Vector,Double> mdl,
                                                        Preprocessor<K,V> preprocessor,
                                                        Metric... metrics)

      Evaluate model.
      Type Parameters:
        `K` - Type of key.
        `V` - Type of value.
      Parameters:
        `mdl` - The model.
        `datasetBuilder` - Dataset builder.
        `preprocessor` - Preprocessor.
        `metrics` - Metrics to compute.
      Returns:
        Evaluation result.

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021