CheeseZH: Stanford University: Machine Learning Ex1:Linear Regression
2015-06-24 10:21
316 查看
(1) How to comput the Cost function in Univirate/Multivariate Linear Regression;
(2) How to comput the Batch Gradient Descent function in Univirate/Multivariate Linear Regression;
(3) How to scale features by mean value and standard deviation;
(4) How to calculate Theta by normal equaltion;
Data1
View Code
(2) How to comput the Batch Gradient Descent function in Univirate/Multivariate Linear Regression;
(3) How to scale features by mean value and standard deviation;
(4) How to calculate Theta by normal equaltion;
Data1
function [theta] = normalEqn(X, y) %NORMALEQN Computes the closed-form solution to linear regression % NORMALEQN(X,y) computes the closed-form solution to linear % regression using the normal equations. theta = zeros(size(X, 2), 1); % ====================== YOUR CODE HERE ====================== % Instructions: Complete the code to compute the closed form solution % to linear regression and put the result in theta. % % ---------------------- Sample Solution ---------------------- theta = pinv(X'*X)*X'*y; % ------------------------------------------------------------- % ============================================================ end
View Code
相关文章推荐
- 6月第3周全球域名注册商(国际域名)新增注册量TOP10
- 戴尔dell服务器如何进入BIOS及恢复BIOS出厂设置
- 一款WP小游戏代码分享
- 操作Ubuntu基础知识
- 如何从Eclipse导入github上的项目源码
- 没有找到MSVCR90D.DLL的简单解决方法
- 分享一个动态生成RDLC报表的类 - thanks
- Digester解析xml文件
- SharePoint 2013 开发——开发并部署webpart
- iOS 9适配系列教程:后台定位
- 信息任务
- dumpsys meminfo 说明
- Python函数式编程指南(一):函数式编程概述
- Xamarin iOS教程之自定义视图
- LAMP工作原理
- Qt中图像的显示与基本操作
- javascript html页面中的内容替换
- UDP服务器端和客户端程序设计
- Mysql远程连接配置
- ios判断是否为iphone6或iphone6plus代码