Skip to content

[FEATURE] Add Simple Linear Regression Implementation from Scratch #2689

@Osamsami

Description

@Osamsami

Is your request related to a problem?
Yes, the repository currently lacks a fundamental implementation of Linear Regression, which is a core concept for any beginner in Machine Learning.

Describe the solution you'd like
I would like to add a well-documented Python script that implements Linear Regression using basic mathematics (Gradient Descent) without relying on high-level libraries like Scikit-Learn. It should demonstrate:

  • Calculation of weights and bias.
  • Mean Squared Error (MSE) calculation.
  • A simple test case to show the prediction.

Describe alternatives you've considered
Using Scikit-Learn is an alternative, but for a learning repository, a "from-scratch" approach is better for conceptual clarity.

Example Use Case
Learners can use this to understand the "behind the scenes" logic of how a machine learning model actually learns from data points by adjusting its parameters.

Additional Context
I have a background in ML projects and would be happy to contribute this implementation myself to enhance the repository's educational value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions