Here's a first pass at LinearRegression in scikit.js.
First some notes on how I'm approaching this.
1. Obviously we are keeping the signature as close to scikit-learn as possible.
I've done all of the methods except for "score". I've also added a function called "importModel"
which does the "importing from python" that we talked about in the discussion here.
The LinearRegression in Scikit-Learn doesn't use gradient descent (like this one). It uses some
production level linalg solvers. Eventually in the long run, we should do the same thing. This is a holdover
until we get some better / faster code in here.
2. I think it's probably wise to use get/set methods to match the Scikit-Learn Api
For LinearRegression in sklearn, you can just go lr.coef_ and lr.intercept_ to get those values.
We store the internal model as tf.sequential, so it makes sense to basically use getters/setters to not
break the contract.
3. I'm not sure what our plan is with prettier.js?
Currently I'm operating off of the .prettier file in the repo, but some of the code in the repo is ignoring that. Moreover, my personal preference is indentation is 2, and no semi-colons. Though, I don't really care that much. I more just wanna make sure we are all on the same page, and that it runs semi-automatically in the repo.
4. I've never used JSDoc before but it seems great.
I'm gonna add it in my next pass. Just wanted to get this PR in before I go to bed. I also plan on adding a lot more tests.
5. I drunkenly asked my buddy to make a logo for scikit.js.
I've attached it. If ya like it, we can start there. Otherwise, we can make something else.
I've attached a png screenshot only because Github complains when I try to put in an svg :)