from sklearn.tree import DecisionTreeClassifier
dt_model = DecisionTreeClassifier(criterion='entropy', random_state=34)
dt_model.fit(x_train, y_train) # 使用训练集训练模型
dt_y_predict = dt_model.predict(x_test)
dt_y_predict

from sklearn.tree import DecisionTreeClassifier
dt_model = DecisionTreeClassifier(criterion='entropy', random_state=34)
dt_model.fit(x_train, y_train) # 使用训练集训练模型
dt_y_predict = dt_model.predict(x_test)
dt_y_predict
本文标题:2018-10-02
本文链接:https://www.haomeiwen.com/subject/amxaoftx.html
网友评论