MCPcopy Create free account
hub / github.com/Jack-Cherish/Machine-Learning / rssError

Function rssError

Regression/regression.py:126–139  ·  view source on GitHub ↗

函数说明:计算平方误差 Parameters: yArr - 预测值 yHatArr - 真实值 Returns: Website: http://www.cuijiahua.com/ Modify: 2017-12-03

(yArr,yHatArr)

Source from the content-addressed store, hash-verified

124 return inxMat, inyMat
125
126def rssError(yArr,yHatArr):
127 """
128 函数说明:计算平方误差
129 Parameters:
130 yArr - 预测值
131 yHatArr - 真实值
132 Returns:
133
134 Website:
135 http://www.cuijiahua.com/
136 Modify:
137 2017-12-03
138 """
139 return ((yArr-yHatArr)**2).sum()
140
141def stageWise(xArr, yArr, eps = 0.01, numIt = 100):
142 """

Callers 1

stageWiseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected