3.1 Machine Learning Model

3.1 Machine Learning Model

Li Mu

Station B: https://space.bilibili.com/1567748478/channel/collectiondetail?sid=28144
Course homepage: https://c.d2l.ai/stanford-cs329p/

1. Types of machine learning algorithms:

  • Supervised learning: As the name implies, it is to supervise the model to learn. How to supervise, that is, there are correct annotations (labels) in the data set. If the model predicts the wrong sample, then the correct annotation will "tell" the model, and then the model will be corrected later. . The purpose of supervised learning is to let the model learn to find the rules from the correctly labeled data set, and when it encounters an unlabeled sample, it can also correctly predict the result. For example, tasks such as the classification of cats and dogs are supervised learning.

  • Self-supervised learning: Labels are generated from data. For example: word2vec, BERT

  • Semi-supervised learning: The data set consists of two parts, one is labeled data, and the other is unlabeled data. There are generally two tasks: 1. Like supervised learning, it is used to predict labels, but it is possible to use unlabeled data. 2. Predict the label of the unlabeled data, which can be used in data labeling, such as self-training algorithms.

  • Unsupervised learning: There are no labels in the data set, and this type of algorithm is generally not used in the task of predicting labels. For example: clustering algorithm, which divides data into different classes according to the similarity of data. Or estimate the distribution of the data, such as: GAN.

  • Reinforcement learning: An agent interacts with the environment, makes actions based on the observation of the environment, and at the same time receives a feedback reward, and the environment changes and transfers to another state. Continuously interact and modify, the purpose is to maximize the accumulated rewards.

2. Supervised Learning Composition

  • Model Model

The role of the model is to output labels based on the input, that is, to make predictions on this data. For example: in the task of predicting house prices, the model is to predict the price at which the house will be sold based on some information about the house.

  • Loss function Loss

The function is to quantify the gap between the predicted value of the sample and the true value (marked value) of the sample, so as to guide the model to reduce the direct error between the two and better predict the sample.
( predictprice − saleprice ) 2 (predictprice − saleprice)^2(predictpricesaleprice)2

  • optimize the target

That is, in the process of model training, a goal should be optimized to solve the problem we set up. Generally, the optimization goal is to minimize the sum of all prediction losses on the training set.

  • optimization

In fact, it is a process, that is to say, all the hyperparameters in the model that can be learned are constantly updated in this process, and finally the optimization goal can be achieved , which is to minimize the error

3. Supervised learning model

  • decision tree
  • linear model
  • kernel method
  • Neural Networks
    insert image description here

Guess you like

Origin blog.csdn.net/ch_ccc/article/details/129890239