Machine Learning With Javascript

Master Machine Learning from scratch using Javascript and TensorflowJS with hands-on projects.

Last updated 2022-01-10 | 4.6

- Assemble machine learning algorithms from scratch!
- Build interesting applications using Javascript and ML techniques
- Understand how ML works without relying on mysterious libraries

What you'll learn

Assemble machine learning algorithms from scratch!
Build interesting applications using Javascript and ML techniques
Understand how ML works without relying on mysterious libraries
Optimize your algorithms with advanced performance and memory usage profiling
Use the low-level features of Tensorflow JS to supercharge your algorithms
Grow a strong intuition of ML best practices

* Requirements

* Basic understanding of terminal and command line usage
* Ability to read basic math equations

Description

If you're here, you already know the truth: Machine Learning is the future of everything.

In the coming years, there won't be a single industry in the world untouched by Machine Learning.  A transformative force, you can either choose to understand it now, or lose out on a wave of incredible change.  You probably already use apps many times each day that rely upon Machine Learning techniques.  So why stay in the dark any longer?

There are many courses on Machine Learning already available.  I built this course to be the best introduction to the topic.  No subject is left untouched, and we never leave any area in the dark.  If you take this course, you will be prepared to enter and understand any sub-discipline in the world of Machine Learning.


A common question - Why Javascript?  I thought ML was all about Python and R?

The answer is simple - ML with Javascript is just plain easier to learn than with Python.  Although it is immensely popular, Python is an 'expressive' language, which is a code-word that means 'a confusing language'.  A single line of Python can contain a tremendous amount of functionality; this is great when you understand the language and the subject matter, but not so much when you're trying to learn a brand new topic.

Besides Javascript making ML easier to understand, it also opens new horizons for apps that you can build.  Rather than being limited to deploying Python code on the server for running your ML code, you can build single-page apps, or even browser extensions that run interesting algorithms, which can give you the possibility of developing a completely novel use case!


Does this course focus on algorithms, or math, or Tensorflow, or what?!?!

Let's be honest - the vast majority of ML courses available online dance around the confusing topics.  They encourage you to use pre-build algorithms and functions that do all the heavy lifting for you.  Although this can lead you to quick successes, in the end it will hamper your ability to understand ML.  You can only understand how to apply ML techniques if you understand the underlying algorithms.

That's the goal of this course - I want you to understand the exact math and programming techniques that are used in the most common ML algorithms.  Once you have this knowledge, you can easily pick up new algorithms on the fly, and build far more interesting projects and applications than other engineers who only understand how to hand data to a magic library.

Don't have a background in math?  That's OK! I take special care to make sure that no lecture gets too far into 'mathy' topics without giving a proper introduction to what is going on.


A short list of what you will learn:

  • Advanced memory profiling to enhance the performance of your algorithms

  • Build apps powered by the powerful Tensorflow JS library

  • Develop programs that work either in the browser or with Node JS

  • Write clean, easy to understand ML code, no one-name variables or confusing functions

  • Pick up the basics of Linear Algebra so you can dramatically speed up your code with matrix-based operations. (Don't worry, I'll make the math easy!)

  • Comprehend how to twist common algorithms to fit your unique use cases

  • Plot the results of your analysis using a custom-build graphing library

  • Learn performance-enhancing strategies that can be applied to any type of Javascript code

  • Data loading techniques, both in the browser and Node JS environments

Who this course is for:

  • Javascript developers interested in Machine Learning

Course content

15 sections • 189 lectures

Getting Started - How to Get Help Preview 00:57

Course Resources Preview 00:38

Join Our Community! Preview 00:07

Solving Machine Learning Problems Preview 06:04

A Complete Walkthrough Preview 09:53

App Setup Preview 02:01

Problem Outline Preview 02:53

Identifying Relevant Data Preview 04:11

Dataset Structures Preview 05:47

Recording Observation Data Preview 03:59

What Type of Problem? Preview 04:35

How K-Nearest Neighbor Works Preview 08:23

Lodash Review Preview 09:56

Implementing KNN Preview 07:16

Finishing KNN Implementation Preview 05:53

Testing the Algorithm Preview 04:47

Interpreting Bad Results Preview 04:12

Test and Training Data Preview 04:05

Randomizing Test Data Preview 03:48

Generalizing KNN Preview 03:41

Gauging Accuracy Preview 05:18

Printing a Report Preview 03:29

Refactoring Accuracy Reporting Preview 05:13

Investigating Optimal K Values Preview 11:38

Updating KNN for Multiple Features Preview 06:36

Multi-Dimensional KNN Preview 03:56

N-Dimension Distance Preview 09:50

Arbitrary Feature Spaces Preview 08:27

Magnitude Offsets in Features Preview 05:36

Feature Normalization Preview 07:32

Normalization with MinMax Preview 07:14

Applying Normalization Preview 04:22

Feature Selection with KNN Preview 07:47

Objective Feature Picking Preview 06:10

Evaluating Different Feature Values Preview 02:53

Let's Get Our Bearings Preview 07:27

A Plan to Move Forward Preview 04:31

Tensor Shape and Dimension Preview 12:04

Tensor Dimension and Shapes

Elementwise Operations Preview 08:18

Broadcasting Operations Preview 06:47

Broadcasting Elementwise Operations

Logging Tensor Data Preview 03:47

Tensor Accessors Preview 05:24

Creating Slices of Data Preview 07:46

Tensor Concatenation Preview 05:28

Summing Values Along an Axis Preview 05:13

Massaging Dimensions with ExpandDims Preview 07:47

KNN with Regression Preview 04:56

A Change in Data Structure Preview 04:04

KNN with Tensorflow Preview 09:18

Maintaining Order Relationships Preview 06:30

Sorting Tensors Preview 08:00

Averaging Top Values Preview 07:43

Moving to the Editor Preview 03:26

Loading CSV Data Preview 10:10

Running an Analysis Preview 06:10

Reporting Error Percentages Preview 06:26

Normalization or Standardization? Preview 07:33

Numerical Standardization with Tensorflow Preview 07:37

Applying Standardization Preview 04:01

Debugging Calculations Preview 08:14

What Now? Preview 04:00

Linear Regression Preview 02:39

Why Linear Regression? Preview 04:52

Understanding Gradient Descent Preview 13:04

Guessing Coefficients with MSE Preview 10:19

Observations Around MSE Preview 05:56

Derivatives! Preview 07:12

Gradient Descent in Action Preview 11:46

Quick Breather and Review Preview 05:46

Why a Learning Rate? Preview 17:05

Answering Common Questions Preview 03:48

Gradient Descent with Multiple Terms Preview 04:43

Multiple Terms in Action Preview 10:39

Project Overview Preview 06:01

Data Loading Preview 05:17

Default Algorithm Options Preview 08:32

Formulating the Training Loop Preview 03:18

Initial Gradient Descent Implementation Preview 09:24

Calculating MSE Slopes Preview 06:52

Updating Coefficients Preview 03:11

Interpreting Results Preview 10:07

Matrix Multiplication Preview 07:09

More on Matrix Multiplication Preview 06:40

Matrix Form of Slope Equations Preview 06:21

Simplification with Matrix Multiplication Preview 09:28

How it All Works Together! Preview 14:01

Refactoring the Linear Regression Class Preview 07:40

Refactoring to One Equation Preview 08:58

A Few More Changes Preview 06:13

Same Results? Or Not? Preview 03:19

Calculating Model Accuracy Preview 08:37

Implementing Coefficient of Determination Preview 07:44

Dealing with Bad Accuracy Preview 07:47

Reminder on Standardization Preview 04:36

Data Processing in a Helper Method Preview 03:38

Reapplying Standardization Preview 05:57

Fixing Standardization Issues Preview 05:36

Massaging Learning Rates Preview 03:15

Moving Towards Multivariate Regression Preview 11:44

Refactoring for Multivariate Analysis Preview 07:28

Learning Rate Optimization Preview 08:04

Recording MSE History Preview 05:21

Updating Learning Rate Preview 06:41

Observing Changing Learning Rate and MSE Preview 04:17

Plotting MSE Values Preview 05:21

Plotting MSE History against B Values Preview 04:22

Batch and Stochastic Gradient Descent Preview 07:17

Refactoring Towards Batch Gradient Descent Preview 05:06

Determining Batch Size and Quantity Preview 06:02

Iterating Over Batches Preview 07:48

Evaluating Batch Gradient Descent Results Preview 05:41

Making Predictions with the Model Preview 07:37

Introducing Logistic Regression Preview 02:27

Logistic Regression in Action Preview 06:31

Bad Equation Fits Preview 05:31

The Sigmoid Equation Preview 04:31

Decision Boundaries Preview 07:47

Changes for Logistic Regression Preview 01:11

Project Setup for Logistic Regression Preview 05:51

Project Download Preview 00:10

Importing Vehicle Data Preview 04:27

Encoding Label Values Preview 04:18

Updating Linear Regression for Logistic Regression Preview 07:08

The Sigmoid Equation with Logistic Regression Preview 04:27

A Touch More Refactoring Preview 07:46

Gauging Classification Accuracy Preview 03:27

Implementing a Test Function Preview 05:16

Variable Decision Boundaries Preview 07:16

Mean Squared Error vs Cross Entropy Preview 05:46

Refactoring with Cross Entropy Preview 05:08

Finishing the Cost Refactor Preview 04:36

Plotting Changing Cost History Preview 03:24

Multinominal Logistic Regression Preview 02:19

A Smart Refactor to Multinominal Analysis Preview 05:07

A Smarter Refactor! Preview 03:44

A Single Instance Approach Preview 09:50

Refactoring to Multi-Column Weights Preview 04:39

A Problem to Test Multinominal Classification Preview 04:37

Classifying Continuous Values Preview 04:41

Training a Multinominal Model Preview 06:19

Marginal vs Conditional Probability Preview 09:56

Sigmoid vs Softmax Preview 06:08

Refactoring Sigmoid to Softmax Preview 04:42

Implementing Accuracy Gauges Preview 02:36

Calculating Accuracy Preview 03:15

Handwriting Recognition Preview 02:10

Greyscale Values Preview 05:11

Many Features Preview 03:29

Flattening Image Data Preview 06:06

Encoding Label Values Preview 05:44

Implementing an Accuracy Gauge Preview 07:26

Unchanging Accuracy Preview 01:55

Debugging the Calculation Process Preview 08:12

Dealing with Zero Variances Preview 06:15

Backfilling Variance Preview 02:36

Handing Large Datasets Preview 04:14

Minimizing Memory Usage Preview 04:50

Creating Memory Snapshots Preview 05:14

The Javascript Garbage Collector Preview 06:49

Shallow vs Retained Memory Usage Preview 05:50

Measuring Memory Usage Preview 08:29

Releasing References Preview 03:14

Measuring Footprint Reduction Preview 03:49

Optimization Tensorflow Memory Usage Preview 01:30

Tensorflow's Eager Memory Usage Preview 04:40

Cleaning up Tensors with Tidy Preview 02:48

Implementing TF Tidy Preview 03:31

Tidying the Training Loop Preview 03:57

Measuring Reduced Memory Usage Preview 01:34

One More Optimization Preview 02:35

Final Memory Report Preview 02:44

Plotting Cost History Preview 04:03

NaN in Cost History Preview 04:18

Fixing Cost History Preview 04:45

Massaging Learning Parameters Preview 01:40

Improving Model Accuracy Preview 04:27

Loading CSV Files Preview 02:06

A Test Dataset Preview 02:00

Reading Files from Disk Preview 03:08

Splitting into Columns Preview 02:54

Dropping Trailing Columns Preview 02:30

Parsing Number Values Preview 03:36

Custom Value Parsing Preview 04:19

Extracting Data Columns Preview 05:35

Shuffling Data via Seed Phrase Preview 05:13

Splitting Test and Training Preview 07:44