Santiago Profile picture
21 Jun, 21 tweets, 5 min read
What's machine learning?

Not a framework. Not a different language. Not the latest "cool" thing around the Internet.

Thread: Let me convince you that machine learning is the best thing since sliced bread 🍞.
Let's start with a simple exercise:

"Write a function that returns 0 if a supplied number is even or 1 if the number is odd."

If you are a developer, I'm sure you know how to write this function. It should be simple, right?
To avoid using a specific syntax, let's represent this function as follows:

y = f(X)

Where:
• X → The input number
• y → The result (0 if even, 1 otherwise)
• f → The function that does the work

We can now get to the interesting part.
If you are a programmer, writing this function is simple.

You know the relationship between X (the input number) and y (the output), so you can easily write the rules (the function.)

In machine learning, we don't write the rules. We learn them.
Imagine we had an algorithm that processes many samples (X → y), learns the relationship between them, and comes up with the correct rules.

We call these samples "training data," and they would like like this:

• 2 → 0
• 5 → 1
• 8 → 0
• 4 → 0
• 3 → 1
• ...
Let me stop here for a second.

HOLLY CRAP!

I'm talking about a function that we don't need to write ourselves!

We show it data, and the thing learns the rules that produce the correct solution.

It's the closest thing to magic that I know.
To summarize, look at the attached picture from @fchollet's book.

In classical programming, we have to write the rules to produce the answers.

In machine learning, we start with data + answers (or training data,) and the algorithm returns the rules!
I like to compare machine learning with kids:

They learn the patterns that lead to specific answers by looking at a bunch of examples.

(I don't know anything about biology, human behavior, or our brains, so please, don't @ me explaining why this is a simplistic analogy.)
Getting back to the example...

Nobody should use machine learning to determine whether a number is odd or even.

We understand that problem, and writing a solution is very simple.

But this is not always the case.
Sometimes, the rules of a problem aren't obvious, or there are too many, or they change a lot.

That's where machine learning is a killer solution!

Thinking about chess is a good way to illustrate this point.
It's easy to write the rules of chess. It's hard to write a program that knows how to beat any chess player.

Imagine that you write such a program.

How well do you think it will play? Your knowledge of the game will be a limiting factor.
Instead, machine learning will give us a different possibility:

We can build a program that analyzes millions of games and comes up with the rules to take advantage of any situation.

We can use real games played by the brightest people and kick everyone's butt!
Of course, I'm making this sound easier than it actually is.

Implementing a machine learning system takes a lot of work. It's not harder than writing any other type of code, but it isn't simpler either.

It's different. And powerful.
Recap so far:

y = f(X)

In classical programming, we have to write the function (f). In machine learning, we learn the function (f).

↑ If nothing else, remember this.
There's one more thing:

To learn a function, we need a lot of data.

We also need that data to fully capture the relationship between the input X and the output y.

This is not always the case.
A small change to our representation:

y = f(X) + e

That "e" is called "irreducible error." It covers the case where the training data didn't fully capture the relationship between X and y.

In those cases, the results of the function will be close enough but not perfect.
This brings me to the final idea:

There's always a trade-off.

If we know how to write the rules, that's usually the best approach. We don't need to worry about data or errors.

But if we don't, machine learning might be the answer (but it comes with downsides.)
Summary:

• Machine learning is powerful.
• It's a different way to approach hard problems.
• It's really effective.

The best thing you can do as a software developer: start incorporating machine learning into your bag of tricks.
I post threads like this every week.

Stay tuned as I help you get to the core of practical machine learning.

You can find the rest of my threads here: @svpino.
This is a very good, insightful comment.

Yes, "garbage in" ➝ "garbage out."

I'm so happy this thread is helping a lot of people understand what machine learning is about!

I constantly struggle trying to come up with the right words to describe a really complicated process.

This one did the trick for many 😉

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Santiago

Santiago Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @svpino

20 Jun
My favorite technical book:

Hands-on Machine Learning with Scikit-Learn, Keras & TensorFlow.

If you are looking to buy your first machine learning book, start here: amzn.to/2KPuRAo

Image
Prerequisites to get the most out of this book:

• Python
• NumPy
• Pandas
• Matplotlib

You don't need to be a math expert to read it.
The book is not hard to read.

Most machine learning books over-emphasize math. They are scary, dense, and feel like a puzzle rather than a story.

This is not it.

You can actually go through this one without vomiting first! 🤮
Read 4 tweets
18 Jun
I just went through 200+ applications for a machine learning position.

I think I figured out what works and doesn't in a resume.

Here are a few tips.
The question I want to answer when I read a resume:

• Should I call this person?

Anything that doesn't help me with this decision is working against you.
The most common problem I found when reviewing applications:

Most resumes are 90% noise and 10% signal. People bury relevant details in an ocean of useless information.

Fix this, and you increase your chances significantly.
Read 20 tweets
17 Jun
Here is a simple trick that improves the results of your models.

Best part: You'll surprise your team. Guaranteed.

Thread: What is Test-Time Augmentation, and how you can start using it today.

Let's start with Data Augmentation:

It allows us to artificially increase the size of a dataset without having to collect more data.

Data augmentation is key to improve the performance of our models.
Data augmentation is very popular when working with images.

We can apply different transformations to each image to obtain new samples:

• Cropping
• Rotations
• Flipping
• Zoom

We can then train the model with the augmented dataset and get much better results.
Read 10 tweets
15 Jun
If you are planning to get started with Machine Learning:

My introductory course is on sale:

• 50 copies @ $5, starting right now.
• Free copies for those who can't afford this.

gum.co/kBjbC/five

If you want to support my content, like/retweet this. Everyone wins.
10 copies sold, 40 copies left @ $5.
20 copies sold, 30 copies left @ $5.
Read 11 tweets
15 Jun
Do you know what's holding you back?

The same boring projects than everyone else is working on. How do you break off the mold and make a difference?

Thread: 7 machine learning projects that will teach you the technical skills you need to succeed out there.
Today, companies are dumping insane amounts of money on people with the right skills.

But here we are, showing up with the same "MNIST Digit Recognition" and "Iris dataset" experience.

These are good to start, but you need to take your learning to another level.
The good news for you: Most people can't be bothered.

Most people will bookmark this thread and will never do anything with it.

Even if you do one of these 7 projects, you'll be doing more than 99% of everyone who reads this!

It has never been easier to stand out!
Read 19 tweets
14 Jun
How close are we to building a truly intelligent agent?

Most scientists think we are still decades away, but today, a group of scientists from @DeepMind claims they know how to get there.

Let's talk about what's going on.
What is "Artificial General Intelligence" (AGI)?

An agent capable of learning any intellectual task than a person can also learn.

Today, AI has been limited to systems that can learn particular tasks. A system that can learn anything you teach it, just like a human, is AGI.
Unfortunately, there's no way to build such a general, intelligent agent without formulating a custom solution for every individual task.

This sucks. This doesn't scale. This doesn't get us to AGI.

But maybe we aren't that far off...
Read 16 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(