public abstract class WeightVector extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
WeightVector.BinaryLibLinearVector |
static class |
WeightVector.BinarySparseVector |
static class |
WeightVector.BinaryVector |
static class |
WeightVector.MultipleLibLinearVector |
static class |
WeightVector.MultipleSparseVector |
static class |
WeightVector.MultipleVector |
| Modifier and Type | Field and Description |
|---|---|
protected double |
bias |
protected int |
classes |
protected int |
features |
| Constructor and Description |
|---|
WeightVector(double bias,
int features,
int classes) |
| Modifier and Type | Method and Description |
|---|---|
abstract double[] |
computeAllProbs(Collection<Integer> ints) |
abstract short |
computeBestClass(Collection<Integer> ints) |
static WeightVector |
parseWeights(BufferedReader in,
int features,
int classes,
double bias,
boolean sparse)
Used to parse the weights and return the proper weightvector
|
protected double bias
protected int features
protected int classes
public static WeightVector parseWeights(BufferedReader in, int features, int classes, double bias, boolean sparse) throws IOException
in - the inputstream, assuming header is parsed and weights are nextfeatures - number of featuresclasses - number of classesw - the w-string (last line before the weights), should be either 'w' or 'w-sparse'IOExceptionpublic abstract double[] computeAllProbs(Collection<Integer> ints)
public abstract short computeBestClass(Collection<Integer> ints)
Copyright © 2016. All rights reserved.