Skip to content

Commit 7b92f75

Browse files
authored
Update LogisticRegression.md
1 parent 0a10dab commit 7b92f75

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

docs/source/LogisticRegression.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,23 @@ Logistic regression is a statistical analysis method used to predict a data valu
88

99
The dependent variable of logistics regression can be two-category or multi-category, but the two-category is more common and easier to explain. So the most common use in practice is the logistics of the two classifications.
1010

11-
逻辑回归的因变量可以是二分类的,也可以是多分类的,但是二分类的更为常用,也更加容易解释。所以实际中最常用的就是二分类的物流回归。
11+
逻辑回归的因变量可以是二分类的,也可以是多分类的,但是二分类的更为常用,也更加容易解释。
1212

13-
The general steps for regression problems are as follows:
1413

14+
Logistics regression corresponds to a hidden status p through the function trumpetp = S(ax+b), then determine the value of the dependent
15+
variable according to the size of p and 1-p.The function S here is the Sigmoid function:
16+
S(t)=1/(1+e^(-t)
17+
By changing t to ax+b, you can get the parameter form of the logistic regression model:
18+
P(x;a,b) = 1 / (1 + e^(-ax+b))
1519

16-
logistic回归通过函数S将ax+b对应到一个隐状态p,p = S(ax+b),然后根据p与1-p的大小决定因变量的值。这里的函数S就是Sigmoid函数
20+
logistic回归通过函数S将ax+b对应到一个隐状态p,p = S(ax+b),然后根据p与1-p的大小决定因变量的值。这里的函数S就是Sigmoid函数:
21+
S(t)=1/(1+e^(-t)
22+
23+
将t换成ax+b,可以得到逻辑回归模型的参数形式:
24+
P(x;a,b) = 1 / (1 + e^(-ax+b))
25+
26+
![image]
27+
通过函数S的作用,我们可以将输出的值限制在区间[0, 1]上,p(x)则可以用来表示概率p(y=1|x),即当一个x发生时,y被分到1那一组的概率。可是,等等,我们上面说y只有两种取值,但是这里却出现了一个区间[0, 1],这是什么鬼??其实在真实情况下,我们最终得到的y的值是在[0, 1]这个区间上的一个数,然后我们可以选择一个阈值,通常是0.5,当y>0.5时,就将这个x归到1这一类,如果y<0.5就将x归到0这一类。但是阈值是可以调整的,比如说一个比较保守的人,可能将阈值设为0.9,也就是说有超过90%的把握,才相信这个x属于1这一类。
1728
https://www.cnblogs.com/Belter/p/6128644.html
1829

1930

0 commit comments

Comments
 (0)