码迷,mamicode.com
首页 >  
搜索关键字:.model_selection    ( 116个结果
【算法实践进阶】任务2 特征工程
导入本次任务所用到的包: import pandas as pd import numpy as np from scipy import stats import matplotlib.pyplot as plt from sklearn.model_selection import train_ ...
分类:编程语言   时间:2021-03-06 14:31:47    阅读次数:0
KNN如何对手写数字进行识别(python)
手写数字数据集是个非常有名的用于图像识别的数据集。数字识别的过程就是将这些图片与分类结果0-9一一对应起来。我们可以直接从sklearn中加载自带的手写数字数据集: from sklearn.model_selection import train_test_split from sklearn i ...
分类:编程语言   时间:2020-09-12 21:38:04    阅读次数:45
python决策树
一、CART算法的实现 #encoding:utf-8 from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score from sklearn.tree import D ...
分类:编程语言   时间:2020-08-18 15:46:03    阅读次数:110
sklearn实践(二):决策树
sklearn实践(二):决策树 一、数据处理 继续上次聚类的练习,基于稍作处理的数据,在决策树中,只需划分一下训练集和测试集即可 这里用到的是 sklearn.model_selection.train_test_split() 函数原型:sklearn.model_selection.``tra ...
分类:其他好文   时间:2020-07-12 12:08:46    阅读次数:61
线性回归-预测销售
一、代码 import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import pandas as pd from sklearn.model_selection import train_test_sp ...
分类:其他好文   时间:2020-06-22 23:30:24    阅读次数:91
13-垃圾邮件分类2
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:其他好文   时间:2020-06-14 20:45:45    阅读次数:70
13-垃圾邮件分类2
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:其他好文   时间:2020-05-27 13:40:14    阅读次数:82
13-垃圾邮件分类2
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:其他好文   时间:2020-05-27 09:25:14    阅读次数:77
13-垃圾邮件分类2
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:其他好文   时间:2020-05-25 19:27:04    阅读次数:61
13垃圾邮件分类
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:其他好文   时间:2020-05-25 00:11:01    阅读次数:66
116条   1 2 3 4 ... 12 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!