def test_iris(self):
dataset = load_iris()
score = np.mean(cross_val_score(
DecisionTreeClassifier(tree_type=self.tree_type), dataset.data, dataset.target, cv=10))
print('iris: tree_type: {}, score = {}'.format(self.tree_type, score))
self.assertTrue(score > 0.8)
评论列表
文章目录