Skip to content

Enhance Day 6 Logistic Regression with Training and Test Set Visualizations #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PUROJITA-SINGH
Copy link

Description

This pull request enhances the Day 6 Logistic Regression.md file by incorporating visualizations of the Logistic Regression model's decision boundaries for both the training and test sets.

Motivation

  • Clarity and Understanding: These visualizations are critical for understanding how the Logistic Regression model makes its predictions and separates data points into different classes. They clearly show the learned decision boundary.
  • Model Evaluation: By comparing the decision boundaries on the training and test sets, users can gain insights into potential overfitting or how well the model generalizes to unseen data.
  • Educational Value: For a resource aimed at learning machine learning, these visual aids significantly improve the pedagogical effectiveness of the Logistic Regression explanation.

Changes Made

  • Added Python code to generate two distinct plots:
    • One illustrating the decision boundary and data points for the training set.
    • One illustrating the decision boundary and data points for the test set.
  • The plots utilize matplotlib with ListedColormap to clearly distinguish between the predicted regions and actual data points.
  • The actual data points are plotted using plt.scatter, enhancing visual readability with edgecolors='black' and s=50.
  • Each plot includes appropriate titles and axis labels (Age (Scaled), Estimated Salary (Scaled)).

Related Issues (if applicable)

  • [If this change is related to an existing issue in the original repository, link it here, e.g., Closes #123 or Fixes #456]

Code for visualization
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.

1 participant