A simple guide to getting started with ๐— ๐—ฎ๐—ฐ๐—ต๐—ถ๐—ป๐—ฒ ๐—น๐—ฒ๐—ฎ๐—ฟ๐—ป๐—ถ๐—ป๐—ด & ๐——๐—ฎ๐˜๐—ฎ๐—ฆ๐—ฐ๐—ถ๐—ฒ๐—ป๐—ฐ๐—ฒ using ๐—๐—ฎ๐˜ƒ๐—ฎ๐—ฆ๐—ฐ๐—ฟ๐—ถ๐—ฝ๐˜!

Index

โ†ณIntroduction
โ†ณHow does Ai work?
โ†ณTensorflow.js: What is it?
โ†ณDeploying your Ai enabled App
โ†ณNow what?

#100daysOfCode #JavaScript
๐Ÿงต๐Ÿ‘‡
โ†ณIntroduction

In 2020 most if not all Ai tools which are on python are now available in JavaScript specifically aimed to bring web developers into this field.

You only need to know basic JavaScript for this tutorial.

No fancy maths or Python required.
1. 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.

โ†ณGeneralisation is Ai in one word.
1.1 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.
1.2 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.
1.3 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.
1.4 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".
2.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.
2.1 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.
3. Deploying a Tensorflow.js web app to the web is super simple.

โ†ณPush to a Github Repo and then import it in Vercel/Netlify, just like a normal website deployment.

โ†ณHere's an Web App I made using Tfjs:
https://tfjsmnist.vercel.app/ 
4. 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
- Machine learning Foundations by Google developers YouTube channel
You can follow @PrasoonPratham.
Tip: mention @twtextapp on a Twitter thread with the keyword โ€œunrollโ€ to get a link to it.

Latest Threads Unrolled: