Skip to content

Latest commit

 

History

History
81 lines (53 loc) · 2.05 KB

README.md

File metadata and controls

81 lines (53 loc) · 2.05 KB

Linear Regression

  • Title: Linear Regression
  • Author: Guillem Alomar
  • Initial release: June 4th, 2019
  • Code version: 0.1
  • Availability: Public

Index

Requirements

  • Python +3.5
  • matplotlib +3.1.1

Documentation

Explanation

This application consists in a Linear Regression implementation in python3.

It can be calculated by Gradient Descent or with the Normal Equation.

Using the application

First of all

Execution parameters

You can modify the execution parameters in src/settings.py

You should also add your training set csv to the input folder.

Executing

This is done by typing the following command:

$ python3 LinearRegression.py

Additional Parameters

-> % python LinearRegression.py -h
usage: LinearRegression.py [-h] [-f FILE] [-m MODE] [-i INPUT]

Linear Regression

optional arguments:
  -h, --help                show this help message and exit
  -f FILE, --file FILE      CSV input file. If not specified it will use a default one.
  -m MODE, --mode MODE      Application mode: GD (Gradient Descent)| NM (Normal Equation). Default: GD
  -i INPUT, --input INPUT   Input values to process. Between 's. Example: '2.2 3.3'. Default: Random

The output

Once the execution has finished, the resulting images will be stored in output/. These images should look similar to the following ones:

alt text

alt text

The names of the images follow the next syntax:

$inputname_output.png

Logs can be found both in the execution terminal and in src/execution.log