逻辑回归

Logistic 回归延伸了多元线性回归思想,即因变量是二值(为了方便起见通常设这些值为 0 和 1)的情形。

和在多元线性回归中一样,自变量 x1 , x2 ,..., xk 也许是类别变量或连续变量或是两种类型的混合。


Logistic regression

Pros: Computationally inexpensive, easy to implement, knowledge representation
easy to interpret
Cons: Prone to underfitting, may have low accuracy

Works with: Numeric values, nominal values


This instantaneous step is sometimes difficult to deal with.
There’s another function that behaves in a similar fashion, but it’s much easier to deal
with mathematically. This function is called the sigmoid.  sigmoid函数,即 f(x)=1/(1 exp(-x)) ,sigmoid looks like a step function.


如何使用:

For the logistic regression classifier we’ll take our features and multiply each one
by a weight and then add them up. This result will be put into the sigmoid, and we’ll
get a number between 0 and 1. Anything above 0.5 we’ll classify as a 1, and anything
below 0.5 we’ll classify as a 0. You can also think of logistic regression as a proba-
bility estimate.


你可能感兴趣的:(datamining)