What EXACTLY is 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 . Lets 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, Im sure you know how to write this function. To avoid using a specific syntax, lets 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 dont 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! Im talking about a function that we dont need to write ourselves! We show it data, and the thing learns the rules that produce the correct solution. Its the closest thing to magic that I know. 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 dont know anything about biology, human behavior, or our brains, so please, dont @ 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 arent obvious, or there are too many, or they change a lot. Thats where machine learning is a killer solution! Thinking about chess is a good way to illustrate this point. Its easy to write the rules of chess. Its hard to write a program that knows how to beat any chess player. Imagine that you write such a program. 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 everyones butt! Of course, Im making this sound easier than it actually is. Implementing a machine learning system takes a lot of work. Its not harder than writing any other type of code, but it isnt simpler either. Its 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. Theres 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 didnt 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: Theres always a trade-off. If we know how to write the rules, thats usually the best approach. We dont need to worry about data or errors. But if we dont, machine learning might be the answer (but it comes with downsides.) Summary:  Machine learning is powerful.  Its a different way to approach hard problems.  Its really effective. The best thing you can do as a software developer: start incorporating machine learning into your bag of tricks.