public interface FeatureVector extends Cloneable, Serializable, ReadWriteable
Modifier and Type | Method and Description |
---|---|
DoubleFV |
asDoubleFV()
Convert the FV to a DoubleFV representation
|
double[] |
asDoubleVector()
Convert the FV to a 1-dimensional double array representation
|
double |
getAsDouble(int i)
Get an element of the feature as a double value
|
Object |
getVector()
Get the underlying data array.
|
int |
length()
Get the length of this vector
|
FeatureVector |
newInstance()
Construct a new instance of this featurevector.
|
DoubleFV |
normaliseFV()
Normalise the FV to unit length
|
DoubleFV |
normaliseFV(double p)
Lp Norm of the FV.
|
DoubleFV |
normaliseFV(double[] min,
double[] max)
Element-wise normalisation to 0..1 using separated expected minimum and
maximum values for each element of the underlying feature vector.
|
DoubleFV |
normaliseFV(double min,
double max)
Min-Max normalisation of the FV.
|
void |
setFromDouble(int i,
double v)
Set an element of the feature from a double value
|
asciiHeader, readASCII
binaryHeader, readBinary
asciiHeader, writeASCII
binaryHeader, writeBinary
int length()
DoubleFV normaliseFV(double[] min, double[] max)
min
- an array containing the minimum expected valuesmax
- an array containing the maximum expected valuesDoubleFV normaliseFV(double min, double max)
min
- the minimum expected valuemax
- the maximum expected valueDoubleFV normaliseFV()
DoubleFV asDoubleFV()
double[] asDoubleVector()
DoubleFV normaliseFV(double p)
p
- the norm to computedouble getAsDouble(int i)
i
- the element indexvoid setFromDouble(int i, double v)
i
- the element indexv
- the valueFeatureVector newInstance()