Tutorial: Create a Machine Learning App with mljs and redwoodjs

Hi everyone,

I create a tutorial with redwoodjs and mljs. 3-5 years ago, machine learning happened on Python and R. But you can do a lot of things with JavaScript now. It’s more exciting with redwoodjs and Netlify deployment :slight_smile:.

Vida Team
https://vida.io

3 Likes

Hi :wave: @dnprock.

Neat. I am always a fan of ML and charts!

Curious - did you consider make the COVIDRegression a Cell that renders a COVIDRegressionChart component?

The api would then fetch the https://covidtracking.com/api/v1/us/daily.json data and

  • can have loading and empty states
  • can make the chart dynamic for a starting date range

So, the service to fetch the data would also do the reverse and filter json.filter(d => d.date > 20200301) where the date is an input argument to the gql.

BTW - How do you like Nivo for charts? I like their calendar one. I want to try out Victory as well.

1 Like

This is super cool, I’ve never used mljs but I think going with a JavaScript library over one of the bigger Python libraries makes a lot of sense for something like Redwood that has gone all in on JavaScript.

Having spent a little time in the Python and ML/DL space I think you’re really hitting on an important pain point for web developers. Everything about the field from the academic research to industry adoption to the open source libraries has completely transformed since AlexNet in 2012, GPT-3 being a perfect recent example. But this progress hasn’t trickled down to best practices that can be simply integrated into our existing web applications.

And I don’t think this is really a technical problem at all, the problem is having all the data people in one language using notebooks and all the web people in another language using servers and browsers. So you have this huge technical moat between the two environments and really what we should do is start over entirely and have both camps just write this stuff in Rust but that’s never going to happen.

There’s a bunch of other libraries to choose from and since this is a really straight forward regression most of them would be total overkill but I’m curious nonetheless if you looked at any of the more deep learning focused libraries like Tensorflow.js, Brain.js, Convnetjs.

2 Likes

@dthyresson in this tutorial, I load ml.js and perform processing on the client-side. I plan on another tutorial where we’ll do the processing on the server-side. I think of using Cell and gql.

I like Nivo charts. It has clean styling and a good variety of charts.

@ajcwebdev, JavaScript has made a lot of progress. Thanks for the suggestions with other libraries. I just added them to my list to explore.

2 Likes

I wrote part 2 of this tutorial where the application process data on the server-side. It’s fairly easy to make with redwoodjs. cc: @dthyresson

1 Like