public void forget() { super.forget(); this.opinions.clear(); this.stereotypeRatingCache.clear(); this.ratings.clear(); this.evidence.clear(); this.learner = new TwoStageLearner(clusters, true); }
/** * We need to check when adding experiences whether the L limit has been reached. Every time an * experience is added, we move on towards L because we know a delegation has been made. */ @Override public void addExperience(Experience e) { super.addExperience(e); // figure out if we should reproduce the clusters and classifier // if we should: if (intervalRemaining <= 0) { learner.train(this.opinions); // reset counter and base rate cache intervalRemaining = learningInterval; } else intervalRemaining--; // otherwise, decrement and continue // record the error at this point if (learner.isReady()) errors.add(learner.getErrorRate()); else errors.add(1.0); // if we haven't got the model ready, then add full // error }