plutolove’s diary

I love three things in this world, the sun, the moon and you. The sun for the day, the moon for the night, and you forever。

ML

Logistic Regression

ML

逻辑回归模型(二分类): 代价函数cost function为: 同样通过梯度下降算法计算最小的cost来得到参数,迭代多次直到收敛 每次迭代参数更新:

Linear Regression

ML

線性迴歸模型:$h_\theta(x) = \theta * x$ 參數$\theta = (\theta_0, \theta_2, ..., \theta_n)$ Cost Function爲:$J(\theta) = \frac{1}{2} \sum_i \left( h_\theta(x^{(i)}) - y^{(i)} \right)2$ m爲訓練集的大小,解線性迴歸模型即就是求出最小的Cost F…