public class AugmentableFeatureVector extends FeatureVector implements Serializable
hasInfinite, indices, values| Constructor and Description |
|---|
AugmentableFeatureVector(Alphabet dict) |
AugmentableFeatureVector(Alphabet dict,
boolean binary) |
AugmentableFeatureVector(Alphabet dict,
double[] values) |
AugmentableFeatureVector(Alphabet dict,
double[] values,
int capacity) |
AugmentableFeatureVector(Alphabet dict,
int[] indices,
double[] values,
int capacity) |
AugmentableFeatureVector(Alphabet dict,
int[] indices,
double[] values,
int capacity,
boolean copy) |
AugmentableFeatureVector(Alphabet dict,
int[] indices,
double[] values,
int capacity,
boolean copy,
boolean checkIndicesSorted) |
AugmentableFeatureVector(Alphabet dict,
int[] indices,
double[] values,
int capacity,
int size,
boolean copy,
boolean checkIndicesSorted,
boolean removeDuplicates)
To make a binary vector, pass null for "values"
|
AugmentableFeatureVector(Alphabet dict,
int capacity,
boolean binary) |
AugmentableFeatureVector(Alphabet dict,
PropertyList pl,
boolean binary) |
AugmentableFeatureVector(Alphabet dict,
PropertyList pl,
boolean binary,
boolean growAlphabet) |
AugmentableFeatureVector(FeatureSequence fs,
boolean binary) |
AugmentableFeatureVector(FeatureVector fv) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(FeatureVector fv)
Adds all indices that are present in some other feature vector
with value 1.0.
|
void |
add(FeatureVector fv,
String prefix)
Adds all features from some other feature vector with weight 1.0.
|
void |
add(FeatureVector fv,
String prefix,
boolean binary)
Adds all features from some other feature vector with weight 1.0.
|
void |
add(int index) |
void |
add(int index,
double value) |
void |
add(Object key,
double value) |
void |
addTo(double[] accumulator) |
void |
addTo(double[] accumulator,
double scale) |
ConstantMatrix |
cloneMatrix()
CLONING
|
ConstantMatrix |
cloneMatrixZeroed() |
double |
dotProduct(AugmentableFeatureVector v) |
double |
dotProduct(DenseVector v) |
double |
dotProduct(SparseVector v) |
int |
indexAtLocation(int location) |
double |
infinityNorm() |
int |
location(int index) |
int |
numLocations() |
double |
oneNorm() |
void |
plusEquals(AugmentableFeatureVector v,
double factor) |
void |
plusEquals(SparseVector v) |
void |
plusEquals(SparseVector v,
double factor) |
void |
print() |
protected void |
removeDuplicates(int numDuplicates) |
void |
setAll(double v)
Sets every present index in the vector to v.
|
void |
setValue(int index,
double value)
Sets the value at the given index.
|
void |
setValueAtLocation(int location,
double value)
Sets the value at the given location.
|
int |
singleSize() |
protected void |
sortIndices() |
FeatureVector |
toFeatureVector() |
SparseVector |
toSparseVector() |
double |
twoNorm() |
double |
value(int index) |
double |
valueAtLocation(int location) |
contains, getAlphabet, getObjectIndices, location, toSimpFile, toString, toString, valueabsNorm, arrayCopyFrom, arrayCopyFrom, arrayCopyInto, dotProduct, dotProduct, extendedDotProduct, extendedDotProduct, getDimensions, getIndices, getNumDimensions, getValues, incrementValue, isBinary, isNaN, makeBinary, makeNonBinary, map, plusEqualsSparse, plusEqualsSparse, singleIndex, singleToIndices, singleValue, timesEquals, timesEqualsSparse, timesEqualsSparse, value, vectorAddpublic AugmentableFeatureVector(Alphabet dict, int[] indices, double[] values, int capacity, int size, boolean copy, boolean checkIndicesSorted, boolean removeDuplicates)
public AugmentableFeatureVector(Alphabet dict, int[] indices, double[] values, int capacity, boolean copy, boolean checkIndicesSorted)
public AugmentableFeatureVector(Alphabet dict, int[] indices, double[] values, int capacity, boolean copy)
public AugmentableFeatureVector(Alphabet dict, int[] indices, double[] values, int capacity)
public AugmentableFeatureVector(Alphabet dict, double[] values, int capacity)
public AugmentableFeatureVector(Alphabet dict, double[] values)
public AugmentableFeatureVector(Alphabet dict, int capacity, boolean binary)
public AugmentableFeatureVector(Alphabet dict, boolean binary)
public AugmentableFeatureVector(Alphabet dict)
public AugmentableFeatureVector(FeatureVector fv)
public AugmentableFeatureVector(FeatureSequence fs, boolean binary)
public AugmentableFeatureVector(Alphabet dict, PropertyList pl, boolean binary, boolean growAlphabet)
public AugmentableFeatureVector(Alphabet dict, PropertyList pl, boolean binary)
public void add(FeatureVector fv)
public void add(FeatureVector fv, String prefix)
fv - A feature vector to add from. Its feature names must be Strings.prefix - String to add when generating new feature namespublic void add(FeatureVector fv, String prefix, boolean binary)
fv - A feature vector to add from. Its feature names must be Strings.prefix - String to add when generating new feature namesbinary - true if fv is binarypublic void add(int index,
double value)
public void add(Object key, double value)
public void add(int index)
public final int numLocations()
numLocations in interface ConstantMatrixnumLocations in class SparseVectorpublic final int location(int index)
location in interface ConstantMatrixlocation in class SparseVectorpublic final double valueAtLocation(int location)
valueAtLocation in interface ConstantMatrixvalueAtLocation in class SparseVectorpublic final int indexAtLocation(int location)
indexAtLocation in interface ConstantMatrixindexAtLocation in class SparseVectorpublic final double value(int index)
value in interface Vectorvalue in class SparseVectorpublic final void addTo(double[] accumulator,
double scale)
addTo in class SparseVectorpublic final void addTo(double[] accumulator)
addTo in class SparseVectorpublic final void setValue(int index,
double value)
SparseVectorsetValue in class SparseVectorpublic final void setValueAtLocation(int location,
double value)
SparseVectorsetValueAtLocation in class SparseVectorpublic ConstantMatrix cloneMatrix()
SparseVectorcloneMatrix in interface ConstantMatrixcloneMatrix in class FeatureVectorpublic ConstantMatrix cloneMatrixZeroed()
cloneMatrixZeroed in class FeatureVectorpublic int singleSize()
singleSize in interface ConstantMatrixsingleSize in class SparseVectorpublic SparseVector toSparseVector()
public FeatureVector toFeatureVector()
public double dotProduct(DenseVector v)
dotProduct in class SparseVectorpublic final double dotProduct(SparseVector v)
dotProduct in class SparseVectorpublic final double dotProduct(AugmentableFeatureVector v)
public void plusEquals(AugmentableFeatureVector v, double factor)
public void plusEquals(SparseVector v, double factor)
public void plusEquals(SparseVector v)
public void setAll(double v)
SparseVectorsetAll in class SparseVectorpublic double oneNorm()
oneNorm in interface ConstantMatrixoneNorm in class SparseVectorpublic double twoNorm()
twoNorm in interface ConstantMatrixtwoNorm in class SparseVectorpublic double infinityNorm()
infinityNorm in interface ConstantMatrixinfinityNorm in class SparseVectorpublic void print()
print in interface ConstantMatrixprint in class SparseVectorprotected void sortIndices()
sortIndices in class SparseVectorprotected void removeDuplicates(int numDuplicates)
removeDuplicates in class SparseVectorCopyright © 2019 JULIE Lab, Germany. All rights reserved.