org.statcato.utils
Class NumDataset
- java.lang.Object
-
- org.statcato.utils.NumDataset
-
public class NumDataset extends java.lang.ObjectA class that represents a dataset of double values. The dataset consists of vectors of double values corresponding to distinct category labels.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor and Description NumDataset()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(java.util.Vector<java.lang.Double> data, java.lang.String label)Adds the given data vector with the given label to the dataset.voidaddDataVectorWithByVarLabels(java.util.Vector<java.lang.Double> data, java.util.Vector byLabels)Add the data values with the corresponding labels.java.util.Vector<java.lang.Double>get(java.lang.String label)Returns the data vector corresponding to the given label.java.util.Vector<java.lang.String>getLabels()Returns all the labels as a vector of string values.java.util.Vector<java.util.Vector<java.lang.Double>>getValues()Returns all the data values as vectors of double-value vector.intsize()Returns the size of the dataset (number of categories).java.lang.StringtoString()Returns the labels of the sets of data values.
-
-
-
Method Detail
-
add
public void add(java.util.Vector<java.lang.Double> data, java.lang.String label)Adds the given data vector with the given label to the dataset.- Parameters:
data- vector of double valueslabel- String data label
-
addDataVectorWithByVarLabels
public void addDataVectorWithByVarLabels(java.util.Vector<java.lang.Double> data, java.util.Vector byLabels)Add the data values with the corresponding labels.- Parameters:
data- vector of double valuesbyLabels- vector of labels corresponding to the double values
-
get
public java.util.Vector<java.lang.Double> get(java.lang.String label)
Returns the data vector corresponding to the given label.- Parameters:
label- String data label- Returns:
- vector of double values corresponding to the given label
-
size
public int size()
Returns the size of the dataset (number of categories).- Returns:
- size of the dataset (integer)
-
getValues
public java.util.Vector<java.util.Vector<java.lang.Double>> getValues()
Returns all the data values as vectors of double-value vector.- Returns:
- vectors of double-value vector
-
getLabels
public java.util.Vector<java.lang.String> getLabels()
Returns all the labels as a vector of string values.- Returns:
- vector of string values
-
toString
public java.lang.String toString()
Returns the labels of the sets of data values.- Overrides:
toStringin classjava.lang.Object- Returns:
- vector of string values
-
-
DMelt 3.0 © DataMelt by jWork.ORG