MCPcopy Index your code
hub / github.com/WinVector/Logistic / observe

Method observe

src/com/winvector/variables/BObserver.java:158–180  ·  view source on GitHub ↗
(final BurstMap row)

Source from the content-addressed store, hash-verified

156 }
157
158 @Override
159 public void observe(final BurstMap row) {
160 // score the standard way
161 final double weight = oldAdapter.weight(row);
162 if(weight>0.0) {
163 final String resStr = row.getAsString(oldAdapter.def().resultColumn);
164 final int category = oldAdapter.category(resStr);
165 if(category>=0) {
166 final SparseSemiVec vec = oldAdapter.vector(row);
167 if(null!=vec) {
168 if(sigmoidLoss!=null) {
169 final ExampleRow ei = new SparseExampleRow(vec,weight,category);
170 sigmoidLoss.predict(oldX,ei,pred);
171 }
172 for(final String variable: stats.keySet()) {
173 final BStat btable = stats.get(variable);
174 final String level = row.getAsString(variable);
175 btable.observe(resStr,level,pred,category,weight);
176 }
177 }
178 }
179 }
180 }
181
182 @Override
183 public void observe(final BObserver o) {

Callers

nothing calls this directly

Calls 8

observeMethod · 0.95
defMethod · 0.80
vectorMethod · 0.80
weightMethod · 0.65
categoryMethod · 0.65
predictMethod · 0.65
keySetMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected