diff --git a/src/models/BKT/BKT-brain.js b/src/models/BKT/BKT-brain.js index 8744fcf30a5..1132ee4e74d 100644 --- a/src/models/BKT/BKT-brain.js +++ b/src/models/BKT/BKT-brain.js @@ -1,6 +1,6 @@ export default function update(model, isCorrect) { - let numerator, masteryAndGuess, probMasteryGivenObservation; - + let numerator; + let masteryAndGuess; if (isCorrect) { numerator = model.probMastery * (1 - model.probSlip); masteryAndGuess = (1 - model.probMastery) * model.probGuess; @@ -9,11 +9,6 @@ export default function update(model, isCorrect) { masteryAndGuess = (1 - model.probMastery) * (1 - model.probGuess); } - probMasteryGivenObservation = numerator / (numerator + masteryAndGuess); - - let adjustment = (probMasteryGivenObservation - model.probMastery) * model.probTransit; - - model.probMastery += adjustment; - - model.probMastery = Math.max(0, Math.min(1, model.probMastery)); + let probMasteryGivenObservation = numerator / (numerator + masteryAndGuess); + model.probMastery = probMasteryGivenObservation + ((1 - probMasteryGivenObservation) * model.probTransit); }