Stream Recap | Machine Learning, Tensorflow.js, Linear Regression, Gradient Descent

Had a wonderful time streaming this time around. Though I didn't achieve my goal of being able to predict future values with a Linear Regression, I learned a TON.

I decided to check out Tensorflow.js. I was really happy with it! I have previously used Apache Spark so I'm not unfamiliar with big data frameworks. Tensorflow was just simple and to the point. There didn't seem to be alot of fluff in the API and I really appreciate that style of directness.

I wasn't able to accomplish my goal because frankly I have the wrong approach. Training a Tensorflow model seems to be a use case of having a complicated model and a long training time. Since I'm trying to train a model in "realtime" I basically tripped over Gradient Descent/Learning Rates.

So what next? I am going to try to have each subsequent training pick up where the last training left off. My hope here is that even though the first set of values will have a woefully inaccurate model, eventually we will hit a steady state and be able to train a new model quickly enough(I've picked < 1s for no particular reason).

If this approach doesn't work then I'm going to look into training the model Async and have the latest value take the latest model that is trained.

This could be an interesting enough approach in it's own right as it would be nice to have longer training times for the model whenever there is a gap in stream values. I might end up trying this approach reguardless.