阅读背景:

python-numpy-相关性、回归、画图-np.polyfit(x,y,deg=1)

来源:互联网 
 
 
from scipy import stats
 
 
# Plot the illiteracy rate versus fertility
_ = plt.plot(illiteracy, fertility, marker='.', linestyle='none')

# Set the margins and label axes
plt.margins(0.02)
_ = plt.xlabel('percent illiterate')
_ = plt.ylabel('fertility')

# Show the plot
plt.show()

# Show the Pearson correlation coefficient
print(# Plot the illi



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: