Class DataObject
- java.lang.Object
-
- moa.clusterers.outliers.AnyOut.util.DataObject
-
public class DataObject extends Object
This object encapsulates a data point.- Author:
- Fernando Sanchez Villaamil
-
-
Constructor Summary
Constructors Constructor Description DataObject(int idCounter, Instance inst)
Standard constructor forDataObject
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getClassLabel()
Return the label for theDataObject
.double[]
getFeatures()
Returns the features (label attribute excluded).int
getId()
Returns the id for theDataObject
.Instance
getInstance()
Return theInstance
of theDataObject
.int
getNrOfDimensions()
Returns the number of features (label attribute excluded).boolean
isOutiler()
void
setId(int id)
void
setOutiler(boolean val)
String
toString()
Returns aString
representation of the point.
-
-
-
Constructor Detail
-
DataObject
public DataObject(int idCounter, Instance inst)
Standard constructor forDataObject
.- Parameters:
idCounter
- The id for theDataObject
.inst
-
-
-
Method Detail
-
getFeatures
public double[] getFeatures()
Returns the features (label attribute excluded).- Returns:
- An array
double[]
with the features.
-
getId
public int getId()
Returns the id for theDataObject
.- Returns:
- An
int
with the id of theDataObject
.
-
setId
public void setId(int id)
-
getClassLabel
public int getClassLabel()
Return the label for theDataObject
.- Returns:
- An
int
which codes the label.
-
getInstance
public Instance getInstance()
Return theInstance
of theDataObject
.- Returns:
- An
Instance
.
-
getNrOfDimensions
public int getNrOfDimensions()
Returns the number of features (label attribute excluded).- Returns:
- The number of features in the point.
-
toString
public String toString()
Returns aString
representation of the point. The features are written comma separated between parenthesis and the label id is written after the closing parenthesis surrounded by squared brackets.
-
setOutiler
public void setOutiler(boolean val)
-
isOutiler
public boolean isOutiler()
-
-