From 6351453769d9dafeda591a5732fa36c417336052 Mon Sep 17 00:00:00 2001 From: Satyam-madeit Date: Tue, 31 Mar 2026 00:02:49 +0530 Subject: [PATCH 1/3] fix: correct accuracy row alignment in classification report table --- 4-Classification/2-Classifiers-1/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4-Classification/2-Classifiers-1/README.md b/4-Classification/2-Classifiers-1/README.md index 62cef08d4..82961d43a 100644 --- a/4-Classification/2-Classifiers-1/README.md +++ b/4-Classification/2-Classifiers-1/README.md @@ -223,7 +223,7 @@ Since you are using the multiclass case, you need to choose what _scheme_ to use | japanese | 0.70 | 0.75 | 0.72 | 220 | | korean | 0.86 | 0.76 | 0.81 | 242 | | thai | 0.79 | 0.85 | 0.82 | 254 | - | accuracy | 0.80 | 1199 | | | + | accuracy | | | 0.80 | 1199 | | macro avg | 0.80 | 0.80 | 0.80 | 1199 | | weighted avg | 0.80 | 0.80 | 0.80 | 1199 | From 16258311a89652fad7e6eb4e818c541972c8c3d7 Mon Sep 17 00:00:00 2001 From: Satyam-madeit Date: Tue, 31 Mar 2026 00:32:23 +0530 Subject: [PATCH 2/3] fix: correct MSE to RMSE in regression description and code --- 2-Regression/3-Linear/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/2-Regression/3-Linear/README.md b/2-Regression/3-Linear/README.md index 8d6e0d14f..10fe8b670 100644 --- a/2-Regression/3-Linear/README.md +++ b/2-Regression/3-Linear/README.md @@ -207,13 +207,13 @@ lin_reg.fit(X_train,y_train) The `LinearRegression` object after `fit`-ting contains all the coefficients of the regression, which can be accessed using `.coef_` property. In our case, there is just one coefficient, which should be around `-0.017`. It means that prices seem to drop a bit with time, but not too much, around 2 cents per day. We can also access the intersection point of the regression with Y-axis using `lin_reg.intercept_` - it will be around `21` in our case, indicating the price at the beginning of the year. -To see how accurate our model is, we can predict prices on a test dataset, and then measure how close our predictions are to the expected values. This can be done using mean square error (MSE) metrics, which is the mean of all squared differences between expected and predicted value. +To see how accurate our model is, we can predict prices on a test dataset, and then measure how close our predictions are to the expected values. This can be done using root mean square error (RMSE) metrics, which is the root of the mean of all squared differences between expected and predicted value. ```python pred = lin_reg.predict(X_test) -mse = np.sqrt(mean_squared_error(y_test,pred)) -print(f'Mean error: {mse:3.3} ({mse/np.mean(pred)*100:3.3}%)') +rmse = np.sqrt(mean_squared_error(y_test,pred)) +print(f'Mean error: {rmse:3.3} ({rmse/np.mean(pred)*100:3.3}%)') ``` Our error seems to be around 2 points, which is ~17%. Not too good. Another indicator of model quality is the **coefficient of determination**, which can be obtained like this: From 62fe8a3ca8c53cd4192da1b95b045a2105211d9d Mon Sep 17 00:00:00 2001 From: Lee Stott Date: Sat, 11 Apr 2026 22:40:39 +0100 Subject: [PATCH 3/3] Update 2-Regression/3-Linear/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- 2-Regression/3-Linear/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-Regression/3-Linear/README.md b/2-Regression/3-Linear/README.md index 10fe8b670..8978b79ee 100644 --- a/2-Regression/3-Linear/README.md +++ b/2-Regression/3-Linear/README.md @@ -213,7 +213,7 @@ To see how accurate our model is, we can predict prices on a test dataset, and t pred = lin_reg.predict(X_test) rmse = np.sqrt(mean_squared_error(y_test,pred)) -print(f'Mean error: {rmse:3.3} ({rmse/np.mean(pred)*100:3.3}%)') +print(f'RMSE: {rmse:3.3} ({rmse/np.mean(pred)*100:3.3}%)') ``` Our error seems to be around 2 points, which is ~17%. Not too good. Another indicator of model quality is the **coefficient of determination**, which can be obtained like this: