Season's Savings | ₹5/mo for 3 months

₹199/month after first 3 months. Renews automatically. Terms apply.
MLG 008 Math for Machine Learning cover art

MLG 008 Math for Machine Learning

MLG 008 Math for Machine Learning

Listen for free

View show details
About this listen
The math for machine learning is linear algebra, statistics and calculus, and you can learn it through machine learning instead of before it. Also covers matrices, vectors and tensors, probability and inference, gradient descent, convex optimization, and where to learn each. Links Notes and resources at ocdevel.com/mlg/8 What math do you need for machine learning? Linear algebra, statistics and calculus, and you don't have to learn them first. Intro courses like Andrew Ng's open with a primer on the math they use. Go deeper afterward, or give math 20% of your learning time, one day a week. In cooking terms, linear algebra is chopping vegetables, statistics is the cookbook and calculus is the oven. Linear algebra: matrices and vectors Linear algebra is math on matrices and vectors, the easiest of the three. The house spreadsheet from MLG 004 is a matrix, capital X: rows are houses and columns are features. The learned weights, theta (θ), are a vector, a list of numbers. A prediction multiplies each feature by its weight and adds the results: h(x) = θ₀ + θ₁x₁ + θ₂x₂ + θ₃x₃ Nested Python for loops are too slow for a million rows. Linear algebra does it in one operation, run on a CPU or GPU with SIMD (single instruction, multiple data). What is a tensor? A tensor is a list of numbers with any number of dimensions: 0D: a number1D: a vector2D: a matrix3D: a cube, like an image, whose pixels each hold red, green and blue values TensorFlow is named for it, and it's the core data type of PyTorch, now the most used framework (MLG 010). MLA 005 covers tensor shapes. Statistics: probability and inference Statistics supplies the algorithms and is the hardest of the three. Hypothesis functions (linear and logistic regression) and error functions (mean squared error, log likelihood) are statistics formulas, like the logistic regression cost function: cost = −(1/m) × Σ [ y × log(h(x)) + (1 − y) × log(1 − h(x)) ] Probability describes how data is distributed, like prices in a housing market.Inference predicts a new example, like one house, from that distribution. Calculus: derivatives and gradient descent Calculus does the training. The derivative of the loss function is the slope of the error graph at the current θ values, telling each θ which way is downhill and how big a step to take. Repeating that step is gradient descent (MLG 005). Derivatives mostly come from memorized rules, like the power rule and chain rule. Convex optimization Optimization is the branch of math that uses calculus to minimize a function. Convex means the error graph is shaped like a cup. It's often listed as a fourth prerequisite, but you learn it with calculus. Math courses, textbooks and primers Khan Academy, free: Linear algebra, Statistics and probability, plus Calculus 1, Calculus 2 and Multivariable calculus.Textbooks: Introduction to Linear Algebra by Gilbert Strang, All of Statistics by Larry Wasserman and Calculus: Early Transcendentals by James Stewart.Primers from Stanford's CS229: Linear Algebra Review and Reference (26 pages) and Review of Probability Theory (12 pages). The Great Courses: Mathematical Decision Making Mathematical Decision Making: Predictive Models and Optimization is a 24-lecture video course by Scott P. Stevens on operations research: the math of scheduling employees, train departures and factory settings, very close to machine learning's. It's $49.99 to buy, or streams on The Great Courses Plus. The Great Courses also has calculus, statistics and linear algebra courses, in the resources. They're a supplement: the lecturers narrate what they draw, so the videos work as audio. Convert video files to mp3 has the bash script. Next: MLG 009, on deep learning. If this episode helped, a rating on Apple Podcasts or Spotify helps other learners find the show.
adbl_web_anon_alc_button_suppression_t1
No reviews yet