public class Instance<OUTCOME_TYPE> extends Object implements Serializable
Constructor and Description |
---|
Instance()
Create a new ClassifierInstance with an empty set of features and a null label.
|
Instance(Collection<Feature> features) |
Instance(OUTCOME_TYPE outcome) |
Instance(OUTCOME_TYPE outcome,
Collection<Feature> features) |
Modifier and Type | Method and Description |
---|---|
void |
add(Feature feature)
Add a feature to the instance.
|
void |
addAll(Collection<Feature> feats)
Add a collection of features to the instance.
|
boolean |
equals(Object object) |
List<Feature> |
getFeatures()
Get the list of features for this instance.
|
OUTCOME_TYPE |
getOutcome()
Get the current label for the instance.
|
int |
hashCode() |
void |
setOutcome(OUTCOME_TYPE outcome)
Set the current label for the instance.
|
String |
toString() |
public Instance()
public Instance(Collection<Feature> features)
public Instance(OUTCOME_TYPE outcome)
public Instance(OUTCOME_TYPE outcome, Collection<Feature> features)
public void add(Feature feature)
feature
- The feature to add.public void addAll(Collection<Feature> feats)
feats
- The features to add.public List<Feature> getFeatures()
public OUTCOME_TYPE getOutcome()
public void setOutcome(OUTCOME_TYPE outcome)
outcome
- The new label value.Copyright © 2014. All rights reserved.