Giter VIP home page Giter VIP logo

linearregression's Introduction

LinearRegression

This is a python implementation of a linear regressor, which models the relationship between a dependent variable (target) and one or more independent variables (features).

A linear regression model makes the assumption of an existing linear relationship between the features and the target.

A linear regressor is defined as:

$$y = b + w_1 x_1 + w_2 x_2 + ... + w_m x_m$$

where $y$ is the target variable, $x_1, x_2, ..., x_m$ the features and $b$ the bias.

To find the optimal values for the regressor coefficients, we use Mean Squared Error (MSE) as the cost function, updating $b$ and $w_i$ through gradient descent so that the mean squared error values tend to an optimal minima.

The MSE objective function is defined as the average of squared error that occurred between the predicted $\hat{y}$ values and the actual $y$ values:

$$MSE = \frac{1}{N} \sum_{i}^{N} (y_i - \hat{y}_i) ^ 2$$

linearregression's People

Contributors

beltran99 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.