jsat
Interface SimpleWeightVectorModel
-
- All Known Subinterfaces:
- SingleWeightVectorModel
- All Known Implementing Classes:
- ALMA2, AROW, BBR, DCD, DCDs, LinearBatch, LinearL1SCD, LinearSGD, LogisticRegressionDCD, MultipleLinearRegression, NewGLMNET, NHERD, PassiveAggressive, Pegasos, Perceptron, ROMMA, SCD, SCW, SDCA, SMIDAS, SPA, STGD, StochasticMultinomialLogisticRegression, StochasticRidgeRegression, StochasticSTLinearL1
public interface SimpleWeightVectorModelThis interface is for multi-class classification problems where there may be K or K-1 weight vectors for K classes. For regression problems it is treated as K = 1 and there should be only one weight vector.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description doublegetBias(int index)Returns the bias term used with the weight vector for the given class index.VecgetRawWeight(int index)Returns the raw weight vector associated with the given class index.intnumWeightsVecs()Returns the number of weight vectors that can be returned.
-
-
-
Method Detail
-
getRawWeight
Vec getRawWeight(int index)
Returns the raw weight vector associated with the given class index. If the given class is an implicit zero vector, aConstantVectorobject may be returned.
Do not alter the returned weight vector, as it will change the model's values.
If a regression problem, onlyindex = 0should be used- Parameters:
index- the class index to get the weight vector for- Returns:
- the weight vector used for the specified class
-
getBias
double getBias(int index)
Returns the bias term used with the weight vector for the given class index. If the model does not support or was not trained with bias weights,0will be returned.
If a regression problem, onlyindex = 0should be used- Parameters:
index- the class index to get the weight vector for- Returns:
- the bias term for the specified class
-
numWeightsVecs
int numWeightsVecs()
Returns the number of weight vectors that can be returned. For binary classification problems the value may be 1 if only a single weight vector's sign is used to determine the class. For multi-class problems, the weight vector count includes the implicit zero vector (if one is being used).- Returns:
- the number of weight vectors for which
getRawWeight(int)can be called.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG