E - type of data set elementspublic interface DataSet<E> extends Iterable<E>
| Modifier and Type | Interface and Description |
|---|---|
static class |
DataSet.Column |
static class |
DataSet.Type |
| Modifier and Type | Method and Description |
|---|---|
default DataSet<E> |
add(E item)
Adds an element to this data set.
|
default DataSet<E> |
addAll(DataSet<E> dataSet)
|
default void |
clear()
Clear items of the
DataSet |
default E |
get(int idx)
Get an item from the
DataSet |
String[] |
getColumnNames() |
List<E> |
getItems()
Get a collection of the items in the
DataSet |
String[] |
getTargetNames()
Get labels of target/output columns.
|
default boolean |
isEmpty()
Determines whether the
DataSet is empty or not. |
default Iterator<E> |
iterator() |
void |
setColumnNames(String[] columnNames) |
default void |
shuffle()
Shuffles the data set.
|
default void |
shuffle(Random rnd)
Shuffles the data set using the specified random number generator.
|
default int |
size()
Get the number of elements in
DataSet |
DataSet<E>[] |
split(double... parts)
Split data set into parts of specified sizes
|
default DataSet<E>[] |
split(double part)
Split data set in two parts, one with size of specified percentage, and other with rest of the data set
|
default DataSet<E>[] |
split(int numParts)
Split dataset into specified number of equally sized parts.
|
default DataSet<E>[] |
split(int numParts,
Random rnd)
Split dataset into specified number of equally sized parts, using specified random generator.
|
default DataSet<E>[] |
split(Random rnd,
double... parts)
Split data set into parts of specified sizes using specified random generator
|
forEach, spliteratorList<E> getItems()
DataSetCollectiondefault DataSet<E> add(E item)
item - data set item to add to the data setDataSetdefault boolean isEmpty()
DataSet is empty or not.true if the DataSet is empty, otherwise falsedefault DataSet<E>[] split(int numParts)
numParts - number of parts to be returnedDataSet in an array.default DataSet<E>[] split(int numParts, Random rnd)
numParts - number of parts/subsets to returnrnd - random number generatorDataSet in an array.default DataSet<E>[] split(double part)
default DataSet<E>[] split(Random rnd, double... parts)
default void shuffle()
default void shuffle(Random rnd)
rnd - random generatorString[] getTargetNames()
void setColumnNames(String[] columnNames)
String[] getColumnNames()
Copyright © 2020. All rights reserved.