用法:
class mxnet.metric.MSE(name='mse', output_names=None, label_names=None)
- name:(
str
) - 此度量實例的名稱用於顯示。 - output_names:(
list of str
, or
None
) - 使用update_dict 更新時應使用的預測名稱。默認情況下包括所有預測。 - label_names:(
list of str
, or
None
) - 使用update_dict 更新時應使用的標簽名稱。默認情況下包括所有標簽。
- name:(
參數:
計算均方誤差 (MSE) 損失。
均方誤差由下式給出
例子:
>>> predicts = [mx.nd.array(np.array([3, -0.5, 2, 7]).reshape(4,1))] >>> labels = [mx.nd.array(np.array([2.5, 0.0, 2, 8]).reshape(4,1))] >>> mean_squared_error = mx.metric.MSE() >>> mean_squared_error.update(labels = labels, preds = predicts) >>> print mean_squared_error.get() ('mse', 0.375)
相關用法
- Python mxnet.metric.MAE用法及代碼示例
- Python mxnet.metric.MCC用法及代碼示例
- Python mxnet.metric.F1用法及代碼示例
- Python mxnet.metric.TopKAccuracy用法及代碼示例
- Python mxnet.metric.CompositeEvalMetric用法及代碼示例
- Python mxnet.metric.create用法及代碼示例
- Python mxnet.metric.RMSE用法及代碼示例
- Python mxnet.metric.CrossEntropy用法及代碼示例
- Python mxnet.metric.CustomMetric用法及代碼示例
- Python mxnet.metric.np用法及代碼示例
- Python mxnet.metric.Accuracy用法及代碼示例
- Python mxnet.metric.PCC用法及代碼示例
- Python mxnet.metric.Perplexity用法及代碼示例
- Python mxnet.metric.PearsonCorrelation用法及代碼示例
- Python mxnet.metric.NegativeLogLikelihood用法及代碼示例
- Python mxnet.module.BaseModule.get_outputs用法及代碼示例
- Python mxnet.module.BaseModule.forward用法及代碼示例
- Python mxnet.module.BaseModule.bind用法及代碼示例
- Python mxnet.module.BaseModule.init_params用法及代碼示例
- Python mxnet.module.BaseModule.get_params用法及代碼示例
- Python mxnet.module.BaseModule.set_params用法及代碼示例
- Python mxnet.module.BaseModule.update用法及代碼示例
- Python mxnet.module.SequentialModule.add用法及代碼示例
- Python mxnet.module.BaseModule.iter_predict用法及代碼示例
- Python mxnet.module.BaseModule.save_params用法及代碼示例
注:本文由純淨天空篩選整理自apache.org大神的英文原創作品 mxnet.metric.MSE。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。