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

Method dot

src/com/winvector/opt/impl/HelperFns.java:81–89  ·  view source on GitHub ↗
(final Datum row, final double[] o, final int startIndex)

Source from the content-addressed store, hash-verified

79 }
80
81 public static double dot(final Datum row, final double[] o, final int startIndex) {
82 double r = 0.0;
83 final int card = row.getNIndices();
84 for(int ii=0;ii<card;++ii) {
85 final int i = row.getKthIndex(ii);
86 r += row.getKthValue(ii)*o[i+startIndex];
87 }
88 return r;
89 }
90
91 public static void expScale(final double[] r) {
92 final int n = r.length;

Callers 1

predictMethod · 0.95

Calls 3

getNIndicesMethod · 0.65
getKthIndexMethod · 0.65
getKthValueMethod · 0.65

Tested by

no test coverage detected