PEC-CSS / slowmokit

Library which can be used for machine learning in C++.
https://pec-css.github.io/slowmokit/
GNU General Public License v2.0
17 stars 16 forks source link

linear regression model added #1

Closed UtkarshGoelUT closed 1 year ago

UtkarshGoelUT commented 1 year ago

For given x and y

vector<vector<double>> x = {{1, 2}, {2, 3}, {3, 4}, {4, 5}, {5, 6}};
vector<double> y = {2, 3, 4, 5, 6};

Results were obtained were following

Θ0: 0.169471
Θ1: 0.445665
Θ2: 0.615135
Actural value: 2, Predicted value: 1.84541
Actural value: 3, Predicted value: 2.90621
Actural value: 4, Predicted value: 3.96701
Actural value: 5, Predicted value: 5.02781
Actural value: 6, Predicted value: 6.08861
harshjohar commented 1 year ago

Sorry

We will follow this new folder structure. Although code looks good to me, but this code needs to be in specific files, according to the new structure of the project.

ken1000minus7 commented 1 year ago

sad