Machine Learning with Javascript

Machine Learning with Javascript
Machine Learning with Javascript
English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 17.5 Hours | 10.7 MB

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

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
Table of Contents

What is Machine Learning
1 Getting Started – How to Get Help
2 Solving Machine Learning Problems
3 A Complete Walkthrough
4 App Setup
5 Problem Outline
6 Identifying Relevant Data
7 Dataset Structures
8 Recording Observation Data
9 What Type of Problem

Algorithm Overview
10 How K-Nearest Neighbor Works
11 Gauging Accuracy
12 Printing a Report
13 Refactoring Accuracy Reporting
14 Investigating Optimal K Values
15 Updating KNN for Multiple Features
16 Multi-Dimensional KNN
17 N-Dimension Distance
18 Arbitrary Feature Spaces
19 Magnitude Offsets in Features
20 Feature Normalization
21 Lodash Review
22 Normalization with MinMax
23 Applying Normalization
24 Feature Selection with KNN
25 Objective Feature Picking
26 Evaluating Different Feature Values
27 Implementing KNN
28 Finishing KNN Implementation
29 Testing the Algorithm
30 Interpreting Bad Results
31 Test and Training Data
32 Randomizing Test Data
33 Generalizing KNN

Onwards to Tensorflow JS!
34 Let’s Get Our Bearings
35 Creating Slices of Data
36 Tensor Concatenation
37 Summing Values Along an Axis
38 Massaging Dimensions with ExpandDims
39 A Plan to Move Forward
40 Tensor Shape and Dimension
41 Elementwise Operations
42 Broadcasting Operations
43 Logging Tensor Data
44 Tensor Accessors

Applications of Tensorflow
45 KNN with Regression
46 Reporting Error Percentages
47 Normalization or Standardization
48 Numerical Standardization with Tensorflow
49 Applying Standardization
50 Debugging Calculations
51 What Now
52 A Change in Data Structure
53 KNN with Tensorflow
54 Maintaining Order Relationships
55 Sorting Tensors
56 Averaging Top Values
57 Moving to the Editor
58 Loading CSV Data
59 Running an Analysis

Getting Started with Gradient Descent
60 Linear Regression
61 Answering Common Questions
62 Gradient Descent with Multiple Terms
63 Multiple Terms in Action
64 Why Linear Regression
65 Understanding Gradient Descent
66 Guessing Coefficients with MSE
67 Observations Around MSE
68 Derivatives!
69 Gradient Descent in Action
70 Quick Breather and Review
71 Why a Learning Rate

Gradient Descent with Tensorflow
72 Project Overview
73 More on Matrix Multiplication
74 Matrix Form of Slope Equations
75 Simplification with Matrix Multiplication
76 How it All Works Together!
77 Data Loading
78 Default Algorithm Options
79 Formulating the Training Loop
80 Initial Gradient Descent Implementation
81 Calculating MSE Slopes
82 Updating Coefficients
83 Interpreting Results
84 Matrix Multiplication

Increasing Performance with Vectorized Solutions
85 Refactoring the Linear Regression Class
86 Reapplying Standardization
87 Fixing Standardization Issues
88 Massaging Learning Rates
89 Moving Towards Multivariate Regression
90 Refactoring for Multivariate Analysis
91 Learning Rate Optimization
92 Recording MSE History
93 Updating Learning Rate
94 Refactoring to One Equation
95 A Few More Changes
96 Same Results Or Not
97 Calculating Model Accuracy
98 Implementing Coefficient of Determination
99 Dealing with Bad Accuracy
100 Reminder on Standardization
101 Data Processing in a Helper Method

Plotting Data with Javascript
102 Observing Changing Learning Rate and MSE
103 Plotting MSE Values
104 Plotting MSE History against B Values

Gradient Descent Alterations
105 Batch and Stochastic Gradient Descent
106 Refactoring Towards Batch Gradient Descent
107 Determining Batch Size and Quantity
108 Iterating Over Batches
109 Evaluating Batch Gradient Descent Results
110 Making Predictions with the Model

Natural Binary Classification
111 Introducing Logistic Regression
112 Encoding Label Values
113 Updating Linear Regression for Logistic Regression
114 The Sigmoid Equation with Logistic Regression
115 A Touch More Refactoring
116 Gauging Classification Accuracy
117 Implementing a Test Function
118 Variable Decision Boundaries
119 Mean Squared Error vs Cross Entropy
120 Refactoring with Cross Entropy
121 Finishing the Cost Refactor
122 Logistic Regression in Action
123 Plotting Changing Cost History
124 Bad Equation Fits
125 The Sigmoid Equation
126 Decision Boundaries
127 Changes for Logistic Regression
128 Project Setup for Logistic Regression
129 Project Download
130 Importing Vehicle Data

Multi-Value Classification
131 Multinominal Logistic Regression
132 Sigmoid vs Softmax
133 Refactoring Sigmoid to Softmax
134 Implementing Accuracy Gauges
135 Calculating Accuracy
136 A Smart Refactor to Multinominal Analysis
137 A Smarter Refactor!
138 A Single Instance Approach
139 Refactoring to Multi-Column Weights
140 A Problem to Test Multinominal Classification
141 Classifying Continuous Values
142 Training a Multinominal Model
143 Marginal vs Conditional Probability

Image Recognition In Action
144 Handwriting Recognition
145 Backfilling Variance
146 Greyscale Values
147 Many Features
148 Flattening Image Data
149 Encoding Label Values
150 Implementing an Accuracy Gauge
151 Unchanging Accuracy
152 Debugging the Calculation Process
153 Dealing with Zero Variances

Performance Optimization
154 Handing Large Datasets
155 Tensorflow’s Eager Memory Usage
156 Cleaning up Tensors with Tidy
157 Implementing TF Tidy
158 Tidying the Training Loop
159 Measuring Reduced Memory Usage
160 One More Optimization
161 Final Memory Report
162 Plotting Cost History
163 NaN in Cost History
164 Fixing Cost History
165 Minimizing Memory Usage
166 Massaging Learning Parameters
167 Improving Model Accuracy
168 Creating Memory Snapshots
169 The Javascript Garbage Collector
170 Shallow vs Retained Memory Usage
171 Measuring Memory Usage
172 Releasing References
173 Measuring Footprint Reduction
174 Optimization Tensorflow Memory Usage

Appendix Custom CSV Loader
175 Loading CSV Files
176 Splitting Test and Training
177 A Test Dataset
178 Reading Files from Disk
179 Splitting into Columns
180 Dropping Trailing Columns
181 Parsing Number Values
182 Custom Value Parsing
183 Extracting Data Columns
184 Shuffling Data via Seed Phrase