Python作业——sklearn Assignment
作业题目综述:
按步骤解题:
步骤1:
代码如下:
运行结果:
步骤2:
代码如下:
出现警告:(DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
"This module will be removed in 0.20.", DeprecationWarning))
运行结果:
步骤3:
代码如下:
(SVC中选择C值为1,随机森林分类中选择n检测值为10)
运行结果:
步骤4:
代码如下:
运行结果: