public class LiblinearHelper extends Object
Constructor and Description |
---|
LiblinearHelper() |
Modifier and Type | Method and Description |
---|---|
static de.bwaldvogel.liblinear.Feature[] |
convert(FeatureVector feature,
double bias)
Convert a
FeatureVector to an array of Feature s. |
static double[] |
convertDense(FeatureVector feature,
double bias)
Convert a
FeatureVector to an array of doubles using
FeatureVector.asDoubleVector() . |
public LiblinearHelper()
public static de.bwaldvogel.liblinear.Feature[] convert(FeatureVector feature, double bias)
FeatureVector
to an array of Feature
s.feature
- input FeatureVector
bias
- any bias term to add. if <=0 then no term is added; otherwise
an extra element will be added to the end of the vector set to
this value.Feature
arraypublic static double[] convertDense(FeatureVector feature, double bias)
FeatureVector
to an array of doubles using
FeatureVector.asDoubleVector()
.feature
- the featurebias
- any bias term to add. if <=0 then no term is added; otherwise
an extra element will be added to the end of the vector set to
this value.