我是靠谱客的博主 辛勤荷花,最近开发中收集的这篇文章主要介绍吴恩达Machine Learning笔记-linear regression,gradient descent,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

linear regression

When the target variable that we’re trying to predict is continuous, we call the learning problem a regression problem, when y can take only a small number of discrete values, we call it a classification problem.
在这里插入图片描述
The cost function of linear regression is:
在这里插入图片描述
Our goal is to minimize the cost function.

随机矩阵

随机矩阵实际上应当分成行随机矩阵(Row stochastic matrix)和列随机矩阵(Column stochastic matrix)。行随机矩阵是指方阵的行和等于1;而列随机矩阵就是其列和等于1的非负矩阵。那么同时满足行和列和都是1的非负矩阵就是双随机矩阵(Double stochastic matrix),单位矩阵就是一种双随机矩阵。

Gradient Descent

Imagine that we graph our hypothesis function based on its fields θ0 and θ1​ (actually we are graphing the cost function as a function of the parameter estimates). We are not graphing x and y itself, but the parameter range of our hypothesis function and the cost resulting from selecting a particular set of parameters.

The main steps of Gradient Descent are as follow:
在这里插入图片描述
在这里插入图片描述
The way we do this is by taking the derivative (the tangential line to a function) of our cost function. The slope of the tangent is the derivative at that point and it will give us a direction to move towards. We make steps down the cost function in the direction with the steepest descent. The size of each step is determined by the parameter α, which is called the learning rate.

The direction in which the step is taken is determined by the partial derivative of J(θ0​,θ1​).
在这里插入图片描述

最后

以上就是辛勤荷花为你收集整理的吴恩达Machine Learning笔记-linear regression,gradient descent的全部内容,希望文章能够帮你解决吴恩达Machine Learning笔记-linear regression,gradient descent所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(31)

评论列表共有 0 条评论

立即
投稿
返回
顶部