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

Interface LinearContribution

src/com/winvector/opt/def/LinearContribution.java:12–26  ·  view source on GitHub ↗

Interface for fast tightly coupled summation across fixed x,wantGrad,wantHessian varying ExampleRow into an accumulating VEval. Designed usage: summing a score across a data set (i.e. plug into com.winvector.opt.impl.DataFn ) @author johnmount

Source from the content-addressed store, hash-verified

10 *
11 */
12public interface LinearContribution<T extends ExampleRow> extends Serializable {
13 int dim();
14 int noutcomes();
15
16 /**
17 *
18 * @param x model coefficients (must have length dim())
19 * @param wantGrad
20 * @param wantHessian
21 * @param d data row
22 * @param r where to sum results
23 * @param pscratch (dim noutcomes) scratch space
24 */
25 void addTerm(double[] x, boolean wantGrad, boolean wantHessian, T d, VEval r, double[] pscratch);
26}

Callers 2

mapMethod · 0.65
observeMethod · 0.65

Implementers 1

SigmoidLossMultinomialsrc/com/winvector/logistic/SigmoidLoss

Calls

no outgoing calls

Tested by

no test coverage detected