boren - 机器学习来预测什么时候王者上星耀(不准确,数据量少)

# 菜鸡0  大佬1
# 标准:英雄熟练度(局数)   每分钟金钱数
#       Kill          Die        assist
#       输出伤害      参团率    承伤
import numpy as np
# 数据量小  亿级
wan_jia = np.asarray([[10, 1000, 30, 0, 0, 30000, 0, 0],
                      [20, 900, 8, 2, 5, 8000, 60, 20],
                      [2, 500, 1, 9, 2, 1000, 10, 60],
                      [40, 200, 0, 13, 1, 100, 5, 30]])
cai_da = np.asarray([[1], [1], [0], [0]])
yuce_wanjia= np.asarray([[60,1100,3,0,1,3500,2,0]])
from sklearn import linear_model
moxing=linear_model.LinearRegression()
moxing.fit(wan_jia,cai_da)
yuce_tianshu=moxing.predict(yuce_wanjia)
print(yuce_tianshu)
dafen =moxing.score(wan_jia,cai_da)
print(dafen)


import numpy as np
deng_ji = np.asarray([[0], [6], [12], [24], [40] ])
tian_shu = np.asarray([[0], [1], [2], [5], [11]])

yuce_dengji = np.asarray([[65]])
from sklearn import linear_model
moxing=linear_model.LinearRegression()
moxing.fit(deng_ji,tian_shu)
yuce_tianshu=moxing.predict(yuce_dengji)
print(yuce_tianshu)
dafen =moxing.score(deng_ji,tian_shu)
print(dafen)




# import matplotlib.pyplot as plt
# plt.plot(deng_ji,tian_shu,'bo')
# plt.show()







发布了613 篇原创文章 · 获赞 21 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/houlaos/article/details/105593696