cost function( 成本函数 ) 在 regression( 回归 ) ( 二 )
来源:互联网 发布:疯狂java讲义精粹pdf 编辑:程序博客网 时间:2024/05/17 21:45
接上文, 本文中讨论其他 regression 中的 不同 cost function.
回顾 Linear regression 中hypothesis function 的 output value 为连续值.
若 input values 是一组判断是否问题的条件. 则 output value 是 .
若 input values 同是一组判断条件, 即 output value 是非连续离散的值 .
先来讨论 时, 选哪个 regression algorithm 及 cost function.
当然可以使用 perception ( 感知机 ) 去解决这种分类问题, 但这里所述以 regression 思想去解决这种二分问题. perception 模型后续会写.
考虑怎么使连续的 input values 映射到 集合中呢?
假设把 input values 通过某一 hypothesis function 使 , 且 映射到 以如下规则:
以 为分界点, 如果 则 , 则 .
如果 ,则 离 1 越近越好,反之 则 离 0 越近越好.
cost function 可以表示为
也可以写成这样一个式子:
使 cost function 值越小 是, 让 等于或无穷接近 .
回想上一文, 其实 .
同样 对 求偏导, ( 求最大斜率, 迭代 )
为了计算方便, 先取对数, 在求偏导.( 过程暂时省略, 稍后会给出 )
- cost function( 成本函数 ) 在 regression( 回归 ) ( 二 )
- cost function( 成本函数 ) 在 regression( 回归 ) ( 一 )
- cost function( 成本函数 ) 在 regression( 回归 ) ( 三 )
- 逻辑回归(代价函数,梯度下降) logistic regression--cost function and gradient descent
- sklearn(scikit-learn) logistic regression loss(cost) function(sklearn中逻辑回归的损失函数)
- logistic回归详解(二):损失函数(cost function)详解
- 损失函数(Loss function)和代价函数(成本函数)(Cost function)的区别与联系
- Logistic Regression:Cost Function by:Ng
- 代价函数 cost function
- Logistic回归:成本函数
- Logistic Regression 的 Cost function 的推倒过程
- Logistic Regression- Maximize Likelihood and Minimize Cost-Function
- 代价函数(目标函数) cost function
- 对线性回归中cost函数选取最小二乘原因理解
- 回归问题中关于cost function 的选择
- 吴恩达深度学习课程笔记 2.3逻辑回归cost function
- 机器学习:代价函数cost function
- 机器学习-3 cost function 代价函数
- linux下cpu参数的参看和说明
- [IOS]Photo应用
- c++写模板的注意事项
- 使用python/casperjs编写终极爬虫-客户端App的抓取
- msm7k平台BT蓝牙驱动移植
- cost function( 成本函数 ) 在 regression( 回归 ) ( 二 )
- OA项目之导入
- Oracle 11.2.0.4.0 Released
- C++ try catch 问题
- 自定义的tablecell,可以有不同大小么
- ThinkPHP 命名范围
- 正则表达式
- 11步成为更优秀的程序员
- 反射中的getDeclaredMethod和getMethod