Machine Learning vs Classic Programming

šŸ“– 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!

A few days ago I've tried to give a short explanation of what machine learning is, from the perspective of a Javascript developer.

Meanwhile, I've discovered this video below which gives such great insight into machine learning vs the standard way of programming:

It's going into more details, but the main idea for me was that a classic way of programming is to write a function that gets some input and calculates an output, while machine learning works by knowing multiple inputs and outputs, and based on that it can deduct the actual function behavior.

So let's say I need to write a Javascript program that computes the square of a number.

In a classic programming approach, we will first write the function:

const f = (x) => x*x

And later user it:

const value = readValueFromKeyboard()
const result = f(value)

javascript Machine Learning compared with Classic Programming

While in a machine learning approach we will do something like this:

const inputs = [1, 2, 3, 4 /* more values here */]
const outputs = [1, 4, 9, 16 /* more values here */]
const f = trainModel(inputs, outputs)

And when the model is ready use can use it as before:

const value = readValueFromKeyboard()
const result = f(value)

javascript Machine Learning compared with Classic Programming

They should be used together as both the classic programming and the machine learning approaches have their own class of problems to which they should be applied.

šŸ“– 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!

X