美文网首页我爱编程
python机器学习常用模块--Pandas

python机器学习常用模块--Pandas

作者: hao小子 | 来源:发表于2018-03-05 23:29 被阅读0次
  • 使用代码
import matplotlib.pyplot as plt
import numpy as np
from scipy.interpolate import spline

T = np.array([6, 7, 8, 9, 10, 11, 12])
power = np.array([1.53E+03, 5.92E+02, 2.04E+02, 7.24E+01, 2.72E+01, 1.10E+01, 4.70E+00])
xnew = np.linspace(T.min(),T.max(),300) #300 represents number of points to make between T.min and T.max

power_smooth = spline(T,power,xnew)

plt.plot(xnew,power_smooth)
plt.show()

相关文章

网友评论

    本文标题:python机器学习常用模块--Pandas

    本文链接:https://www.haomeiwen.com/subject/nbxcfftx.html