Skip to content

Commit

Permalink
Revert "Update BKT-brain.js"
Browse files Browse the repository at this point in the history
This reverts commit 3315deb.
  • Loading branch information
apai25 committed Jun 8, 2024
1 parent 42165b6 commit d43aaec
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/models/BKT/BKT-brain.js
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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);
}

0 comments on commit d43aaec

Please sign in to comment.