项目作者: sanjeev309

项目描述 :
Linear regression using gradient descent from scratch in C with GNUplot
高级语言: C
项目地址: git://github.com/sanjeev309/linear_regression_using_GD.git
创建时间: 2016-04-29T17:24:44Z
项目社区:https://github.com/sanjeev309/linear_regression_using_GD

开源协议:MIT License

下载


Linear Regression using Gradient Descent in C

A from scratch implementation of Linear Regression algorithm with 2 fitting parameters. The parameters are optimised using Gradient Descent algorithm. The implementation also utilises GNUplot to plot the data and cost over epochs.

Getting Started

  • Clone the repo into your folder

    git clone https://github.com/sanjeev309/linear_regression_using_GD

  • Experiment with values of EPOCH, LEARNING_RATE and default theta values in main.cpp

  • Execute make command to compile into an executable

    make compile

  • Run the executable

    ./linear_reg

  • Clean for a rebuild

    make clean

Prerequisites

*nix OS, gcc compiler, basic C programming and curiosity.

Breakout

Gradient Descent Algorithm for LR

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

  • This project dates back to 3+ years when I just began with Andrew Ng’s ML course in MATLAB. A lot of gratitude for him and the initiative.