@Deprecated public class Data extends Object implements Cloneable
Constructor and Description |
---|
Data(Dataset dataset)
Deprecated.
|
Data(Dataset dataset,
List<Instance> instances)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Data |
bagging(Random rng)
Deprecated.
if data has N cases, sample N cases at random -but with replacement.
|
Data |
bagging(Random rng,
boolean[] sampled)
Deprecated.
if data has N cases, sample N cases at random -but with replacement.
|
Data |
clone()
Deprecated.
|
boolean |
contains(Instance v)
Deprecated.
|
void |
countLabels(int[] counts)
Deprecated.
Counts the number of occurrences of each label value
This method can be used when the criterion variable is the categorical attribute. |
boolean |
equals(Object obj)
Deprecated.
|
double[] |
extractLabels()
Deprecated.
extract the labels of all instances
|
Instance |
get(int index)
Deprecated.
Returns the element at the specified position
|
Dataset |
getDataset()
Deprecated.
|
int |
hashCode()
Deprecated.
|
boolean |
identicalLabel()
Deprecated.
checks if all the vectors have identical label values
|
boolean |
isEmpty()
Deprecated.
|
boolean |
isIdentical()
Deprecated.
checks if all the vectors have identical attribute values
|
int |
majorityLabel(Random rng)
Deprecated.
finds the majority label, breaking ties randomly
This method can be used when the criterion variable is the categorical attribute. |
Data |
rsplit(Random rng,
int subsize)
Deprecated.
Splits the data in two, returns one part, and this gets the rest of the data.
|
int |
size()
Deprecated.
|
Data |
subset(Condition condition)
Deprecated.
|
double[] |
values(int attr)
Deprecated.
finds all distinct values of a given attribute
|
public Data(Dataset dataset)
public int size()
public boolean isEmpty()
public boolean contains(Instance v)
v
- element whose presence in this list if to be searchedpublic Instance get(int index)
index
- index of element to returnIndexOutOfBoundsException
- if the index is out of rangepublic Data subset(Condition condition)
public Data bagging(Random rng)
public Data bagging(Random rng, boolean[] sampled)
sampled
- indicating which instance has been sampledpublic Data rsplit(Random rng, int subsize)
public boolean isIdentical()
public boolean identicalLabel()
public double[] values(int attr)
public double[] extractLabels()
public int majorityLabel(Random rng)
public void countLabels(int[] counts)
counts
- will contain the results, supposed to be initialized at 0public Dataset getDataset()
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.