From 183b999d6624ac9ad620e85b79d20c1bea1a2119 Mon Sep 17 00:00:00 2001 From: sufiyan kazi Date: Mon, 30 Mar 2026 15:37:52 +0530 Subject: [PATCH] Fix MSE calculation bug and refactor decision tree logic --- machine_learning/decision_tree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine_learning/decision_tree.py b/machine_learning/decision_tree.py index b4df64796bb1..3a63eeae86dd 100644 --- a/machine_learning/decision_tree.py +++ b/machine_learning/decision_tree.py @@ -96,7 +96,7 @@ def train(self, x, y): return best_split = 0 - min_error = self.mean_squared_error(x, np.mean(y)) * 2 + min_error = self.mean_squared_error(y, np.mean(y)) * 2 """ loop over all possible splits for the decision tree. find the best split.