/Linear-Regression

Pattern Recognition homework1 in NYCU. This project is to implement linear regression by using only NumPy with Gradient Descent.

Primary LanguagePython

Linear-Regression

NYCU, Pattern Recognition, homework1

This project is to implement linear regression by using only NumPy with Gradient Descent.

The sample code can be download in this link.

Requirement

In this work, you can use the following command to build the environment.

$ conda create --name PR python=3.8 -y
$ conda activate PR
$ conda install matplotlib pandas -y
$ pip install tqdm

Training & Evaluation

You can use the following command and select the option to train the specified model. After training the model, the program will automatically evaluate the model.

python 310551031_HW1.py

Result

The evaluation metrics is Mean Sequre Error.

Gradient descent Minibatch Gradient Descent Stochastic Gradient Descent
MSE 0.0083 0.04124 0.0399