2020
09-23
09-23
python使用pandas抽样训练数据中某个类别实例
废话真的一句也不想多说,直接看代码吧!#-*-coding:utf-8-*-importnumpyfromsklearnimportmetricsfromsklearn.svmimportLinearSVCfromsklearn.naive_bayesimportMultinomialNBfromsklearnimportlinear_modelfromsklearn.datasetsimportload_irisfromsklearn.cross_validationimporttrain_test_splitfromsklearn.preprocessingimportOneHotEncoder,StandardScalerfromsklearnimportcross_...
继续阅读 >