Browse Source

上传文件至 '第4章'

素材5-6-1
master
刘垚 3 years ago
parent
commit
ce4d9be251
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      第4章/sy5-6-1.py

+ 11
- 0
第4章/sy5-6-1.py View File

@ -0,0 +1,11 @@
from sklearn import _________
true = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
pred = [0, 2, 2, 3, 5, 3, 5, 7, 9, 8]
# (1)计算平均绝对误差MAE
print('MAE: %s' % ______________________) # 计算MAE
# (2)计算均方误差MSE
print('MSE: %s' % ______________________) # 计算MSE
# (3)计算决定系数
print('R^2: %s' % ______________________) # 计算决定系数

Loading…
Cancel
Save