Package deepnetts.data
Class TabularDataSet<E extends MLDataItem>
- java.lang.Object
-
- javax.visrec.ml.data.BasicDataSet<E>
-
- deepnetts.data.TabularDataSet<E>
-
- Type Parameters:
E
- Type of elements in this data set.
- All Implemented Interfaces:
java.lang.Iterable<E>
,javax.visrec.ml.data.DataSet<E>
- Direct Known Subclasses:
ImageSet
public class TabularDataSet<E extends MLDataItem> extends javax.visrec.ml.data.BasicDataSet<E>
Basic data set used for training neural networks in deep netts.Note: implements DataSet from visrec api, and specify data set elements. Extends BasicDataSet from visrec.ml layer
- Author:
- Zoran Sevarac
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TabularDataSet.Item
Represents a basic data set item (single row) with input tensor and target vector in a data set.
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]
columnNames
-
Constructor Summary
Constructors Modifier Constructor Description protected
TabularDataSet()
TabularDataSet(int numInputs, int numOutputs)
Create a new instance of BasicDataSet with specified size of input and output.
-
Method Summary
Modifier and Type Method Description java.lang.String[]
getColumnNames()
int
getNumInputs()
int
getNumOutputs()
void
setColumnNames(java.lang.String[] columnNames)
void
shuffle()
Shuffles the data set items using the default random generator.void
shuffle(int seed)
Shuffles data set items using java random generator initializes with specified seedjavax.visrec.ml.data.DataSet[]
split(double... parts)
Splits data set into several parts specified by the input parameter partSizes.javax.visrec.ml.data.DataSet[]
split(int parts)
Split data set into specified number of part of equal sizes.-
Methods inherited from class javax.visrec.ml.data.BasicDataSet
getColumns, getItems, getTargetColumnsNames, setAsTargetColumns, setAsTargetColumns, setColumns
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
columnNames
protected java.lang.String[] columnNames
-
-
Constructor Detail
-
TabularDataSet
protected TabularDataSet()
-
TabularDataSet
public TabularDataSet(int numInputs, int numOutputs)
Create a new instance of BasicDataSet with specified size of input and output.- Parameters:
numInputs
- number of input featuresnumOutputs
- number of output features
-
-
Method Detail
-
getNumInputs
public int getNumInputs()
-
getNumOutputs
public int getNumOutputs()
-
split
public javax.visrec.ml.data.DataSet[] split(int parts)
Split data set into specified number of part of equal sizes. Utility method used during cross-validation Note: this could be default method- Parameters:
parts
-- Returns:
-
split
public javax.visrec.ml.data.DataSet[] split(double... parts)
Splits data set into several parts specified by the input parameter partSizes. Values of partSizes parameter represent the sizes of data set parts that will be returned. Part sizes are decimal values that represent percents, cannot be negative or zero, and their sum must be 1- Specified by:
split
in interfacejavax.visrec.ml.data.DataSet<E extends MLDataItem>
- Overrides:
split
in classjavax.visrec.ml.data.BasicDataSet<E extends MLDataItem>
- Parameters:
parts
- sizes of the parts in percents- Returns:
- parts of the data set of specified size
-
shuffle
public void shuffle()
Shuffles the data set items using the default random generator. Default rng can be initialized independently
-
shuffle
public void shuffle(int seed)
Shuffles data set items using java random generator initializes with specified seed- Parameters:
seed
- a seed number to initialize random generator- See Also:
Random
-
getColumnNames
public java.lang.String[] getColumnNames()
- Overrides:
getColumnNames
in classjavax.visrec.ml.data.BasicDataSet<E extends MLDataItem>
-
setColumnNames
public void setColumnNames(java.lang.String[] columnNames)
- Overrides:
setColumnNames
in classjavax.visrec.ml.data.BasicDataSet<E extends MLDataItem>
-
-