machine learning definition

Machine learning is essentially to let the computer learn the rules in the data by itself, and predict the future data according to the obtained rules. Machine learning includes algorithms such as clustering, classification, decision trees, Bayesian, neural networks, deep learning, etc.

The basic idea of machine learning is to imitate the process of human learning behavior. For example, our new problems in reality are generally summed up through experience and rules, so as to predict the future process. The basic process of machine learning is as follows:

The basic process of machine learning

The history of machine learning

From the perspective of the development process of machine learning, the timeline of its development is as follows:

The development process of machine learning started from the Turing test in the 1950s and the checkers program developed by Samuel, marking the official entry of machine learning into the development period.

Development almost stagnated from the mid-1960s to the late 1970s.

The introduction of the idea of multi-parameter linear programming (MLP) using neural network backpropagation (BP) algorithm training in the 1980s brought machine learning into a period of renaissance.

The "decision tree" (ID3 algorithm) proposed in the 1990s, and later the support vector machine (SVM) algorithm, transformed machine learning from a knowledge-driven approach to a data-driven approach.

At the beginning of the 21st century, Hinton proposed deep learning (Deep Learning), which made machine learning research from a downturn into a booming period.

Since 2012, with the increase in computing power and the support of massive training samples, deep learning has become a hot research topic in machine learning, and has driven a wide range of applications in the industry.

machine learning classification

After decades of development, machine learning has derived many classification methods, which can be divided into supervised learning, semi-supervised learning, unsupervised learning and reinforcement learning according to different learning modes.

Supervised learning

Supervised learning is to learn a model from labeled training data, and then use the model to predict its label for a given new data. If the classification label accuracy is higher, the learned model is more accurate and the prediction result is more accurate.

Supervised learning is mainly used for regression and classification.

Common supervised learning regression algorithms include linear regression, regression tree, K-proximity, Adaboost, neural network, etc.

Common supervised learning classification algorithms include Naive Bayes, decision tree, SVM, logistic regression, K-neighbor, Adaboost, neural network, etc.

Semi-Supervised Learning Semi-Supervised Learning (Semi-Supervised Learning) is a learning model using a small amount of labeled data and a large amount of unlabeled data. Semi-supervised learning focuses on adding unlabeled samples to supervised classification algorithms to achieve semi-supervised classification.

Common semi-supervised learning algorithms include Pseudo-Label, Π-Model, Temporal Ensembling, Mean Teacher, VAT, UDA, MixMatch, ReMixMatch, FixMatch, etc.

Unsupervised learning Unsupervised learning is the process of finding hidden structure in unlabeled data. Unsupervised learning is mainly used for association analysis, clustering and dimensionality reduction.

Common unsupervised learning algorithms include Sparse Auto-Encoder, Principal Component Analysis (PCA), K-Means (K-means), and DBSCAN (Density-Based SpaTIal Clustering of ApplicaTIons with Noise). ), the maximum expectation algorithm (ExpectaTIon-MaximizaTIon algorithm, EM) and so on.

Reinforcement learning (Reinforcement Learning) is similar to supervised learning, but does not use sample data for training, and is a model of learning through continuous trial and error.

In reinforcement learning, there are two objects that can interact: the agent (Agnet) and the environment (Environment), and there are four core elements: policy (Policy), reward function (reward signal, Reward Function), value function ( Value Function) and Environment Model, where the Environment Model is optional.

Reinforcement learning is often used in application scenarios such as robot obstacle avoidance, chess and card games, advertising, and recommendation.

In order to facilitate the reader's understanding, gray dots represent data without labels, and dots in other colors represent labeled data in different categories. The schematic diagrams of supervised learning, semi-supervised learning, unsupervised learning, and reinforcement learning are as follows:

The way to apply machine learning

Machine learning is the process of abstracting real problems into mathematical models, using historical data to train data models, then solving new data based on data models, and converting the results into answers to real-world problems. The general application implementation steps of machine learning are as follows:

Abstract real problems into mathematical problems;

data preparation;

select or create a model;

Model training and evaluation;

forecast result;

Here we take a competition Cats vs. Dogs (cats and dogs) on Kaggle as an example for a brief introduction. Those who are interested can experiment by themselves.

1. Real problems are abstracted into mathematical problems

Real-world problem: Given a picture, let the computer judge whether it is a cat or a dog?

Mathematical problem: binary classification problem, 1 means that the classification result is a dog, and 0 means that the classification result is a cat.

2. Data preparation data download address:

https://www.kaggle.com/c/dogs-vs-cats。

Download the kaggle cat and dog dataset and decompress it into 3 files train.zip, test.zip and sample_submission.csv.

The train training set contains 25,000 pictures of cats and dogs, half of which are cats and dogs, and each picture contains the picture itself and the picture name. The naming rules are named according to "type.num.jpg".

Example of training set

test The test set contains 12,500 pictures of cats and dogs, and it is not marked whether it is a cat or a dog. The naming rules of each picture are named according to "num.jpg".

Test set example

sample_submission.csv needs to write the test results of the final test set into a .csv file.

sample_submission example

We divide the data into 3 parts: training set (60%), validation set (20%), test set (20%), which are used for later validation and evaluation work.

3. Select a model

There are many models in machine learning. Which model needs to be selected needs to be comprehensively considered according to the type of data, the number of samples, and the problem itself.

If this problem mainly deals with image data, you can consider using the Convolutional Neural Network (CNN) model to achieve two-classification, because one of the advantages of choosing CNN is to avoid the pre-processing process of the image (extracting features, etc.) . The convolutional neural network structure for cat and dog recognition is as follows:

The bottom layer is the input layer of the network, which is used to read in the image as the data input of the network; the top layer is the output layer of the network, which is used to predict and output the type of the read image. Distinguish cats and dogs, so there are only 2 neural computing units in the output layer; those located between the input and output layers are called Hidden Layers, also called Convolutional Layers, and 3 are set here. hidden layer.

4. Model training and evaluation

We pre-set the loss value calculated by the loss function Loss, and evaluate the training model through the accuracy rate. The loss function LogLoss is used as a model evaluation indicator:

Accuracy is a measure of how accurate the algorithm predicts the results:

TP (True Positive) is the number of results that predict a positive class as a positive class.

FP (False Positive) is the number of results predicting a negative class as a positive class.

TN (True Negative) is the number of results that predict the negative class as a negative class.

FN (False Negative) is the number of results predicting a positive class as a negative class.

Loss and accuracy during training

5. Predict the outcome

After the trained model, we load an image, recognize it, and see the recognition effect:

Machine Learning Trend Analysis

The real research and development of machine learning should start in the 1980s. With the help of the AMiner platform, the development trend chart generated by statistical analysis of machine learning papers in recent years is as follows:

It can be seen that Deep Neural Network, Reinforcement Learning, Convolutional Neural Network, Recurrent Neural Network, Generative Model, Image Classification Classification), Support Vector Machine, Transfer Learning, Active Learning, and Feature Extraction are hot research topics in machine learning. The research on deep learning-related technologies represented by deep neural networks and reinforcement learning has risen rapidly, and it is still a research hotspot in recent years. Finally, to quote a sentence from Han Yu's "Jin Xue Xie":

"Industry is good at diligence, and waste is in play; action is achieved in thinking, and destruction is in obedience."

Reviewing Editor: Li Qian