org.apache.ignite.ml.selection.scoring.cursor

## Class CacheBasedLabelPairCursor<L,K,V>

- java.lang.Object
- - org.apache.ignite.ml.selection.scoring.cursor.CacheBasedLabelPairCursor<L,K,V>

- Type Parameters:
    `L` - Type of a label (truth or prediction).
    `K` - Type of a key in `upstream` data.
    `V` - Type of a value in `upstream` data.
  All Implemented Interfaces:
    AutoCloseable, Iterable<LabelPair<L>>, LabelPairCursor<L>

      public class CacheBasedLabelPairCursor<L,K,V>
      extends Object
      implements LabelPairCursor<L>

  Truth with prediction cursor based on a data stored in Ignite cache.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CacheBasedLabelPairCursor(IgniteCache<K,V> upstreamCache, IgniteBiPredicate<K,V> filter, Preprocessor<K,V> preprocessor, IgniteModel<Vector,L> mdl)` Constructs a new instance of cache based truth with prediction cursor.
    `CacheBasedLabelPairCursor(IgniteCache<K,V> upstreamCache, Preprocessor<K,V> preprocessor, IgniteModel<Vector,L> mdl)` Constructs a new instance of cache based truth with prediction cursor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `@NotNull Iterator<LabelPair<L>>` | `iterator()`

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

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

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### CacheBasedLabelPairCursor

          public CacheBasedLabelPairCursor(IgniteCache<K,V> upstreamCache,
                                           IgniteBiPredicate<K,V> filter,
                                           Preprocessor<K,V> preprocessor,
                                           IgniteModel<Vector,L> mdl)

      Constructs a new instance of cache based truth with prediction cursor.
      Parameters:
        `upstreamCache` - Ignite cache with `upstream` data.
        `filter` - Filter for `upstream` data.
        `preprocessor` - Preprocessor.
        `mdl` - Model for inference.

    - #### CacheBasedLabelPairCursor

          public CacheBasedLabelPairCursor(IgniteCache<K,V> upstreamCache,
                                           Preprocessor<K,V> preprocessor,
                                           IgniteModel<Vector,L> mdl)

      Constructs a new instance of cache based truth with prediction cursor.
      Parameters:
        `upstreamCache` - Ignite cache with `upstream` data.
        `preprocessor` - Preprocessor.
        `mdl` - Model for inference.

  - ### Method Detail

    - #### close

          public void close()

      Specified by:
        `close` in interface `AutoCloseable`

    - #### iterator

          @NotNull
          public @NotNull Iterator<LabelPair<L>> iterator()

      Specified by:
        `iterator` in interface `Iterable<LabelPair<L>>`

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