The picture of the article comes from GitHub, if the Internet speed is not good, please click me to see the original article.

By the way, take a look at the personal technology site: godbmw.com. Welcome to visit often (^∇^*)

1. Why do you need to learn?

The teacher said in class: traditional algorithms solve deterministic problems, while machine learning solve non-deterministic problems.

Well, that really piqued my interest, so let’s do it systematically.

Machine learning algorithms

There’s a big difference between machine learning algorithms and normal algorithms. It does not require 100 percent accuracy and is mathematically demanding.

I think there are four key points:

  1. Understand algorithm principles
  2. Application Scenario
  3. Conduct a comparative test
  • Comparison of different algorithms
  • Comparison of different parameters of the same algorithm

There are several difficult points:

  1. How to evaluate the algorithm
  2. Solve fit and overfit
  3. How to adjust parameters correctly
  4. How to verify the correctness of the algorithm

3. What problems can be solved?

Some algorithms can handle both classification and regression tasks, and in some cases, regression tasks can be simplified to classification tasks to facilitate problem solving.

3.1 Task Classification

The common classification tasks are 2-category and multi-category tasks, and the two can be transformed.

For example, AlphaGo plays Go, which can be understood as a multi-classification task: it is choosing the points on the board. In addition, the game of pushing boxes: there may be 2-4 directions to choose from, which can also be understood as sorting tasks.

3.2 Multi-label classification

However, in the frontier field of ML, multi-label classification is realized: there is no longer just one category, but multiple labels.

For example, here is an image with multiple labels, which would allow the machine to locate it more accurately:

3.3 Regression task

The machine gets the result as a continuous number of values, not a category. Continuous values can be divided into an infinite number of small points (which can be interpreted as an infinite number of categories), how can they be treated as categories?

4. Algorithm classification

4.1 Supervised Learning

The training data given to the algorithm has been “tagged” or categorized. The trained algorithms can label or categorize new data.

Therefore, training data of supervised learning requires a lot of manpower to mark.

Of course, some tagged data has accumulated in some areas, such as large blogging platforms, which categorize and tag each blog post. At this point, the labor cost of supervised learning is essentially zero.

4.2 Unsupervised learning

The training data given to the machine does not have any “labels,” or categories. The trained algorithm can still label or classify new data.

Clustering analysis is often heard, such as each user is divided into a certain user group by e-commerce platform.

Another very important use is dimensionality reduction of data:

  1. Feature extraction: Extracting important features and removing unimportant features. Prevent noise from affecting feature extraction.
  2. Feature compression: Compress high-dimensional vector into low-dimensional vector without too much damage to data information, such as PCA algorithm. Improve processing speed while ensuring stability.

Another very important use: exception detection. As shown in the figure below. To facilitate the algorithm to find general features and rules.

4.3 Semi-supervised learning

Some data is “tagged” or categorized, while others are not.

At this point, unsupervised learning is generally used to process the data, and then supervised learning is used to train and forecast the model.

4.4 Enhanced learning

Take action based on your surroundings, and then improve your learning behavior based on the results of your actions.

As shown in the figure below, the agent makes our algorithm, when it executes, execute rewards or punishments according to the environmental feedback, and then improve the behavior pattern. The cycle repeats.

And AlphaGo, automatic driving and other foreword robots, are using enhanced learning.

5. More algorithms classification

5.1 Batch learning and online learning

Batch learning means that once the algorithm has trained the model based on data, it will not accept new data to optimize the model. Online learning refers to that in the process of algorithm operation, new data will also be absorbed for model training.

The advantages and disadvantages are obvious. The former is easier to worry about, but it cannot adapt to the scene of rapid data change; The latter can optimize the model for different data in time, but is vulnerable to junk data in new data.

5.2 Nonparametric learning and parametric learning

Parameter learning is to give the data model, the rest of the work is to use the algorithm to find the most appropriate parameters. For example, assuming that the data points fit the model y = Ax + b, all that remains is to find the optimal solution to (a,b) using an algorithm like least square.

Nonparametric learning, on the other hand, does not make too many assumptions about the model and does not understand the problem as learning some parameters.

5. Study materials

  • Python3 introduction to classical algorithms and applications in machine learning
  • Book: Python Machine Learning in Action