Implementation of Linear Ridge regression and Regularized logistic regression
In this experiment we studied Linear Regression, which is linear model for modelling
continuous scalar output. Linear regression can be solved using two approaches namely
Gradient descent and Closed form solution. We used Closed form solution to predict
weights based on Training data and analyse its performance on Testing data. Apart
from these various experiments based on Average Testing MSE, λ, Fraction values are
done to understand impact of these parameters on getting a better fitted model.
Required Tools
• Numpy
• Matplotlib
• Python3
To execute code in Linear ridge regression/code directory run following code :
python3 answer.py
Or
python3 answer.py > result.txt
In case of first command results will be displayed on terminal. In case of
second command results will be stored in result.txt file.
Plots generated are stored in figures folder.
In this experiment, we implement regularised logistic regression using Gradient Descent as
well as Newton Raphson method. We then implement feature transformation to convert
data into higher dimension space for different degree and implement logistic regression on
it. We analyse performance of Logistic Regression by varying Regularisation parameter.
Required Tools
• Numpy
• Matplotlib
• Python3
• Scipy
To execute code in Regularized logistic regression/code directory run following code :
python3 answer.py
Or
python3 answer.py > result.txt
In case of first command results will be displayed on terminal. In case of
second command results will be stored in result.txt file.
Plots generated are stored in figures folder.