| 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) { |