|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectse.lth.cs.nlp.nlputils.ml.FeatureDeclaration
public class FeatureDeclaration
Declaration of a feature set.
| Constructor Summary | |
|---|---|
FeatureDeclaration()
Creates a new, empty, feature set. |
|
FeatureDeclaration(String[] names)
Creates a new feature set from the given feature names. |
|
| Method Summary | |
|---|---|
void |
addFeature(String name)
Adds a new feature to the feature set. |
void |
addFeature(String name,
int n)
Adds a new feature to the feature set, and assigns it the given number. |
int |
getFeatureIndex(String name)
Returns the feature number of the given feature. |
int |
size()
Returns the number of active features in this feature set. |
FeatureDeclaration |
subset(Collection<String> used)
Returns a FeatureDeclaration that is a subset of this declaration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FeatureDeclaration()
public FeatureDeclaration(String[] names)
names - the feature names.| Method Detail |
|---|
public void addFeature(String name)
name - the name of the new feature.
public void addFeature(String name,
int n)
name - the name of the new feature.n - the number to assign it.public int getFeatureIndex(String name)
name - the feature name.
public int size()
public FeatureDeclaration subset(Collection<String> used)
used - the names of the features that should be included in the
subset.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||