How to get into Machine learning and Data Science as a JavaScript Developer?

Machine learning and Data Science are the most of the most exciting fields of computer science today. It has been around for quite a while but its relevance is still as high as ever. Here's how you can get into this field as a JavaScript developer with not previous experience.

Contents

  • How does Ai work?
  • Tensorflow.js: What is it?
  • Deploying your Ai enabled App
  • Now what?

How does Ai work?

  • In very simple terms, Ai learns through trial and error. It is given loads of data, which could be images, texts or even voice data.

  • The Neural Net recognises patterns in the data and learns from it.

Let's understand with the help of an example.

Tom is a 3 year-old boy, he does not know the difference between a dog and a cat. So we try to teach him what a dog looks like and what a cat looks like. We have to stacks of images, one with cats and one with dogs.

image.png

We show Tom pictures of dogs and cats and after he has learnt what they look like, we try to test how much he has learnt.

In order to learn the differences between the dogs and the cats he must have looked at the characteristics of them, for eg: Dogs are taller than Cats.

Let's say we asked him to identify 10 random images which have both cats and dogs(mixed), and he answers 8 correctly, he has a 80% accuracy.

image.png

Now simply replace Tom with a computer and you have Machine Learning, incredibly easy to understand, isn't it? This kind of Machine learning is called "Supervised learning".

image.png

What is TensorFlow.js

Tensorflow.js is a Js library by Google which allows us to make Machine learning models(the thing we did above) for the the browser.All computations happen in the clients' browser this means your web app is 100% privacy friendly as no data is sent back.

The cool thing about TensorFlow.js is that you don't even need to train your own models to use Ai! You can use pre-trained models which you can simply import in your project. This is fine when you're starting out but it is recommended that you train you own models.

Now take a look at this tutorial: Google CodeLabs tutorial

Deploying your Ai enabled App

Deploying a Tensorflow.js web app to the web is super simple.

Conclusion

In a future thread we'll a more in depth look on how a neural network works and some other concepts.

Finally, here are some resources you can take a look:

Machine Learning course by Andrew Ng

Google Tensorflow tutorial

Did you find this article valuable?

Support Pratham's Blog by becoming a sponsor. Any amount is appreciated!