- Python script to estimate coefficients for multilinear regression using gradient descent algorithm.
- Linear regression implemented from scratch.
- Using simulated data of job prospects given AI and machine learning skills.
|
|
|---|
Given,
Where:
y is the target,
W is a vector parameters (weights) to be estimated.
X is a matrix of 1's and K feature weights and N data points of given inputs
and
- The loss function chosen is minimum mean square error given by:
- With partial derivatives
- With weight updates given by:
- Where
$\alpha$ is the "learning weight".
python mulitpleLinearRegression.py
=======================================================================
MULTI LINEAR REGRESSION USING GRADIENT DESCENT TERMINATION RESULTS
=======================================================================
Initial Weights were: 0.0, 0.0, 0.0.
With initial cost: 3281.9.
# Iterations: 2,500,000.
Final weights: w0:+24.94, w1:+0.32, w2:+0.483.
Final cost: +8.1.
RMSE: +4.0, R-Squared: +0.7
=======================================================================
Finished
Python (>2.7), Numpy and Pandas.

