A brief explanation of Machine Learning for Javascript developers

šŸ“– Neural networks for Javascript developers

The Neural Networks for JavaScript developers book is almost ready! Learn the basics of AI with TensorFlowJs examples. Join now the presale and get a 15$ coupon off the launching price!

The machine learning term was coined in 1959 by Arthur Samuel, an IBM researcher.

Before we start, Please note that this article aims only to provide a very shallow intro to what machine learning is. We will only scratch the surface without going into too many details.

What is Machine Learning

Machine learning refers to a process where we teach a computer how to perform a task without explicitly programming it to perform that task.

Instead of the classical programming way to do things in machine learning, we are feeding data to an algorithm so that we gradually improve outcomes based on multiple experiences.

Compared with the classic way of programming where we write a function and give it an input to generate the output, in machine learning, we try to deduct that function based on a huge set of inputs and outputs. Wrote more about this here.

Main tasks for Machine Learning

There are two main tasks that are handled by machine learning:

  • data classification; for example determining what object is shown in a picture, or face recognition
  • predictions for future outcomes based on older data; for example price evolution, what youtube video do you want to watch next or product recommendations

Steps in the Machine Learning process

There are a set of preferred septs we need to go through when setting up a machine learning process.

STEP 1: gather data and clean it up. The more data, the better. Also the data quality matters. The better the given data represents the problem, the better the results. The data needs to have some kinds of signals that the algorithm can use to generate solutions. There is a process called feature engineering where the raw initial data is transformed into features that better represent the underlying problem.

STEP 2: The next step is to separate the data into a training set and a testing set. The average weight is somewhere around 80% of the data goes in the training set while the rest of the 20% goes to the testing data.

We first pass the training data to the algorithm to build a model. When the model is ready we can use the testing data to assert how well the resulting model behaves in the real world. Expect each model to have a level of error.

STEP 3: the final step is to choose an algorithm. Such algorithms can be:

  • statistic LiniarRegresion or LogisticRegresions
  • DecisionTrees that work by assigning different weights to the data features
  • Convolutional neuronal networks assign weights to features but also create features automatically for things like natural language processing or images where manual feature engineering is impossible

Each of these functions improves by comparing its predictions to an error function.

Models, the Deliverables of Machine Learning

The end result of a machine learning process is a model. Basically, the model is just a file that takes as input any data with the format that the model was trained on and gives as output a prediction.

That model can be later embedded on a phone or used in the browser with tools such as TensorflowJs.

As a funny ending fact, it seems that Arthur Samuel established the basic rules of Machine Learning while trying to find a way to make the computer play checkers. I've also started programming while trying to make my own games. One extra evidence that video games are not bad for us šŸ™‚

Next, you can take a look at how to make your first machine-learning app with Javascript and TensorflowJs.

šŸ“– Neural networks for Javascript developers

The Neural Networks for JavaScript developers book is almost ready! Learn the basics of AI with TensorFlowJs examples. Join now the presale and get a 15$ coupon off the launching price!

Leave a Reply

Your email address will not be published. Required fields are marked *

Home Screencasts Best of Newsletter Search X

Neural Networks for JavaScript developers
Presale - 15$ free coupon

Hi friend! Before you go, just wanted to let you know that in March 2023 I will be launching the TensorFlow.Js by Example course.

This course will include basic concepts of AI and Neural Networks done with TensorFlowJs such as:

  • Working with datasets
  • Visualizing training
  • Deep Neural Networks in JavaScript
  • Reinforcement Learning
  • Convolutional neural networks
  • and much more ...

Also, there will be a lot of examples as:

  • Object detection
  • Natural language processing
  • Face and voice recognition
  • Gaming AI

Join now the waiting list and get a 15$ coupon off the launching price!