Class SandboxMLCache
- java.lang.Object
-
- org.apache.ignite.examples.ml.util.SandboxMLCache
-
public class SandboxMLCache extends java.lang.ObjectCommon utility code used in some ML examples to set up test cache.
-
-
Constructor Summary
Constructors Constructor Description SandboxMLCache(Ignite ignite)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IgniteCache<java.lang.Integer,double[]>fillCacheWith(double[][] data)Fills cache with data and returns it.IgniteCache<java.lang.Integer,Vector>fillCacheWith(MLSandboxDatasets dataset)Fills cache with data and returns it.IgniteCache<java.lang.Integer,java.lang.Object[]>fillObjectCacheWithCategoricalData(MLSandboxDatasets dataset)Fills cache with data and returns it.IgniteCache<java.lang.Integer,java.lang.Object[]>fillObjectCacheWithDoubleLabels(MLSandboxDatasets dataset)Fills cache with data and returns it.java.util.List<java.lang.String>loadDataset(MLSandboxDatasets dataset)Loads dataset as a list of rows.
-
-
-
Constructor Detail
-
SandboxMLCache
public SandboxMLCache(Ignite ignite)
-
-
Method Detail
-
fillCacheWith
public IgniteCache<java.lang.Integer,double[]> fillCacheWith(double[][] data)
Fills cache with data and returns it.- Parameters:
data- Data to fill the cache with.- Returns:
- Filled Ignite Cache.
-
loadDataset
public java.util.List<java.lang.String> loadDataset(MLSandboxDatasets dataset) throws java.io.IOException
Loads dataset as a list of rows.- Parameters:
dataset- The chosen dataset.- Returns:
- List of rows.
- Throws:
java.io.IOException- If file not found.
-
fillCacheWith
public IgniteCache<java.lang.Integer,Vector> fillCacheWith(MLSandboxDatasets dataset) throws java.io.FileNotFoundException
Fills cache with data and returns it.- Parameters:
dataset- The chosen dataset.- Returns:
- Filled Ignite Cache.
- Throws:
java.io.FileNotFoundException- If file not found.
-
fillObjectCacheWithDoubleLabels
public IgniteCache<java.lang.Integer,java.lang.Object[]> fillObjectCacheWithDoubleLabels(MLSandboxDatasets dataset) throws java.io.FileNotFoundException
Fills cache with data and returns it.- Parameters:
dataset- The chosen dataset.- Returns:
- Filled Ignite Cache.
- Throws:
java.io.FileNotFoundException- If file not found.
-
fillObjectCacheWithCategoricalData
public IgniteCache<java.lang.Integer,java.lang.Object[]> fillObjectCacheWithCategoricalData(MLSandboxDatasets dataset) throws java.io.FileNotFoundException
Fills cache with data and returns it.- Parameters:
dataset- The chosen dataset.- Returns:
- Filled Ignite Cache.
- Throws:
java.io.FileNotFoundException- If file not found.
-
-