Logistic Regression
来源:互联网 发布:华彩软件站下载 编辑:程序博客网 时间:2024/06/02 03:10
Logistic Regression
Classification
Classification : y = 0 or 1;
Linear Regression :
Logistic Regression :
使用线性回归算法将不能很好的预测值。
Hypothesis Representation
Logistics Regression Model
Want
Logisitics Function or Sigmoid Function G
Sigmoid Fucntion:
Interpretation of Hypothesis Output
(estimated probability that
Decision boundary
即
Cost Function
逻辑回归不能使用 标准方差方程, 因为 在逻辑回归中
逻辑回归的CostFunction定义如下:
这样定义代价函数, 使得在
而两者与结果相符合时, 代价非常小, 趋于 0。(相等则为0)
Gradient Descent
我们先把
这时候可以求出总的的代价函数
这个时候
可以发现, 和之前的线性回归是一样的。区别就是
Advanced optimization
Optimization algorithm:
-Gradient Descent
-Conjugate Gradient
-BFGS
-L-BFGS
后面三个算法有待学习。。。。
Octave Options
首先写出函数
function [ jVal,gradient ] = advancedOptimizationTest( theta )%ADVANCEDOPTIMIZATIONTEST 此处显示有关此函数的摘要% 此处显示详细说明% J_theta jVal = (theta(1) - 5)^2 +(theta(2)-5)^2; gradient = zeros(2,1); gradient(1) = 2 * (theta(1)-5); gradient(2) = 2 * (theta(2)-5);end
然后就可以使用
options = optimset('GradObj','on','MaxIter','100');initialTheta = zeros(2,1);[optTheta, functionVal, exitFlag] = fminunc(@advancedOptimizationTest, initialTheta, options);
如果有多个
Multi-class classification:One-vs-all
简而言之, 当有多种离散的值要进行处理时, 单独提出他们单独处理。结果即为
- logistic regression
- logistic regression
- logistic regression
- Logistic Regression
- Logistic Regression
- logistic regression
- Logistic Regression
- Logistic Regression
- logistic regression
- Logistic regression
- Logistic Regression
- Logistic Regression
- Logistic Regression
- Logistic Regression
- Logistic Regression
- logistic regression
- logistic Regression
- Logistic regression
- python之回调函数
- UVALive2857 POJ2578 HDU1037 ZOJ2186 Keep on Truckin'【水题】
- 哈希表(开放定址法处理冲突)(1013)
- 量化策略——市盈率策略选股
- Charles配置获取https数据
- Logistic Regression
- 国内固定电话和传真的正则表达式
- 欢迎使用CSDN-markdown编辑器
- DescriptionResourcePathLocationType The superclass "javax.servlet.http.HttpServlet" was not foun
- Python进程池的概念和实现
- 解决安卓的input的弹出的软键盘遮住文本
- https配置与部署
- hdu5890 Find small A 二进制
- C#将数据导入到excel表格中