Machine Learning week 1 note

Machine learning algorithms:

Supervised LearningGiven the “right answer” for each example in the data.

Unsupervised Learning: refers to the problem of trying to find hidden structure in unlabeled data. Since the examples given to the learner are unlabeled, there is no error or reward signal to evaluate a potential solution.

Others: 

         Reinforcement learning:concerned with how an agent ought to take actions in an environment so as to maximize some notion of cumulative reward

         Recommend System


“A computer program is said tolearn from experience E with respect to some task T and some performancemeasure P, if its performance on T, as measured by P, improves with experienceE.”

稍微解释一下 E,T,P

Suppose your email program watches whichemails you do or do not mark as spam, and based on that learns how to betterfilter spam.  What is the task T in thissetting? 

P: The number (or fraction) of emailscorrectly classified as spam/not spam. 

E:Watching you label emails as spamor not spam. 

T:Classifying emails as spam or notspam. 


Linear regression with one variable

Hypothesis:  

Cost Function: 

Goal: 


实验:给定training set (1,1),(2,2), (3,3),观察当theta0 = 0的时候,J(theta0,theta1) 随着 theta1的变化情况



可以发现,J是theta的二次函数,且有全局最小值


实验:给定training set (1,1),(2,2), (3,3),观察J(theta0,theta1) 随着theta0和 theta1的变化情况



Gradient descent

含义为沿着反梯度方向调整theta的值,学习速率为alpha,那么cost function最终会得到最小值。

这里alpha太小会使得学习速率太低,如果alpha太大,又可能无法得到最小值。并且这里,每个theta都是同时进行调整。





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值