0
属性とクラスの数、属性とクラスの説明、インスタンスとクラスの数についてのヒストグラムが必要ですが、これはプログラムの新機能ですがこれまでに試したことです。ヒストグラムプロットPython
import numpy as np
import pandas as pd
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
data=pd.read_csv('mushroom')
column=df.'Class'
num_bins = 5
n, bins, patches = plt.hist(column, num_bins, facecolor='blue', alpha=0.5)
plt.show()
これは私のデータは
cap-shape,cap-surface,cap-color,bruises,odor,gill-attachment,gill-spacing,gill-size,gill-color,stalk-shape,stalk-surface-above-ring,stalk-surface-below-ring,stalk-color-above-ring,stalk-color-below-ring,veil-type,veil-color,ring-number,ring-type,spore-print-color,population,habitat,Class
,f,g,f,n,f,c,n,p,e,s,s,w,w,p,w,o,p,k,v,u,p
,f,g,f,n,f,c,n,n,e,s,s,w,w,p,w,o,p,k,y,u,p
x,f,g,f,n,f,w,b,k,t,s,f,w,w,p,w,o,e,n,s,g,e
,f,g,f,n,f,c,n,g,e,s,s,w,w,p,w,o,p,n,y,u,e
x,f,w,f,n,f,w,b,p,t,f,s,w,w,p,w,o,e,n,a,g,e
s,f,n,f,n,f,c,n,n,e,s,s,w,w,p,w,o,p,k,v,u,e
f,f,n,f,n,f,c,n,n,e,s,s,w,w,p,w,o,p,n,v,u,e
x,f,g,f,n,f,c,n,p,e,s,s,w,w,p,w,o,p,n,y,u,e
f,s,g,f,n,f,w,b,n,t,s,f,w,w,p,w,o,e,n,s,g,e
x,f,w,f,n,f,w,b,n,t,f,f,w,w,p,w,o,e,n,a,g,e
x,s,n,f,n,f,w,b,p,t,f,f,w,w,p,w,o,e,k,s,g,e
x,s,w,f,n,f,w,b,h,t,f,s,w,w,p,w,o,e,n,s,g,p
f,f,w,f,n,f,w,b,p,t,f,s,w,w,p,w,o,e,k,s,g,p
x,f,g,f,n,f,w,b,p,t,f,f,w,w,p,w,o,e,n,s,g,e
あなたの質問は何ですか? – Cleb