Package com.yahoo.labs.samoa.instances
Class SparseInstance
- java.lang.Object
-
- com.yahoo.labs.samoa.instances.InstanceImpl
-
- com.yahoo.labs.samoa.instances.SparseInstance
-
- All Implemented Interfaces:
Instance
,MultiLabelInstance
,Serializable
- Direct Known Subclasses:
FilteredSparseInstance
public class SparseInstance extends InstanceImpl
The Class SparseInstance.- Author:
- abifet
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.yahoo.labs.samoa.instances.InstanceImpl
instanceData, instanceHeader, weight
-
-
Constructor Summary
Constructors Constructor Description SparseInstance(double numberAttributes)
Instantiates a new sparse instance.SparseInstance(double d, double[] res)
Instantiates a new sparse instance.SparseInstance(double weight, double[] attributeValues, int[] indexValues, int numberAttributes)
Instantiates a new sparse instance.SparseInstance(InstanceImpl inst)
Instantiates a new sparse instance.
-
Method Summary
-
Methods inherited from class com.yahoo.labs.samoa.instances.InstanceImpl
addSparseValues, attribute, classAttribute, classIndex, classIsMissing, classValue, classValue, copy, dataset, deleteAttributeAt, index, indexOfAttribute, inputAttribute, insertAttributeAt, isMissing, isMissing, isMissingSparse, numAttributes, numberOutputTargets, numClasses, numInputAttributes, numOutputAttributes, numValues, outputAttribute, setClassValue, setClassValue, setDataset, setMissing, setMissing, setValue, setValue, setWeight, stringValue, toDoubleArray, toString, value, value, valueInputAttribute, valueOutputAttribute, valueSparse, weight
-
-
-
-
Constructor Detail
-
SparseInstance
public SparseInstance(double d, double[] res)
Instantiates a new sparse instance.- Parameters:
d
- the dres
- the res
-
SparseInstance
public SparseInstance(InstanceImpl inst)
Instantiates a new sparse instance.- Parameters:
inst
- the inst
-
SparseInstance
public SparseInstance(double numberAttributes)
Instantiates a new sparse instance.- Parameters:
numberAttributes
- the number attributes
-
SparseInstance
public SparseInstance(double weight, double[] attributeValues, int[] indexValues, int numberAttributes)
Instantiates a new sparse instance.- Parameters:
weight
- the weightattributeValues
- the attribute valuesindexValues
- the index valuesnumberAttributes
- the number attributes
-
-