Linear regression loss function
Rate is assumed to Boston example, there is a relationship between the real data
真实关系:真实房子价格 = 0.02×中心区域的距离 + 0.04×城市一氧化氮浓度 +
(-0.12×自住房平均房价) + 0.254×城镇犯罪率
Well now, we are free to specify a relationship (guess)
随机指定关系:预测房子价格 = 0.25×中心区域的距离 + 0.14×城市一氧化氮浓度 +
0.42×自住房平均房价 + 0.34×城镇犯罪
The above-mentioned issues between the actual results and the results of our forecast there will be some errors.
Since the existence of this error, then we will measure up to this error, then the formula is a measure of the error loss function .
Predicted target formula is:
loss formula is defined as: