public class SimpleDataSet extends DataSet<SimpleDataSet>
Modifier and Type | Field and Description |
---|---|
protected List<DataPoint> |
dataPoints |
categories, columnVecCache, numericalVariableNames, numNumerVals
Constructor and Description |
---|
SimpleDataSet(CategoricalData[] categories,
int numNumericalValues) |
SimpleDataSet(List<DataPoint> dataPoints) |
Modifier and Type | Method and Description |
---|---|
void |
add(DataPoint dp)
Adds a new datapoint to this set.
|
ClassificationDataSet |
asClassificationDataSet(int index)
Converts this dataset into one meant for classification problems.
|
RegressionDataSet |
asRegressionDataSet(int index)
Converts this dataset into one meant for regression problems.
|
List<DataPoint> |
getBackingList() |
DataPoint |
getDataPoint(int i)
Returns the i'th data point in this set.
|
int |
getSampleSize()
Returns the number of data points in this data set
|
protected SimpleDataSet |
getSubset(List<Integer> indicies)
Creates a new dataset that is a subset of this dataset.
|
SimpleDataSet |
getTwiceShallowClone()
Returns a new version of this data set that is of the same type, and
contains a different listing pointing to shallow data point copies.
|
void |
setDataPoint(int i,
DataPoint dp)
Replaces an already existing data point with the one given.
|
SimpleDataSet |
shallowClone()
Returns a new version of this data set that is of the same type, and
contains a different list pointing to the same data points.
|
applyTransform, applyTransform, applyTransform, applyTransform, countMissingValues, cvSet, cvSet, getCategories, getCategoryName, getColumnMeanVariance, getDataMatrix, getDataMatrixView, getDataPointIterator, getDataPoints, getDataVectors, getDataWeights, getMissingDropped, getNumCategoricalVars, getNumericColumn, getNumericColumns, getNumericColumns, getNumericName, getNumFeatures, getNumNumericalVars, getOnlineColumnStats, getOnlineDenseStats, getSparsityStats, randomSplit, randomSplit, replaceNumericFeatures, setNumericName
public SimpleDataSet(CategoricalData[] categories, int numNumericalValues)
public DataPoint getDataPoint(int i)
DataSet
getDataPoint
in class DataSet<SimpleDataSet>
i
- the i'th data point in this setpublic void setDataPoint(int i, DataPoint dp)
DataSet
setDataPoint
in class DataSet<SimpleDataSet>
i
- the i'th dataPoint to set.dp
- the data point to set at the specified indexpublic void add(DataPoint dp)
dp
- the datapoint to addpublic int getSampleSize()
DataSet
getSampleSize
in class DataSet<SimpleDataSet>
protected SimpleDataSet getSubset(List<Integer> indicies)
DataSet
getSubset
in class DataSet<SimpleDataSet>
indicies
- the indices of data points to insert into the new
dataset, and will be placed in the order listed.public ClassificationDataSet asClassificationDataSet(int index)
index
- the classification variable index, should be in the range
[0, DataSet.getNumCategoricalVars()
)public RegressionDataSet asRegressionDataSet(int index)
index
- the regression variable index, should be in the range
[0, DataSet.getNumNumericalVars()
)public List<DataPoint> getBackingList()
public SimpleDataSet shallowClone()
DataSet
shallowClone
in class DataSet<SimpleDataSet>
public SimpleDataSet getTwiceShallowClone()
DataSet
getTwiceShallowClone
in class DataSet<SimpleDataSet>
Copyright © 2017. All rights reserved.