Skip to content

fix: correct accuracy row alignment in classification report table#951

Merged
leestott merged 3 commits intomicrosoft:mainfrom
Satyam-madeit:fix/my-first-contribution
Apr 11, 2026
Merged

fix: correct accuracy row alignment in classification report table#951
leestott merged 3 commits intomicrosoft:mainfrom
Satyam-madeit:fix/my-first-contribution

Conversation

@Satyam-madeit
Copy link
Copy Markdown
Contributor

The accuracy row in the classification report table had values in the wrong columns.

precision and recall columns were filled but they should be
empty for the accuracy row. The 0.80 value belongs under
f1-score and 1199 belongs under support, which matches
the actual output of sklearn's classification_report().

@Satyam-madeit
Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates lesson documentation to align reported metrics/tables with the actual outputs produced by scikit-learn and the code snippets shown in the tutorials.

Changes:

  • Fixes the accuracy row column alignment in a classification_report() markdown table (leaving precision/recall blank, placing accuracy under f1-score, and support under support).
  • Updates the linear regression lesson text/snippet to describe and name the computed error as RMSE (since it uses sqrt(mean_squared_error(...))).
Show a summary per file
File Description
4-Classification/2-Classifiers-1/README.md Corrects the accuracy row alignment in the classification report table to match scikit-learn output.
2-Regression/3-Linear/README.md Adjusts documentation/snippet terminology to RMSE to match the existing computation.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

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.
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This README change (switching from MSE wording/variable name to RMSE) is unrelated to the PR title/description about classification report table alignment. Please either update the PR description to include this additional fix or split it into a separate PR to keep changes focused.

Copilot uses AI. Check for mistakes.
Comment thread 2-Regression/3-Linear/README.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@leestott leestott merged commit 4dcea74 into microsoft:main Apr 11, 2026
1 check passed
@Satyam-madeit Satyam-madeit deleted the fix/my-first-contribution branch April 15, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants