What is the relationship between machine learning, artificial intelligence, and deep learning?
1956 year proposes AI concept, just after 3 years (1959) Arthur Samuel The concept of machine learning is proposed:
Field of study that gives computers the ability to learn without being explicitly programmed.
Machine learning studies and builds a special algorithm (Not a specific algorithm), allowing the computer to learn in the data to make predictions.
Therefore,Machine learning is not a specific algorithm, but a general term for many algorithms.
Machine learning involves many different algorithms, and deep learning is one of them. Other methods include decision trees, clustering, Bayesian, and so on.
Deep learning is inspired by the structure and function of the brain, the interconnection of many neurons. Artificial neural networks (ANNs) are algorithms that mimic the structure of brain biology.
Whether it is machine learning or deep learning, it belongs to the category of artificial intelligence (AI). So artificial intelligence, machine learning, and deep learning can be represented by the following diagram:
Learn more about artificial intelligence:What is "2019 Update" for artificial intelligence? (The essence of AI + development history + limitations)"
Learn more about deep learning:A text to understand deep learning (verbal explanation + 8 advantages and disadvantages + 4 typical algorithm)"
What is machine learning?
Before explaining the principle of machine learning, I will introduce the most basic ideas to everyone, understand the most essential things of machine learning, and make better use of machine learning. At the same time, this problem-solving thinking can also be used for work and life. in.
The basic idea of machine learning
- Abstract the problems in real life into mathematical models, and clearly understand the role of different parameters in the model
- Solve this mathematical model by mathematical methods to solve real-life problems
- Evaluating this mathematical model, is it really solving the problems in real life and how is it solved?
No matter what algorithm is used, what kind of data is used, the most fundamental ideas can't escape the above 3 step!
When we understand this basic idea, we can find out:
Not all problems can be converted into mathematical problems. There is no way to solve the real problem AI that has no way to convert. At the same time, the most difficult part is to convert the real problem into a mathematical problem.
Principle of machine learning
Let's take the supervision study as an example to explain the implementation principle of machine learning.
If we are teaching children to literate (1, 2, 3). We will first take out the 3 card, and then let the children see the card, saying "a horizontal line is one or two horizontal lines is two or three horizontal lines is three."
Repeat the above process, the children's brain is constantly learning.
When the number of repetitions is enough, the children learn a new skill - know Chinese characters: one, two, three.
We use the above human learning process to analogize with machine learning. Machine learning is very similar to the human learning process mentioned above.
- The card mentioned above is called in machine learning - training set
- The above-mentioned "one horizontal line, two horizontal lines" is a property that distinguishes different Chinese characters.
- The process of children's continuous learning is called - modeling
- Learned the law that was summed up after literacy - the model
Through the training set, constantly identifying features, continuously modeling, and finally forming an effective model, this process is called "machine learning"!
Supervised learning, unsupervised learning, and intensive learning
Machine learning can be roughly divided into 3 categories based on training methods:
- Supervised learning
- Unsupervised learning
- Reinforcement learning
In addition, you may have heard of "semi-supervised learning", but those are based on the above variants of the 3 class, the essence has not changed.
Supervised learning means that we give the algorithm a data set and give the correct answer. The machine uses data to learn how to calculate the correct answer.
We have prepared a lot of photos of cats and dogs, and we want the machine to learn how to recognize cats and dogs. When we use supervised learning, we need to label these photos.
The label we give to the photo is the "correct answer", and the machine learns to recognize cats and dogs in new photos through extensive learning.
This way of helping machine learning through a lot of manual tagging is to supervise learning. This learning method works very well, but the cost is also very high.
In unsupervised learning, there is no "correct answer" for a given data set, and all data is the same. The task of unsupervised learning is to mine out the underlying structure from a given data set.
We give a bunch of pictures of cats and dogs to the machine, don't label these photos, but we want the machine to sort the photos.
Through learning, the machine will divide these photos into 2 categories, all of which are photos of cats, all of which are photos of dogs. Although the results of supervised learning above seem similar, there are essential differences:
In unsupervised learning, although the photos are divided into cats and dogs, the machine does not know which one is a cat and which is a dog. For the machine, it is equivalent to divided into two categories, A and B.
Reinforcement learning is closer to the essence of biological learning, so it is expected to gain higher intelligence. It focuses on how agents can take a series of actions in the environment to get the most cumulative return. Through reinforcement learning, an agent should know what state of action should be taken.
The most typical scene is playing games.
2019 1 Month 25 Day, AlphaStar (Google's artificial intelligence program, using intensive learning training) The professional players "TLO" and "MANA" who have abused StarCraft.News link
7 steps for machine learning
Through the above content, we have some vague concepts about machine learning. At this time, we will be particularly curious: how to use machine learning?
Machine learning is divided into 7 steps in the actual operation level:
- Data collection
- data preparation
- Choose a model
- Parameter adjustment
- Forecast (beginning)
Suppose our task is to distinguish between red wine and beer by alcohol and color. Here is a detailed description of how each step in machine learning works.
Step 1: Collecting data
We bought a bunch of different kinds of beer and red wine in the supermarket, and then bought a spectrometer to measure color and equipment for measuring alcohol.
At this time, we mark all the wines we bought with his color and alcohol, which will form the following form.
This step is very important because the quantity and quality of the data directly determine the quality of the prediction model.
Step 2: Data Preparation
In this example, our data is very neat, but in the actual situation, the data we collect will have many problems, so it will involve data cleaning and other work.
When there is no problem with the data itself, we divide the data into 3 parts: training set (60%), validation set (20%), and test set (20%) for later verification and evaluation.
There are a lot of tips on the data preparation part. If you are interested, you can check outThe most common 6 big problem in AI dataset (with solution)"
Step 3: Select a model
Researchers and data scientists have created many models over the years. Some are very suitable for image data, some are very suitable for sequences (such as text or music), some for digital data, and some for text-based data.
In our case, since we only have 2 features, color and alcohol, we can use a small linear model, which is a fairly simple model.
Step 4: Training
Most people think that this is the most important part, but it is not the case. The quantity and quality of the data, as well as the choice of the model, are more important than the training itself (3 minutes on the training desk, and more importantly the 10 year. Gong).
This process does not require people to participate, the machine can be completed independently, the whole process is like doing arithmetic problems. Because the essence of machine learning isThe process of turning a problem into a mathematical problem and then solving the math problem.
Step 5: Evaluation
Once the training is complete, you can assess whether the model is useful. This is where our previously set validation sets and test sets come into play. The indicators evaluated mainly include accuracy rate, recall rate and F value.
This process allows us to see how the model predicts the numbers that have not yet been seen. This means representing the performance of the model in the real world.
Step 6: Parameter adjustment
After completing the assessment, you may wish to know if you can further improve your training in any way. We can do this by adjusting the parameters. When we train, we implicitly assume some parameters, and we can adjust the parameters to make the model perform better.
Step 7: Forecast
The 6 steps above are all for this step. This is also the value of machine learning. At this time, when we buy a bottle of new wine, just tell the machine his color and alcohol, he will tell you that the beer is still red wine.
There is a video on YouTube that introduces these 7 steps. The 7 Steps of Machine Learning(Requires Internet Science)
15 classic machine learning algorithmner">
|Linear regression||Supervised learning|
|Logistic regression||Supervised learning|
|Linear discriminant analysis||Supervised learning|
|Decision tree||Supervised learning|
|Naive Bayes||Supervised learning|
|K proximity||Supervised learning|
|Learning vector quantization||Supervised learning|
|Support Vector Machines||Supervised learning|
|Random forest||Supervised learning|
|Gaussian mixture model||Unsupervised learning|
|Limit Boltzmann machine||Unsupervised learning|
|K-means clustering||Unsupervised learning|
|Maximum expectation algorithm||Unsupervised learning|
Baidu Encyclopedia + Wikipedia