ML Was Hard Until I Learned These 5 Secrets!

Boris Meinardus
27 Mar 202413:10

Summary

TLDRIn this video, the speaker reveals five essential 'secrets' to mastering machine learning, which are often overlooked in traditional education. These secrets include understanding the human ideas behind mathematical formulas, collecting and applying mathematical rules and patterns, recognizing that debugging is a crucial part of coding, effectively navigating large codebases, and maintaining realistic expectations about the time and effort required to master machine learning. The speaker emphasizes that these insights can transform the learning experience, making complex concepts more accessible and manageable over time.

Takeaways

  • 🤔 Understanding math in machine learning is about translating human ideas into mathematical formulas.
  • 🧠 Think like a scientist and not just focus on the math itself.
  • 🔍 Each step in a mathematical derivation is just applying a specific rule or definition.
  • 🛠️ Build a mathematical toolkit of rules and tricks to apply during derivations.
  • 🐍 Coding in machine learning involves a lot of debugging, which is a normal and expected part of the process.
  • 🔧 When dealing with large codebases, start by understanding key files and use debugging to step through the code.
  • 📚 Minimal educational implementations of algorithms can help in understanding the main ideas.
  • 💡 Mastering machine learning takes time and perseverance, not just a few weeks of study.
  • 📈 Practical experience, working on projects, and reading state-of-the-art papers are essential for mastery.
  • ⏳ Having realistic expectations about the time and effort required makes the learning process easier and more enjoyable.

Q & A

  • What is the main issue the speaker faced when starting to learn machine learning?

    -The speaker focused too much on the actual mathematical formulas rather than understanding the human ideas behind them.

  • What is the first secret the speaker reveals about understanding math in machine learning?

    -Think of the idea a human had, understand it, and then think of how to translate it into the language of math, rather than seeing math as something abstract.

  • How does the speaker suggest dealing with complex mathematical derivations?

    -Each step of a mathematical derivation usually applies a specific rule or definition. By recognizing and collecting these rules, you can apply them during derivations.

  • What realization helped the speaker with debugging code?

    -Understanding that debugging is an essential part of coding, not separate from it, and that spending hours debugging is normal and expected.

  • What strategy does the speaker recommend for understanding large codebases?

    -Start with key files like train.py and eval.py, set breakpoints at the beginning, and step through the code with a debugger to gain an overview.

  • What approach should be taken when trying to understand a complex algorithm?

    -Use minimal educational implementations of the algorithm and step through the main function with a debugger to understand the core ideas.

  • What does the speaker identify as a major reason people fail to learn machine learning?

    -People fail because they stop learning too early due to false expectations and not enjoying the learning process.

  • What is the '10,000-hour rule' mentioned by the speaker?

    -The rule suggests that spending 10,000 hours on a specific skill will lead to mastery, indicating that learning machine learning takes significant time and effort.

  • How does having realistic expectations impact the learning process according to the speaker?

    -Realistic expectations help you relax and make the learning process more enjoyable and successful.

  • What is the speaker's final piece of advice for mastering machine learning?

    -Really learn the theory, gather practical experience, and work on projects to encounter real-world problems and read state-of-the-art papers.

Outlines

00:00

🤯 Rethinking Math in Machine Learning

The author discusses the common struggles with understanding math in machine learning, emphasizing the importance of thinking like a scientist rather than focusing solely on mathematical formulas. They highlight that math is a formalization of human ideas and suggest understanding the underlying concepts before delving into the mathematical representations. This approach helps make sense of complex formulas by relating them to familiar programming concepts like loops and conditionals.

05:02

🔍 Breaking Down Mathematical Derivations

This section explains how to handle mathematical derivations in machine learning. The author reveals that each step in a derivation typically applies specific rules or definitions. By collecting a 'toolkit' of these rules and practicing pattern recognition, one can simplify the process of understanding and executing mathematical transformations. The emphasis is on practice and the systematic application of known rules to demystify complex derivations.

10:04

💻 Coding Challenges in Machine Learning

The author addresses the difficulties of learning to code in machine learning, particularly the frustration of debugging. They stress that debugging is an integral part of coding, often taking more time than writing the initial code. Realizing this can alleviate frustration and set realistic expectations. They also mention tools like GitHub Copilot that can assist in coding but highlight the irreplaceable value of personal experience and continuous learning.

🔄 Understanding Large Code Bases

In this section, the author offers strategies for navigating and understanding large machine learning code bases. They recommend starting with key files like 'train.py' and 'eval.py' and using a debugger to step through the code. This method provides an overview of the code structure and helps identify where to implement new features. The author also advises against diving into highly optimized implementations for understanding basic algorithms, suggesting minimal educational implementations instead.

⏳ The Long Journey to Mastering Machine Learning

The final secret emphasizes the importance of perseverance in mastering machine learning. The author argues that many people give up too soon due to false expectations and frustration with the learning process. They share their own journey, including initial failures and eventual successes, to illustrate that mastering machine learning takes time and continuous effort. The author encourages embracing the learning process, working on real-world projects, and engaging with cutting-edge research to achieve mastery.

Mindmap

Keywords

💡Machine Learning

Machine Learning (ML) refers to the field of study that gives computers the ability to learn from data and improve from experience without being explicitly programmed. In the video, it is described as a complex field requiring understanding of both mathematical concepts and coding skills. The speaker discusses the initial challenges faced in learning ML and the realization of key insights that make the learning process more manageable.

💡Mathematical Formulas

Mathematical formulas are expressions using mathematical symbols and operations to represent relationships or principles. The video emphasizes the common mistake of focusing too much on these formulas rather than understanding the underlying human ideas they represent. The speaker suggests thinking about the concepts behind the formulas and then translating these ideas into mathematical language.

💡Intuitive Understanding

Intuitive understanding involves grasping the underlying concepts and ideas in a natural and straightforward manner. The speaker highlights the importance of achieving an intuitive grasp of mathematical concepts in ML, rather than just memorizing formulas. This approach helps learners connect mathematical rules to real-world applications, making the learning process less daunting.

💡Derivations

Derivations in mathematics involve the process of showing how a result or formula is obtained from a set of assumptions or previously known facts. The speaker discusses the initial intimidation caused by complex derivations and explains that these can be broken down into simpler steps by applying specific rules and definitions, which can be learned and recognized through practice.

💡Coding

Coding refers to writing instructions for computers to perform specific tasks. In the context of ML, coding is used to implement algorithms and build models. The video addresses the frustration many learners feel when coding ML models, emphasizing that debugging is a normal part of the process and that persistence is key to overcoming initial challenges.

💡Debugging

Debugging is the process of identifying and fixing errors or bugs in code. The speaker redefines coding to include debugging as an essential part, noting that much of the time spent coding involves resolving issues. This perspective helps learners understand that struggling with bugs is a normal and necessary part of learning to code effectively.

💡Algorithms

Algorithms are step-by-step procedures or formulas for solving problems. In ML, algorithms are used to process data and make predictions. The speaker emphasizes the importance of understanding the human ideas behind algorithms before delving into their mathematical representations, which makes the learning process more approachable.

💡Patterns

Patterns in mathematics and coding refer to recognizable and repeatable sequences or structures. The video suggests that recognizing patterns in mathematical derivations and coding can simplify the learning process. By identifying and applying known rules and definitions, learners can more easily navigate complex problems.

💡GitHub Copilot

GitHub Copilot is an AI-powered code completion tool that helps developers write code by suggesting lines or blocks of code. The speaker mentions it as an invaluable tool for learning and implementing ML models, as it can generate and explain code, thereby assisting learners in overcoming coding challenges.

💡Persistence

Persistence refers to the continued effort to do or achieve something despite difficulties or failures. The video underscores the importance of persistence in mastering ML, as the field is complex and requires significant time and effort to learn. The speaker encourages learners to maintain realistic expectations and enjoy the gradual process of learning and improving.

Highlights

Learning machine learning can be hard, but there are five secrets to make the process easier.

The first secret is to think of math as a human idea rather than abstract formulas.

Understanding math involves translating human ideas into mathematical language.

Components of formulas represent parts of human ideas, like loops and conditionals in code.

The second secret is that mathematical derivations are simpler than they appear.

Derivations are a series of rule applications and definitions.

Collecting a mathematical toolkit helps in recognizing and applying rules during derivations.

The third secret is that coding involves a lot of debugging, not just writing code.

Debugging is an integral part of coding, and it's normal to spend more time debugging than coding.

The fourth secret is understanding large code bases by starting with key files and using a debugger.

Debuggers provide an effective way to step through code and understand complex systems.

For educational purposes, minimal implementations of algorithms are more accessible than optimized versions.

The final secret is that mastering machine learning requires persistence and time, not quick fixes.

False expectations and giving up too early are common reasons why people fail to master machine learning.

Mastery comes after learning fundamentals and gaining experience through projects and papers.

The journey to mastering machine learning is a marathon, not a sprint.

There are three main ways to learn machine learning, and finding the best approach is key.

Transcripts

play00:00

look at all this math and code you need

play00:01

to understand to learn machine learning

play00:04

it can be very hard for me at least it

play00:06

was as well until I learned these five

play00:09

Secrets which honestly aren't even

play00:11

Secrets but no one really teaches you

play00:14

them although everyone should know them

play00:16

I mean I spent the last 3 and a half

play00:19

years studying machine learning and it

play00:21

took me way too long to learn these

play00:23

secrets on my own so let me reveal them

play00:25

to you so that you don't have to

play00:27

struggle for that

play00:28

long

play00:32

you're thinking of math the wrong way

play00:34

around which already sets you up for

play00:36

failure at the very beginning but isn't

play00:38

your fault back when I started learning

play00:40

machine learning some of my professors

play00:43

would simply throw a formula on screen

play00:45

and tell us this is the loss function

play00:47

for a decision tree and that was it I

play00:50

and most other peers were confused and

play00:53

simply stared at the formula and were

play00:55

waiting for a magical aha moment where

play00:59

the formula made sense I was always

play01:01

asking myself how those smart scientists

play01:04

could understand math so well they could

play01:07

develop new algorithms and just think in

play01:09

the language of math until I realized I

play01:12

was thinking the wrong way around I was

play01:15

focusing too much on the actual

play01:16

mathematical formulas in the realm of

play01:19

math instead of taking a step back and

play01:22

thinking like a scientist I mean I was

play01:24

literally looking at a formula and try

play01:26

to understand the formula as a whole

play01:29

which for me now now after learning this

play01:31

secret just doesn't make any sense

play01:33

anymore don't think of math like

play01:35

something abstract and make it then

play01:37

human interpretable you need to realize

play01:40

that you need to think the other way

play01:42

around think of the idea a human had

play01:46

understand it and then think of how to

play01:48

translate it into the language of math

play01:51

this perhaps sounds very confusing but

play01:53

math is not a standalone language in

play01:55

which people think scientists think just

play01:58

like you and me in natural language they

play02:01

just know how to translate their ideas

play02:03

into the formalisms of math which then

play02:06

allows them to be implemented and then

play02:08

further developed using the rules of

play02:10

math as mentioned I was always looking

play02:13

at a formula as a whole but each

play02:15

component of a formula is just a

play02:17

component of this human idea for example

play02:20

a sum or a product are literally just a

play02:22

for Loop that can have some conditions

play02:25

that are literally equivalent to an if

play02:27

else statement in code of course this is

play02:30

easier said than done and to understand

play02:32

a mathematical concept using human ideas

play02:36

requires someone to actually properly

play02:38

teach you these human ideas and how to

play02:40

translate them step by step but in my

play02:43

experience there are two scenarios one

play02:45

the teacher does that already but you

play02:48

don't understand he does it because you

play02:50

were never explicitly taught to think

play02:52

that way or two the teacher does really

play02:54

only look at the formulas and

play02:57

derivations in that case you need to try

play02:59

to figure out the original human idea

play03:01

Yourself by for example looking it up

play03:04

online but the good thing is you now

play03:07

know it is not your fault and there is

play03:09

an intuitive understanding to the math

play03:11

that you can find math is just the

play03:14

formalization of a human idea very few

play03:17

people actually think in the language of

play03:19

math it's just a tool but when it comes

play03:22

to every intermediate derivation step

play03:25

then you often actually think in the

play03:27

language of math which is very difficult

play03:29

unless you know the next

play03:33

secret this secret literally changed the

play03:35

way I look at scary moth derivations

play03:38

like this one again jumping back in time

play03:40

to when I watched a lecture at College

play03:43

my professor would explain the intuitive

play03:45

idea of an ml algorithm show the

play03:47

translation into the language of math

play03:50

and then show us where we want the

play03:52

formula to end up to make it more

play03:54

efficient or simply actually work as an

play03:57

algorithm that can be implemented but at

play03:59

some point he would go off on a

play04:01

derivation spree writing out one step

play04:03

after the other and expected us to

play04:05

understand why he did what he did

play04:08

everyone was confused and of course

play04:10

scared and annoyed but these derivations

play04:14

are simpler than you might think not

play04:16

easy but much simpler to execute after

play04:19

learning this one secret I realized each

play04:22

step was simply applying one specific

play04:25

rule or a definition I realized that up

play04:28

to a certain degree these mathematical

play04:30

derivations or Transformations just

play04:33

require you to have a list of rules and

play04:35

tricks you need to collect that you can

play04:38

then simply apply during the lectures

play04:40

for each step I see I would explicitly

play04:43

look for the rule and definition they

play04:45

used and write that's down on my list

play04:48

when solving or reading math derivations

play04:50

on my own for homework assignments or

play04:52

during an exam in most cases I would

play04:55

literally just do some sort of pattern

play04:57

matching I would look at where I current

play04:59

L am go down my list of rules and

play05:02

definitions and apply what fits the

play05:04

pattern of course some patterns rules

play05:07

and definitions are harder to spot than

play05:09

others but after doing this for long

play05:11

enough you just start to memorize

play05:13

certain patterns but in general for most

play05:16

ml math this secret technique does work

play05:19

wonders you need to collect your

play05:21

mathematical toolkit and learn to

play05:23

recognize when you can apply which rule

play05:26

which means practice practice practice

play05:29

but math is of course far from all there

play05:31

is to ml coding is also a very

play05:34

challenging

play05:36

skill learning the basics of python and

play05:39

then an ml Library like pyo is really

play05:42

cool and fun you simply follow a

play05:44

tutorial online and have a really steep

play05:47

learning curve you follow a recipe of

play05:49

steps and Implement a lot of code you

play05:52

really see and feel the progress you are

play05:54

making but then when you want to go

play05:56

further and learn to implement actual

play05:58

algorithms or ml pipelines on your own

play06:01

you hit a wall all of a sudden you sit

play06:04

on one annoying problem for several

play06:06

hours have written perhaps five lines of

play06:08

code and you think you are not making

play06:11

any progress this is very very

play06:14

frustrating and is the point where a lot

play06:16

of people determine coding is really

play06:19

hard and that they will never be able to

play06:21

really learn to code writing five lines

play06:24

of code in 3 hours how pathetic I mean I

play06:27

always thought I was so stupid for

play06:28

writing code that never worked until I

play06:31

debugged it for hours this can get so

play06:34

bad that you don't even want to start

play06:36

coding because you know it will fail but

play06:39

that is simply the wrong way to think

play06:41

actually writing code for 1 hour will

play06:43

very likely mean let's say 3 hours of

play06:46

debugging once I learned that this is

play06:49

what it really means to be coding I all

play06:51

of a sudden felt so relieved and just

play06:54

not stupid anymore coding ml models

play06:57

didn't feel impossible and hard anymore

play07:00

because I was doing exactly what was

play07:02

normal and expected and nowadays there

play07:04

are amazing tools that I can't live it

play07:07

out like GitHub co-pilot that can

play07:09

generate code for you and explain code

play07:11

for you but there's so much that you

play07:13

simply learn through your own experience

play07:16

or the experience of others that's why I

play07:18

have a completely free Weekly Newsletter

play07:20

where I share my experience as a machine

play07:22

learning researcher including actionable

play07:24

tips AI news and more I'll just pin a

play07:27

comment below with the link to sign up

play07:30

but anyway you have to realize that

play07:33

writing code is not actually coding

play07:35

debugging is coding this realization

play07:38

really helps you with implementing

play07:40

things on your own step by step but when

play07:42

you have to work with an existing code

play07:44

base where you have everything at once

play07:47

you will probably still be overwhelmed

play07:49

so let's look at the next secret

play07:53

tip there are two cases where you will

play07:56

need to understand complex code the

play07:58

first one is when build bu on top of an

play08:00

existing repository I remember when I

play08:02

started working on my first larger

play08:04

project where I built on top of an

play08:06

existing code base it was so much code I

play08:09

literally had no idea where to start

play08:11

just like in the previous secret I again

play08:13

felt like learning to read code was as

play08:16

impossible as writing code all those

play08:19

tutorials and smaller personal projects

play08:21

didn't prepare me for this much code I

play08:23

Tried reading each source file and

play08:25

started to write code as soon as

play08:27

possible into places I thought made

play08:29

sense but that unsurprisingly LEDs to a

play08:32

lot of headaches and wasting time

play08:34

writing code that was destined to fail I

play08:36

had to learn the hard way that there is

play08:39

a very simple strategy to understanding

play08:42

large code bases I wish someone would

play08:44

have simply told me once how to approach

play08:46

a challenge like this with most large ml

play08:49

repositories you have a train.py and an

play08:52

evil. piy file those should always be

play08:54

the starting point I find those files

play08:56

set a breakpoint in the beginning and

play08:58

start stepping through the code with the

play09:02

debugger I cannot emphasize enough how

play09:05

simply yet insanely effective this

play09:07

technique is it's literally like

play09:09

cheating you can step through the data

play09:11

pre-processing training Loop the actual

play09:13

model the evaluation metrics and every

play09:17

other detail depending on the code base

play09:19

and your experience this takes just a

play09:22

few hours and you have an amazing

play09:24

overview of the code base and will have

play09:26

a much better feeling for where to add

play09:29

the new code for your own idea that said

play09:32

you might not always want to build on

play09:34

top of an existing highly optimized code

play09:36

base but simply want to understand an

play09:39

algorithm better for example when you

play09:40

want to understand poo a famous

play09:43

reinforcement learning algorithm I would

play09:45

not recommend to look at the optimized

play09:47

implementation that's way too Overkill

play09:49

and complex luckily for many important

play09:52

models there are minimal educational

play09:54

implementations that just implement the

play09:56

main idea so that people can understand

play09:59

the model and here yet again the best

play10:01

way is to set a breakpoint in the

play10:03

beginning of the main function and then

play10:06

just start debugging finally there's one

play10:08

fundamental secret to mastering machine

play10:10

learning that you need to

play10:15

know this final secret ties everything

play10:18

we just discussed together and is the

play10:20

one reason that will determine your

play10:22

success or failure of mastering ml 34%

play10:26

of organizations consider poor AI skills

play10:29

expertise or knowledge as the top reason

play10:32

blocking successful AI adoption

play10:34

according to an IBM study from 2022 why

play10:37

do you think people fail learning ML and

play10:40

fall into the category of people with

play10:42

poor AI skills is it because it is hard

play10:46

yes but it was also hard for every

play10:48

person who has now mastered it people

play10:50

fail to master ml because they stop

play10:53

learning machine learning too early and

play10:55

give up and why do people give up

play10:58

because they have false expectations and

play11:01

don't enjoy the process of learning they

play11:03

think mastering ml is hard because they

play11:06

didn't learn ml in a few weeks or

play11:08

because they didn't understand a video

play11:10

explaining an ml concept the first time

play11:13

they will never understand it I took my

play11:15

first introductory AI College course

play11:18

about 3 and a half years ago after that

play11:20

semester I took my first real ml course

play11:23

along with working on my first ml

play11:25

projects after that semester I continued

play11:28

with my first deep learning courses and

play11:30

continued working on projects and

play11:32

reading a lot of papers I definitely

play11:35

didn't understand everything the first

play11:37

time but I knew that was normal over

play11:39

time I learned the secrets mentioned

play11:41

before and that somewhat mastering ml

play11:44

takes time I failed my first ml

play11:46

interviews for internships at Amazon

play11:48

nuro and Google deep mind but now I am

play11:51

working with an ex meta professor and

play11:54

collaborating with a Google deepmind

play11:56

researcher it takes time period this is

play12:00

not a skill you learn over a weekend the

play12:02

10,000 hour rule applies here as well if

play12:05

you spend 10,000 hours on a specific

play12:07

skill you will master I'm absolutely not

play12:10

trying to discourage you rather the

play12:12

opposite I don't want to be some weird

play12:14

influencer that wants to sell you a

play12:16

dream of mastering ml in a few weeks I

play12:19

want to encourage you to really learn

play12:21

machine learning to really learn the

play12:22

theory and really gather practical

play12:25

experience and the Mastery of machine

play12:28

learning comes after after learning the

play12:29

Fundamentals by really working on

play12:31

projects encountering real world

play12:33

problems and reading real

play12:35

state-of-the-art papers or respective

play12:38

blog posts by having this expectation

play12:40

that it will take time you relax way

play12:43

more and the learning process becomes

play12:45

much easier enjoyable and successful in

play12:48

the end all these secrets are

play12:50

universally true no matter how you

play12:52

decide to learn machine Lear and I say

play12:54

that because there are mainly three ways

play12:55

to do so and if you want to find out

play12:58

which one is best for you you might want

play13:00

to watch this video next I there talk

play13:02

about data science but everything

play13:04

applies the same way to machine learning

play13:06

in

play13:07

general

play13:09

bye-bye

Rate This

5.0 / 5 (0 votes)

Связанные теги
Machine LearningLearning SecretsMath ApproachCoding SkillsDebugging TipsML AlgorithmsEducational InsightsExpertise BuildingML FundamentalsSkill Mastery
Вам нужно краткое изложение на английском?