(DataPoint dataPoint, int targetClass)
| 223 | } |
| 224 | |
| 225 | @Override |
| 226 | public void update(DataPoint dataPoint, int targetClass) |
| 227 | { |
| 228 | final Vec x_t = dataPoint.getNumericalValues(); |
| 229 | final double y_t = targetClass*2-1; |
| 230 | |
| 231 | double gamma = B * Math.sqrt(p-1) / k; |
| 232 | double wx = score(x_t, false); |
| 233 | if(y_t*wx <= (1-alpha)*gamma)//update |
| 234 | { |
| 235 | double eta = C/Math.sqrt(p-1)/Math.sqrt(k++); |
| 236 | |
| 237 | double norm = Math.sqrt(K.eval(x_t, x_t)); |
| 238 | |
| 239 | associatedScores.add(score(new ScaledVector(1/norm, x_t), false)); |
| 240 | supports.add(x_t); |
| 241 | normalizers.add(norm); |
| 242 | signedEtas.add(eta*y_t); |
| 243 | rounds.add(curRounds); |
| 244 | curRounds = 0; |
| 245 | } |
| 246 | else |
| 247 | curRounds++; |
| 248 | } |
| 249 | |
| 250 | /** |
| 251 | * Computes the output of the summations of the input vector with the |
nothing calls this directly
no test coverage detected