MCPcopy Index your code
hub / github.com/EdwardRaff/JSAT / SimpleWeightVectorModel

Interface SimpleWeightVectorModel

JSAT/src/jsat/SimpleWeightVectorModel.java:14–52  ·  view source on GitHub ↗

This 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. @author Edward Raff

Source from the content-addressed store, hash-verified

12 * @author Edward Raff
13 */
14public interface SimpleWeightVectorModel
15{
16 /**
17 * Returns the raw weight vector associated with the given class index. If
18 * the given class is an implicit zero vector, a {@link ConstantVector}
19 * object may be returned. <br>
20 * Do not alter the returned weight vector, as it will change the model's
21 * values. <br>
22 * <br>
23 * If a regression problem, only {@code index = 0} should be used
24 *
25 * @param index the class index to get the weight vector for
26 * @return the weight vector used for the specified class
27 */
28 public Vec getRawWeight(int index);
29
30 /**
31 * Returns the bias term used with the weight vector for the given class
32 * index. If the model does not support or was not trained with bias
33 * weights, {@code 0} will be returned.<br>
34 * <br>
35 * If a regression problem, only {@code index = 0} should be used
36 *
37 * @param index the class index to get the weight vector for
38 * @return the bias term for the specified class
39 */
40 public double getBias(int index);
41
42 /**
43 * Returns the number of weight vectors that can be returned. For binary
44 * classification problems the value may be 1 if only a single weight
45 * vector's sign is used to determine the class. For multi-class problems,
46 * the weight vector count includes the implicit zero vector (if one is
47 * being used).
48 * @return the number of weight vectors for which
49 * {@link #getRawWeight(int) } can be called.
50 */
51 public int numWeightsVecs();
52}

Callers 5

trainCMethod · 0.95
doWarmStartIfNotNullMethod · 0.95
trainCMethod · 0.95
doWarmStartIfNotNullMethod · 0.95
doWarmStartIfNotNullMethod · 0.95

Implementers 15

DumbWeightHolderJSAT/test/jsat/classifiers/linear/NewG
SPAJSAT/src/jsat/classifiers/linear/SPA.j
SDCAJSAT/src/jsat/classifiers/linear/SDCA.
LinearSGDJSAT/src/jsat/classifiers/linear/Linea
LinearBatchJSAT/src/jsat/classifiers/linear/Linea
StochasticMultinomialLogisticRegressionJSAT/src/jsat/classifiers/linear/Stoch
NewGLMNETJSAT/src/jsat/classifiers/linear/NewGL
BBRJSAT/src/jsat/classifiers/linear/BBR.j
ROMMAJSAT/src/jsat/classifiers/linear/ROMMA
StochasticSTLinearL1JSAT/src/jsat/classifiers/linear/Stoch
LogisticRegressionDCDJSAT/src/jsat/classifiers/linear/Logis
SCDJSAT/src/jsat/classifiers/linear/SCD.j

Calls

no outgoing calls

Tested by

no test coverage detected