What is machine learning and why you should care about it?
Let me try to convince you: ↓
2. Let's start with a simple programming 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.
3. To simplify things, let's represent this function as follows:
y = f(X)
Where:
• X → The input number
• y → The result (0 if even, 1 if odd)
• f → The function that does the work
We can now get to the interesting part.
4. In this example, we know the relationship between the input number (X) and the output (y).
Writing the function that turns X into y is straightforward.
But what happens if that's not the case?
5. What happens if writing the rules to turn X into y is not a simple task?
If we use machine learning we don't need to write the rules; we can learn them!
This is its fundamental advantage.
6. Here are a few examples where the rules to turn X into y aren't obvious:
• Predict tomorrow's temperature.
• Predict a missing word in a sentence.
• Determine whether an image shows a dog or a cat.
Do you see why these are difficult to implement?
7. Imagine we have samples showing the relationship between X and y.
In the exercise where we want to determine if a number is even or odd, the samples could look like these:
• 2 → 0
• 5 → 1
• 8 → 0
• 3 → 1
We call these samples "training data."
8. With machine learning we can process all of that training data and have the algorithm produce the correct rules for us.
Let that sink in for a second.
With machine learning, we can "learn" what the rules are! We show the algorithm some data, and get the rules back!
9. The attached image from @fchollet's book is a good summary of this idea.
In classical programming, we have to write the rules to produce the answers.
In machine learning, we start with data and answers, and the algorithm gives us the rules.
10. Think about how we—humans—learn:
We look at things, learn patterns, and then generalize those ideas whenever we see something similar.
(Of course, this is a coarse representation of how we learn, but it's a good analogy that helps understand the magic of machine learning.)
11. There is one more idea that I want you to keep in mind:
Despite the power of machine learning, there are trade-offs.
The most obvious one: to do a good job at learning the rules, we need a lot of data.
But not only that.
12. Unless the data we show the algorithm perfectly captures the relationship between X and y without any noise, we can only get an approximation of the results.
Let's illustrate this with a small change to our function.
13. Here is a small change to the function:
y = f(X) + e
See that "e"? It's called "irreducible error." This error is because the training data is not perfect.
Now the output "y" is close enough: an approximation of the actual result.
14. Let's wrap up.
Machine learning gives us access to solve problems that would be very hard to solve with classical programming.
When used inappropriately, we may introduce more noise than what it's worth.
But when it works, it's as close to magic as you could imagine.
15. As a takeaway:
Machine learning is a powerful way to approach otherwise intractable problems.
My recommendation is that, as a software developer, you 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.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
For one second, let's forget the idea of a central database.
Imagine a product that doesn't store your data. Instead, you keep that information. You allow others to use it at your convenience and close it whenever you want to.
Let's talk about one example. ↓
2. Think about those people that have built excellent profiles using @kaggle.
They have participated in many competitions, shared their knowledge, and built impressive curriculums.
What would happen if Kaggle decides to ban them?
3. This is not science fiction.
Every single company out there can ban you if they decide to do so.
Maybe it is justified, maybe it isn't, but that's beyond the point.