@Override public void newAssign(AssignedLabel<String> assign) { DatumResult dr = results.getOrCreateDatumResult(assign.getLobject()); Map<String, Double> oldProbabilites = dr.getCategoryProbabilites(); // update object class probabilites Map<String, Double> probabilities = getObjectClassProbabilities(assign.getLobject(), assign.getWorker()); dr.setCategoryProbabilites(probabilities); results.addDatumResult(assign.getLobject(), dr); // update priors if (!data.arePriorsFixed()) { undoPriorInfluence(oldProbabilites); makePriorInfluence(probabilities); } // rebuild worker confusion matrices for all workers who assigned this object if (probabilities != null) for (AssignedLabel<String> al : data.getAssignsForObject(assign.getLobject())) { WorkerResult wr = results.getOrCreateWorkerResult(al.getWorker()); for (Map.Entry<String, Double> e : probabilities.entrySet()) { wr.addError(e.getKey(), al.getLabel(), e.getValue()); } results.addWorkerResult(al.getWorker(), wr); } }
public ShallowAssign(AssignedLabel<T> assign) { worker = assign.getWorker().getName(); object = assign.getLobject().getName(); label = assign.getLabel(); }