Demo entry 6398991

lu

   

Submitted by anonymous on May 24, 2017 at 16:42
Language: Python 3. Code size: 424 Bytes.

plt.scatter(x_test[:, 0], x_test[:, 1], c=y_test.ravel(), edgecolors='k', s=100, cmap=cm_dark, marker='o')  # 测试数据  
plt.scatter(x[:, 0], x[:, 1], c=y.ravel(), edgecolors='k', s=40, cmap=cm_dark)  # 全部数据  
plt.xlabel(iris_feature[0], fontsize=15)  
plt.ylabel(iris_feature[1], fontsize=15)  
plt.xlim(x1_min, x1_max)  
plt.ylim(x2_min, x2_max)  
plt.grid(True)  
plt.title(u'鸢尾花数据的决策树分类', fontsize=17)  
plt.show()  

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).