Logistic regression classifier (logistic Regression Classifier)

Source: Internet
Author: User

Logistic regression (logistic regression) is the most commonly used machine learning method in the industry to estimate the likelihood of something and also to classify it.

in the case of classification, After learning the LR classifier is actually a set of weights w 0,w1,..., wm.  
when enter When testing data in a sample set, this set of weights is calculated in a linear sums with the test data to find a z

z = W0+w1*x1+w2*x2+...+wm*xm. ① (where x1,x2,..., xm is the feature of a sample data, the dimension is m)
Then, according to the form of the sigmoid function, find out:

Σ(z) = 1/(1+exp (z)) . ②

due to sigmoid The definition field of the function is (0, 1) LR classifier is suitable for classifying two kinds of targets. The sigmoid function as the probability density function of the sample data, each sample point, The probability density of >① ② "

The key problem with the LR classifier is to find this set of weights w0,w1,..., wm. This involves The concept of a maximum likelihood estimation of MLE and an optimization algorithm.

First, logistic regression model

what is regression: regression is actually an estimate of the unknown parameters of a known formula. For example, the known formula is y   =   a*x   +   b , unknown parameter is a and b Span style= "font-family: Song Body" >. We now have a lot of real data (training sample), Regression is the use of this data for a b

In fact, the logistic Regression is a linear regression after normalization of the logistic equation, that's all. As for the use of the logistic equation instead of the other, it is because this normalization method is often reasonable, can suppress large and too small results (often noise), to ensure that the mainstream results are not overlooked.

1.1 Logistic regression model

1.2 Maximum likelihood function

1.3 Newton-Raphaeson iterative method
Note: The Spark code implementation of the logistic regression classifier is referenced in the blog: Introduction to spark chapter sixth code part: http://blog.csdn.net/qustqustjay/article/details/46874071

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Logistic regression classifier (logistic Regression Classifier)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.