self_example/TensorFlow_eaxmple/matplotlib_try/pylot.py

13 lines
437 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import numpy as np
import pylab
import scipy.stats as stats
data = np.mat([[1, 200, 105, 3, False], [2, 165, 80, 2, False],
[3, 184.5, 120, 2, False], [4, 116, 70.8, 1, False], [5, 270, 150, 4, True]])
coll=[]
for row in data:
coll.append(row[0,1])
#scipy是专门的机器学习的数据处理包probplot计算了coll数据集中数据在正态分布下的分离程度
stats.probplot(coll,plot=pylab)
pylab.show()