MCPcopy Create free account
hub / github.com/WinVector/Logistic / DModel

Interface DModel

src/com/winvector/opt/def/DModel.java:5–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import java.io.Serializable;
4
5public interface DModel<T extends ExampleRow> extends Serializable {
6 int dim();
7 int noutcomes();
8
9 /**
10 *
11 * @param x model coefficients (must have length dim())
12 * @param ei data row
13 * @param r where to write prediction results (must have length noutcomes())
14 */
15 void predict(final double[] x, final Datum ei, final double[] r);
16
17 /**
18 *
19 * @param x model coefficients (must have length dim())
20 * @param ei data row
21 * @return predictions per category
22 */
23 double[] predict(final double[] x, final Datum ei);
24}

Callers 22

testGradAndHessianMethod · 0.65
testTrainPlusAdpatMethod · 0.65
testVectorEncodingBMethod · 0.65
translateToMethod · 0.65
trainMethod · 0.65
scoreMethod · 0.65
testTrainPlusAdpatMethod · 0.65
testVectorEncodingBMethod · 0.65
BObserverMethod · 0.65

Implementers 1

SigmoidLossMultinomialsrc/com/winvector/logistic/SigmoidLoss

Calls

no outgoing calls

Tested by

no test coverage detected