运行tree.export_graphviz()方法时报错ValueError: Length of feature_names, 4 does not match number of features, ,是方法里的
feature_names参数出问题,feature_names定义的列不包括标签列,而且要和训练集的列数个数相同。
运行tree.export_graphviz()方法时报错ValueError: Length of feature_names, 4 does not match number of features, ,是方法里的
feature_names参数出问题,feature_names定义的列不包括标签列,而且要和训练集的列数个数相同。