In previous blogs , I shared the normalization with you (Regularization) The concept of : Keep all the features , But reduce the size of the parameter (Magnitude).

This time , Discuss with you , Normalized linear regression model and normalized logistic regression model .

Let's make one thing clear , Why do some machine learning models need normalization ? There are two answers :

* Normalization can accelerate the step of gradient descent , That is, the speed of obtaining the optimal solution
* Normalization can submit the accuracy of the model We can discuss the specific analysis later , I won't repeat it here .

Normalized linear regression model (Regularized Linear Regression)

We talked about it before , Normalized cost function . The expression of the cost function of linear regression is the same as that of the normalized cost function :

If we use gradient descent algorithm to minimize the cost function , Then the gradient descent algorithm we get will take the following form :( We are not right ø0 Normalization was performed )

For the above algorithm ,j=1,2,3,...n Time , The updated expression can be adjusted :

You can see that , The gradient descent algorithm of normalized linear regression is different from the previous one , Every time the rules are updated based on the original algorithm ø The value of is reduced by an extra value .

alike , If we use the normal equation (Normal Equation) To solve the normalized linear regression model , The expression is as follows :

In the expression , The size of the matrix is n+1*n+1

Normalized logistic regression model (Regularized Logistic Regression)

alike , For logistic regression model , We also add a normalized expression to the cost function , The following expression is obtained :

To get the minimum value of the cost function , By deriving , The expression of gradient descent algorithm is as follows :

notes : It just looks like linear regression , But the hypothetical function here   , So it's different from linear regression .

above , This is the content of the normalized two regression models . thus , We have learned about the machine learning regression model related content is basically involved . One of the most important algorithms in machine learning is discussed below —— neural network (
Neural Network).

©2019-2020 Toolsou All rights reserved,
Image format conversion Count the number of letters (java Language implementation ) Using orthogonal table method to design test cases One is called “ Asking for the train ” A small village Finally got the train VaR - Value at risk - Monte Carlo method - Python How to build data security system ?python: Convert a file to a binary file (binary)vue use vue-clipboard2 Realize the function of copy link 13. solve git Merge conflict uniapp Summary of page value transfer