'max_features_;,
'max_leaf_nodes',
'min_impurity_split',
'min_samples_leaf',
'mi',
'mi_fra_leaf',
'n_classes_',
'ures_',
'n_outputs_',
'predict',
_proba',
'predict_proba',
'presort',
'random_state',
'score',
'set_params',
'splitter',
'transform',
'tree_']
下面开始进行蘑菇分类。本书提供的蘑菇数据如表3-5所示,包含样本编号和特征属性,其中第一行是类别标记及属性名称,第一列为样本编号。
表3-5
该表共包含8123条数据,特征属性共有22个,这些属性及其对应的取值含义如下所示。
类别标记:
毒蘑菇,poisonous,p
可食用,edible,e
特征属性及取值
1。cap-shape:bell=b,ivex=x,flat=f,knobbed=k,sunken=s
2。cap-surface:fibr,scaly=y,smooth=s
3。cap-color:brown=n,buff=b,=c,gray=g,green=r,pink=p,purple=u,red=e,=y
4。bruises:bruises=t,no=f
5。odor:almond=a,ae=c,fishy=y,foul=f,musty=m,no=p,spicy=s
6。gill-attat:attached=a,desg=d,free=f,not
7。gill-spag:close=c,crowded=>
8。gill-size:broad=b,narrow=n
9。gill-color:bla=n,buff=b,chocreen=r,e=o,pink=p,purple=u,red=e,=y
10。stalk-shape:eapering=t
11。stalk-root:bulbous=b,club=c,cup=u,equal=e,rhizomorphs=z,r=?
12。stalk-surface-ab:fibrous=f,scaly=y,silky=k,smooth=s
13。stalk-surface-bel:fibrous=f,scaly=y,silky=k,smooth=s
14。stalk-col:brown=n,buff=b,=c,gray=g,e=o,pie=w,yellow=y