Introduction to machine learning much said, though I no regular but also in science and engineering major, training of machine learning the exhaustive method of this algorithm is of interest, and, after all, the truth of the universe is composed of mathematics thought in mathematics and physics this discipline is the foundation of human development, but brain not enough use, not much said, This column is the output of my daily learning summary. At present, machine learning is mainly about Ng’s videos.

1. Supervised learning

As an important part of machine learning, supervised learning is simply given a data set, which includes the corresponding y results, y= F (x)y= F (x)y= F (x)y= F (x)y= F (x)y= F (x)y= F (x)y= F (x)y= F (x)y= F (x)y= F (x)y= F (x)y= F (x)y= F (x)y= F (x)y= F (x)y= F (x)y= F (x). The classic one is probably linear regression.

2. Unsupervised learning

Unsupervised learning is also a form of training in machine learning. Unlike supervised learning, which requires tagging data, unsupervised learning does not. Unsupervised learning is mostly used in classification and dimension reduction scenarios. It has three characteristics:

  • There is no need to label the data
  • There is no clear purpose
  • It is impossible to quantify the training results

3. Cost function

In supervised learning, there are of course good and bad models established by machine learning. How to evaluate the model in order to determine the best model is needed to solve the cost function. The purpose of the cost function is to find the function of the optimal solution.

3.1 Principle of cost function

For example, the prediction function

There are two parameters in there

The cost functions are θ0 and θ1, and the change of parameters will lead to the change of function. So the value of the prediction function relative to the real result y, using the squared error cost function as an example

The principle of the squared error cost function is to take the difference between the value given by the actual data and the value of the fitting function,At the same time, in order not to make this value be affected by individual data and produce large fluctuations, we take half of similar variance to reduce the influence of extreme data.

Therefore, the optimal solution is the minimum value of the cost function, θ0 and θ1