public class Features extends Object
Features class contains static utility classes for
manipulating features.| Modifier and Type | Method and Description |
|---|---|
static Vector |
toVector(Map<String,? extends Number> featureVector,
SymbolTable table,
int numDimensions,
boolean addIntercept)
Convert the specified feature vector into a sparse float vector using
the specified symbol table to encode features as integers.
|
static Vector |
toVectorAddSymbols(Map<String,? extends Number> featureVector,
SymbolTable table,
int numDimensions,
boolean addIntercept)
Convert the specified feature vector into a sparse float vector
using the specified symbol table to encode features as
integers, adding features to the symbol table if necessary.
|
public static Vector toVectorAddSymbols(Map<String,? extends Number> featureVector, SymbolTable table, int numDimensions, boolean addIntercept)
true, an intercept value of 1.0 will be added as the
value of dimension 0.table - Symbol table for encoding features as integers.featureVector - Feature vector to convert to sparse float vector.numDimensions - Number of dimensions for the vector.addIntercept - Flag indicating whether or not to add an intercept
value of 1.0 at position 0.public static Vector toVector(Map<String,? extends Number> featureVector, SymbolTable table, int numDimensions, boolean addIntercept)
true, an intercept value of
1.0 will be added as the value of dimension 0.table - Symbol table for encoding features as integers.featureVector - Feature vector to convert to sparse float vector.numDimensions - Number of dimensions for the vector.addIntercept - Flag indicating whether or not to add an intercept
value of 1.0 at position 0.Copyright © 2016 Alias-i, Inc.. All rights reserved.