Skip to content

opeajibuwa/Batch-gradient-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Batch gradient algorithm implementation for linear regression

There is only one python file IA1.py, which can generate the lineplots for different learning rates. Also check out the interactive jupyter notebook.

The lineplots will be save in the path defined by variable "MSE_plot_save_path" in main function. The lineplots are generated separately. Each execution of python file will also print the MSE value for validation set on the console.

All the questions in the IA1.pdf are covered in the implementation code in IA1.py.

To run IA1.py:

  • Please activate python3 virtual environment in the same directory where the python file and the data are. Please make sure the data files and python file are under the same folder.
  • Please install these python3 packages under the virtual environment: pandas, numpy, matplotlib and seaborn.
  • To run the program, please use the following command: python IA1.py

About

Batch gradient algorithm implementation for linear regression

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published