机器学习——吴恩达 week3

机器学习——吴恩达 week3

1:  logistic regression:

    hypothesis:

        0<h<1, 表示条件概率,sigmoid函数

    decision boundary:

        theta' * x表示边界。

    cost function:

        y=1,h=0 cost=无穷;y=0,h=1 cost=无穷; y=1,h=1 cost=0; y=0,h=0 cost=0;

    gradient descent:

        与linear regression 形式相同,只不过cost function不同

    advanced optimization   :

        用fminunc速度更快,需要提前构造cost function函数,提供cost function和偏导数的计算方法。

     multiclass classification: one vs all

2:  Regularization—过拟合问题:

     特征太少 underfit/high bias

     特征太多 overfit 

     If we have too many features, the learned hypothesis may fit the training set very well (cost function约等于0 ), but fail         to generalize to new examples (predict prices on new examples).

     可以理解为高阶项越多,对数据集拟合越好。但对新数据预测性能可能会变差。

     Regularization 方法:降低theta的大小,在cost function 中加入theta1....thetan的平方的和,注意不包括theta0

     normal equation不再存在不可逆的问题。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值