From d43aaecf67a6353af1509e7446a3fa54adbb8ff8 Mon Sep 17 00:00:00 2001 From: Anirudh Pai Date: Fri, 7 Jun 2024 19:50:41 -0700 Subject: [PATCH] Revert "Update BKT-brain.js" This reverts commit 3315debb2a076c376fcfa36d657ca46d077753c8. --- src/models/BKT/BKT-brain.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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); }