What exactly is machine learning and how does it work?

381 viewsOtherTechnology

What exactly is machine learning and how does it work?

In: Technology

5 Answers

Anonymous 0 Comments

ML is a pretty general term, and I’m not sure if there is a formal common denominator that defines whether a particular approach can be described as machine learning, but if we use decision trees as an example as it’s one of the simpler forms.

Say you have some existing data about your basketball team’s matches which is neatly organized by 2 columns: Michael Jordan participated, and win/lose.

You write some function that aims to take the existing data (the training data) and find some correlation: If we only look at the times Michael Jordan participated, the team won 51% of the time. You then insert this value into your model, which is just a term for your math function you wrote with pen and paper or a Python script.

Now you can ask your model: If Michael Jordan participates in a match, how likely are they to win?

This is such an oversimplified example that it’s not useful in itself, but now you can start to expand on the function that takes existing, factual data and tries to find some correlation in the information it will receive in the future to predict an unknown result. How this should be done is what you learn by taking a machine learning class.

Anonymous 0 Comments

Machine learning is just trial and error on steroids. A program can try the same process millions of times to find the system that works. You give the program some rules and a goal to achieve and it tries over and over and makes adjustments that get it closer to the goal.

If there is a dot on the left side of the screen and you want it to go to the right side of the screen in the most efficient way possible, a machine learning algorithm would try sending the dot in each direction and it would find that the dot that goes on pixel to the right gets it closer to the goal more efficiently. Then it would do that step over and over again. Pretty quickly it would show you that the fastest way to do it is a straight line to the right. But if you want it to get through a maze or win a game of chess or figure out the stock market, it would have a much more complicated task that would would require a lot more trial and error.

CGP Grey has a good video on machine learning that explains it nicely.

Anonymous 0 Comments

In the 90s, what is now called “machine learning” was once called “statistical learning”. It’s basically an umbrella term for any model that can “learn” as you feed it data – you don’t have to teach it (write code to do what you want it to do), you just tell it how to learn

The simplest archetype of ML is “classifiers”, which take an input (say, a picture) and yield and output (“does this image contain a cat – yes or no”). The non-ML approach is manually writing code to look at all the little criteria in the image and telling the model exactly how to act. The ML approach is writing a structure (such as an SVM or neural network) that can figure it out on its own if you train it with a bunch of images and label the images in the training data as “cat” or “non-cat”; the model starts with its own random set of rules to discriminate between cat images and non-cat images and gradually updates its rules to make more accurate predictions

The big “thing” is that you aren’t updating the model yourself – you tell the model how to learn and it updates itself on its own based on how you “told it how to learn”

If this is interesting to you, the math isn’t too hard, but it does require a strong linear algebra background (and a little calculus)

Anonymous 0 Comments

Machine learning is just a bunch of math that figures out how to get from some input to some output.

For for example, you’ve got an equation 2+5=7. Now, let’s say you don’t know which number you need to add to 2 to get to 7. So you have an equation 2 + X = 7, where “X” is that unknown number.

Machine learning is just running a bunch of mathematical algorithms to figure out what “X” is. If I have a number 2, what do I need to do to it to reach number 7?

So, say you have a bunch of pictures of cats, and a bunch of pictures of churches. You want your computer to be able to recognize which are cats, and which are churches.

A picture is nothing more than a collection of colored pixels arranged in a specific pattern. Those are your inputs. That’s your “2” in the above example. The answer “it’s a cat” or “it’s a church” is your “7”, the output of a machine learning algorithm. And X is something that connects a bunch of pictures to the answer “it’s a cat”.

Machine learning is the computer calculating what “X” needs to be in order to get from the input “2” to the input “7”.

So, in machine learning (one common type at least), you give your computer a bunch of pictures, and you tell the computer which are cats, and which are churches. Then, the computer runs some math and finds some sort of pattern that’s unique to cats vs. churches, so later, it can recognize them. That’s basically you teaching the computer how to discern a cat from a church.

In essence, the computer figures out what “X” is, so later, when you give it a random picture, it can solve the equation ‘picture’ + X = answer

Anonymous 0 Comments

Machine Learning is using known data, feeding it into some sort of classifier that has its parameters tweaked to match that input. Then when you feed it in new data if you didn’t mess up it will be able to classify that new data with a decent degree of accuracy even if it hasn’t been trained on that specific data.

Maybe that classifier is classifying pictures as cats or not cats. Maybe it’s driving a robot car and taking in video and deciding to turn left or right, accelerate or brake, etc.

As for how it works, here’s an example of a relatively simple but powerful classification algorithm.

So say you have lots and red and blue dots on a vertical line. You want to draw a point to separate them as best as you can. You want to do this because there is a pattern to what color the dots are based on position, and when new dots appear you want to figure out if they are probably red or probably blue based on that position.

So say there’s more red dots up top in general. You pick a point, count the dots on both sides. Shift the point up and count again. Shift the point down and count again. One of those directions is a bit better, say up, so you keep shifting the point up till it gets worse. Then you turn around and backtrack slowly till it gets better. Eventually you decide that you are barely moving the point and it’s good enough.

Now you know that if a dot appears above that point it’s probably red, or if its below it’s probably blue.

Of course we aren’t really sorting dots. Instead think of the vertical position as representative of some property like… your blood pressure, and the color red as people who have heart attacks before 60 or something.

But that’s just one property. Say we add in body weight. Now the up and down position of a dot represents blood pressure, the horizontal position represents body weight and you have a 2D plane of dots.

We use 2 parameters to determine the formula for a line (x and y intercept for example) that we tweak just the same as we did the vertical position before.

End result is we have two sections divided by a line that can predict heart attacks.

Add in a third parameter like height. Your dots are now all spread out in a cube, you have 3 parameters to change which determine a plane that slices the cube into two pieces. New combinations of height, blood pressure, and weight will either fall on the heart attack side, or no heart attack side and you can use this to predict again, who is likely to have a heart attack but better.

It gets weird with more dimensions, but you can keep expanding this into n-dimensional cubes separated by hyper planes. When you add tons of different parameters this can end up being surprisingly effective.

And now you have basic machine learning