GithubHelp home page GithubHelp logo

debajyotid2 / linear_regression_with_sgd Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 39 KB

Multi-variate linear regression using stochastic gradient descent

License: GNU Affero General Public License v3.0

Python 13.04% C 86.59% CMake 0.37%
c-programming gradient-descent machine-learning-algorithms numpy blas-libraries linear-algebra machine-learning

linear_regression_with_sgd's Introduction

Multivariate Linear Regression using Stochastic Gradient Descent

This repository is a demonstration of linear regression solved using low level matrix and linear algebra operations in C and NumPy in Python.

Dependencies

C

The C source code uses BLAS (Basic Linear Algebra Subsystems) libraries for matrix and vector operations. The implementation specifically used is OpenBLAS (https://github.com/xianyi/OpenBLAS.git). Please refer to the installation instructions for OpenBLAS in its GitHub repository. The library matrix.h supports elementary algebraic oprations for two-dimensional matrices. Data types currently supported are double (for double-precision floating point) and int (for integers).

To run a multivariate linear regression problem with the default settings and stochastic gradient descent solver, run

cd c
mkdir build
cd build
cmake ..
./run

Hyperparameters can be customized from the command line. For more details, run ./run --help.

Warning: Code has only been tested on Fedora 38 Linux.

Python

The Python source code uses only matrix operations in NumPy for implementing gradient descent and stochastic gradient descent. The only dependencies are numpy and matplotlib.

linear_regression_with_sgd's People

Contributors

debajyotid2 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.