
The course outline covers non-personalized and collaborative filtering, matrix factorization, and deep learning applications with Python and Keras, including autoencoders and restricted Boltzmann machines.
Access the course code on GitHub by cloning the repository with git clone, avoid forks to stay updated, and use the Movielens data with rating.csv for hands-on coding.
Ask questions through the Q&A, meet prerequisites, and engage hands-on with both conceptual and coding lectures to stay engaged and master the exercises.
Explore non-personalized recommenders based on population behavior, emphasizing popularity and confidence intervals; apply Bayesian and supervised learning methods, and examine Markov models like PageRank for ranking items.
Survey real-world recommender systems used by billion-dollar companies, including the Bayesian bandit method, PageRank, and Reddit and Hacker News algorithms, and note testing challenges with actual users.
Develop basic intuitions for recommender systems by examining popularity as a simple, business-driven approach and its limitations across age, locale, and varied user tastes.
Explore product associations using context to guide recommendations, such as pairing an iPhone with a case. Explain lift, P(A|B), independence, and simple sql with ab testing for practical use.
Explore how Hacker News ranks links and comments by the popularity-to-age ratio, using gravity and penalty rules to emphasize newer, linked content.
Examine Reddit’s ranking method, including the log of the net votes and the age term, and note how upvotes, downvotes, and recency shape recommendations.
Explore how to rank items with ratings using confidence intervals, compare average rating versus lower bound via Wilson's interval, extend to five-star ratings, and apply upvote/downvote semantics.
Explore smoothing of average ratings with mu0 and lambda to handle zero ratings. Examine the explore-exploit dilemma in recommender systems, Bernoulli rewards, p-hat, and a Bayesian perspective.
Explore Bayesian ranking for recommender systems, treating click-through rate as a distribution and using Thompson sampling to balance exploration and exploitation while updating with user data.
Apply supervised learning to recommender systems using demographics and product attributes in a feature vector to predict purchases or ratings, noting privacy concerns and latent variable models like matrix factorization.
Explore Google's PageRank approach and how Markov models rank pages by modeling web surfing as state transitions. Learn about transition matrices, bigrams, and add-one smoothing to ensure nonzero probabilities.
Explore how PageRank uses Markov models to model web pages as states, compute the state distribution with the Google matrix, and explain damping and stationary distribution via Perron-Frobenius.
Evaluate ranking in recommender systems by linking revenue, clicks, and impressions to user behavior from deployment and A/B testing, and recognize that no single ranking is universally correct.
Explore non-personalized recommender systems and feeds from Reddit, Hacker News, and Amazon. Link these problems to supervised learning, Bayesian methods, and Markov models across interfaces and ads.
The lecture presents a suggestion box to collect feedback and improve the course by inviting input on background, course difficulty, missing explanations, and topics like CNNs and transformers.
Explore collaborative filtering in Python by modeling the user-item rating matrix, distinguishing sparse data, and predicting user-specific scores with regression and mean squared error evaluation.
Explore user-user collaborative filtering, predicting ratings by deviations from each user’s bias, weighted by Pearson correlation or cosine similarity, and using k-nearest neighbors to speed up predictions.
Practice a collaborative filtering exercise using the Movielens 20M dataset, coding a simple similarity-based predictor and evaluating it with mean squared error on train and test sets.
Prepare the rating data by zero-based user IDs and indexing movie IDs. Shrink the data to active users and movies, then build user-to-movie, movie-to-user, and rating dictionaries.
Explore user-user collaborative filtering in python by building a simple, data-driven predictor using averages, deviations, and pearson-based weights, then evaluate with mean squared error on train and test sets.
Learn item-item collaborative filtering and its relation to user-user filtering, using Pearson correlation to find similar items and predict ratings with neighborhood-based scoring for faster, accurate recommendations.
Explore item-item collaborative filtering in code, comparing with user-based filtering, computing item weights with Pearson correlation, selecting neighbors, and evaluating predictions via train and test MSE.
Apply common sense to choose the right model by weighing accuracy, maintainability, and training time, through three practical quizzes; decide what makes sense for your business.
To solve the cold start problem, use simple, data-free or Bayesian methods and collect data by asking users to rate items during sign-up or from data brokers.
Explore how math and programming underpin recommender systems, and learn when to code, use APIs like Spark for matrix factorization, or hire experts to implement solutions.
Explore matrix factorization for recommender systems, modeling a sparse ratings matrix and predicting scores S_ij. Implement the model from theory, then extend to Keras and probabilistic and bayesian variants.
Explore matrix factorization by decomposing the user-item matrix into W and U to predict ratings via dot products, using sparse representations and latent features for dimensionality reduction with small k.
Train a matrix factorization model to approximate the ratings matrix with two factor matrices W and U, updated alternately via alternating least squares.
Expand matrix factorization with mu, a global mean, plus user bias and movie bias to capture rating deviations and improve predictions.
Regularize the matrix factorization model to prevent overfitting in sparse ratings using the frobenius norm, and derive update formulas for user, item, and bias terms for implementation in Python.
Practice matrix factorization for recommender systems in Python by loading data, initializing w, b, u, c, and mu; train until convergence, plot cost, and report train and test MSE.
Examine how SVD relates to matrix factorization by decomposing X into U, S, and V, with truncation yielding a compact N by M approximation, handling bias and missing values.
Model a probabilistic matrix factorization with a Gaussian random matrix and learn via maximum likelihood. Show how MAP estimation with Gaussian priors yields regularized matrix factorization and a Bayesian view.
Explore the bayesian approach to matrix factorization in recommender systems, treating all variables as distributions, deriving the posterior, and using gibbs sampling and monte carlo methods for predictions.
Re-implement matrix factorization in Keras using user and movie embeddings, dot-product predictions, and optional biases, with gradient descent training and connections to word embeddings.
Build matrix factorization models in Keras for recommender systems, using user and movie embeddings, biases, and gradient descent, with data loading, model construction, and evaluation.
Extend recommender systems in Python by replacing matrix factorization with a deep neural network that uses concatenated user and item feature vectors from embeddings for regression with a single output.
Convert Keras script into a deep neural network by flattening user and movie embeddings, concatenating to a 2K feature vector, then dense layers with batch normalization and dropout for ratings.
Extend a recommender model with residual learning inspired by residual networks and inception to learn non-linear residuals of matrix factorization, fused with a deep network in Keras.
Implement a residual learning model that merges matrix factorization with a neural network branch in Keras, then evaluate whether residuals improve recommendations in Python.
Explore autoencoders for recommender systems, focusing on the AutoRec approach that fills in missing ratings using denoising and masking, with sparse matrices and batch generators.
Implement auto rec in code by preprocessing ratings data, building a two-layer autoencoder, and training with a custom masked loss to predict missing ratings.
Dive into restricted Boltzmann machines for collaborative filtering in recommender systems, built from scratch in TensorFlow within a deep learning context for Python.
Introduce the restricted Boltzmann machine, a two-way neural network with visible and hidden layers and a shared weight matrix. Explain Bernoulli units, sampling, and connections to autoencoders and MNIST.
Explore the theoretical motivation for restricted Boltzmann machines by linking the energy function to a probabilistic model with visible and hidden units, equilibrium distribution, and the partition function.
Examine why the RBM joint distribution is intractable, highlighting exponential time for Bernoulli vectors (784 and 100) and the enormous partition function with Mnist data.
Show how energy and probability in a restricted Boltzmann machine lead to neural network equations, deriving p(h|v) as the sigmoid of W·v plus bias via Bayes rule.
Train an rbm through maximum likelihood, addressing intractable sums with free energy, and apply gradient descent using the positive and negative phases to improve the model likelihood.
Continue training an rbm using contrastive divergence with one step of Gibbs sampling. Approximate the gradient by the difference of free energy between v and v prime, using automatic differentiation.
Explore computing the free energy for training a Bernoulli rbm, moving from intractable to a tractable expression with the sum-product rule, and prepare to implement your own rbm.
Extend Bernoulli RBM to recommender systems by using a categorical visible layer with ten rating categories and softmax, enabling proper handling of missing ratings and probabilistic predictions.
Implement an RBM for recommender systems in Python, detailing a custom one-hot encoding approach to handle 3D input, missing ratings, and softmax-based rating prediction.
Use custom tensor dot operations to sum over d and k when multiplying V by W, yielding H shape n by m and output shape n by d by k.
Walk through implementing a tf-based rbm, detailing data loading, building the rbm with w, b, c, and training with Adam while plotting train and test error.
Speed up RBM code by moving one-hot encoding, masking, and dot-product computations into TensorFlow, eliminating numpy preprocessing and improving runtime.
Learn to perform matrix factorization on Spark for big data using distributed computing, and set up Spark locally or on an EC2 cluster with Hadoop, MapReduce, and data frames.
Learn to set up Spark locally across macOS, Ubuntu, and Windows workflows by installing Java, Scala, and Spark (or PySpark via pip) and testing with the Spark shell.
Learn to run a Python Spark job with spark submit, creating a spark context and coordinating a local master. Grasp the overhead and memory considerations when processing large gzipped datasets.
Set up a spark cluster on aws using spark ec2, create key pair and credentials, launch master and slaves, run the job, then terminate to avoid costs.
Learn to use Spark for real world predictions, serving content via an API while batch Spark jobs feed a database, with mean squared error evaluation and fallback when jobs fail.
Learn how Keras, a high level library built on top of piano and TensorFlow and also Cmtc, simplifies building deep neural networks with dense and activation layers.
learn to build a Keras neural network in code with a sequential model, two hidden layers, relu activations, and softmax output, including data prep, compilation, and training with history plots.
Learn to build networks with the Keras functional api by creating input and dense layers, using activation, constructing a model with inputs and outputs, and training with compile and fit.
Learn to convert Keras code to TensorFlow 2.0 with minimal changes, using the built-in Keras API and updating imports from Keras to TensorFlow Keras, illustrated by a text classification CNN.
Apply the central limit theorem to treat mu_hat as Gaussian, derive a 95% confidence interval using z-scores, and extend to Bernoulli with p_hat.
Explains conjugate priors for a Gaussian likelihood, mu and tau, using precision instead of variance. Shows how the posterior mu and tau evolve with data, converging to the sample mean.
Explore the bayesian approach to ranking items for recommender systems, covering preparation steps, probability basics, maximum likelihood, bernoulli, beta and gaussian distributions, and prerequisites for deeper learning.
Explore the Bayesian approach to the explore-exploit dilemma using a beta distribution and conjugate priors. Update the prior into the posterior with data to enable online learning.
uses Bayesian approach to model the Bernoulli win rate as a random variable, and samples from its posterior to rank items, balancing exploration and exploitation.
Explore Bayesian inference with Gaussian likelihoods for recommender systems, modeling mu and precision, applying conjugate priors, updating posteriors, and drawing samples for ranking.
Explore a Bayesian bandit approach with beta priors and Bernoulli outcomes to rank articles by clickthrough rate, using posterior sampling to balance exploration and exploitation in recommender systems.
Believe it or not, almost all online businesses today make use of recommender systems in some way or another.
What do I mean by “recommender systems”, and why are they useful?
Let’s look at the top 3 websites on the Internet, according to Alexa: Google, YouTube, and Facebook.
Recommender systems form the very foundation of these technologies.
Google: Search results
They are why Google is the most successful technology company today.
YouTube: Video dashboard
I’m sure I’m not the only one who’s accidentally spent hours on YouTube when I had more important things to do! Just how do they convince you to do that?
That’s right. Recommender systems!
Facebook: So powerful that world governments are worried that the newsfeed has too much influence on people! (Or maybe they are worried about losing their own power... hmm...)
Amazing!
This course is a big bag of tricks that make recommender systems work across multiple platforms.
We’ll look at popular news feed algorithms, like Reddit, Hacker News, and Google PageRank.
We’ll look at Bayesian recommendation techniques that are being used by a large number of media companies today.
But this course isn’t just about news feeds.
Companies like Amazon, Netflix, and Spotify have been using recommendations to suggest products, movies, and music to customers for many years now.
These algorithms have led to billions of dollars in added revenue.
So I assure you, what you’re about to learn in this course is very real, very applicable, and will have a huge impact on your business.
For those of you who like to dig deep into the theory to understand how things really work, you know this is my specialty and there will be no shortage of that in this course. We’ll be covering state of the art algorithms like matrix factorization and deep learning (making use of both supervised and unsupervised learning - Autoencoders and Restricted Boltzmann Machines), and you’ll learn a bag full of tricks to improve upon baseline results.
As a bonus, we will also look how to perform matrix factorization using big data in Spark. We will create a cluster using Amazon EC2 instances with Amazon Web Services (AWS). Most other courses and tutorials look at the MovieLens 100k dataset - that is puny! Our examples make use of MovieLens 20 million.
Whether you sell products in your e-commerce store, or you simply write a blog - you can use these techniques to show the right recommendations to your users at the right time.
If you’re an employee at a company, you can use these techniques to impress your manager and get a raise!
I’ll see you in class!
NOTE:
This course is not "officially" part of my deep learning series. It contains a strong deep learning component, but there are many concepts in the course that are totally unrelated to deep learning.
"If you can't implement it, you don't understand it"
Or as the great physicist Richard Feynman said: "What I cannot create, I do not understand".
My courses are the ONLY courses where you will learn how to implement machine learning algorithms from scratch
Other courses will teach you how to plug in your data into a library, but do you really need help with 3 lines of code?
After doing the same thing with 10 datasets, you realize you didn't learn 10 things. You learned 1 thing, and just repeated the same 3 lines of code 10 times...
Suggested Prerequisites:
For earlier sections, just know some basic arithmetic
For advanced sections, know calculus, linear algebra, and probability for a deeper understanding
Be proficient in Python and the Numpy stack (see my free course)
For the deep learning section, know the basics of using Keras
For the RBM section, know Tensorflow
WHAT ORDER SHOULD I TAKE YOUR COURSES IN?:
Check out the lecture "Machine Learning and AI Prerequisite Roadmap" (available in the FAQ of any of my courses, including the free Numpy course)
UNIQUE FEATURES
Every line of code explained in detail - email me any time if you disagree
No wasted time "typing" on the keyboard like other courses - let's be honest, nobody can really write code worth learning about in just 20 minutes from scratch
Not afraid of university-level math - get important details about algorithms that other courses leave out