class sklearn.base.BaseEstimator:为所有的estimators提供基类

方法:

__init__() 初始化方法
get_params(deep=True)

获取这个估计器的参数

Parameters:

deep : boolean, optional

True,将返回该estimator的参数,并包含作为estimator的子对象.

Returns:字符串到任意的映射,参数名称映射到它们的取值.

set_params(**params)

设置这个estimator的参数

class sklearn.base.TransformerMixin:为所有的transformers提供Mixin class 

方法:

__init__() 初始化方法
fit_transform(Xy=None**fit_params)

拟合数据并转换它

Parameters:

X : numpy array of shape [n_samples, n_features]

 y : numpy array of shape [n_samples]

Returns:

X_new : numpy array of shape [n_samples, n_features_new]

class sklearn.base.ClassifierMixin:为所有的classifiers提供Mixin class

__init__() 初始化方法
score(Xysample_weight=None)

返回给定测试数据和标签的平均度量值

Parameters:

X : array-like, shape = (n_samples, n_features)

y : array-like, shape = (n_samples) or (n_samples, n_outputs)

sample_weight : array-like, shape = [n_samples]

class sklearn.base.RegressorMixin:为所有的regression estimators提供Mixin class

__init__() 初始化方法
score(Xysample_weight=None)

Parameters:

X : array-like, shape = (n_samples, n_features)

y : array-like, shape = (n_samples) or (n_samples, n_outputs)

sample_weight : array-like, shape = [n_samples]

class sklearn.base.ClusterMixin:为所有的cluster estimators提供Mixin class

__init__() 初始化方法
fit_predict(Xy=None)

Parameters:

X : ndarray, shape (n_samples, n_features)

Returns:返回聚类的标签

y : ndarray, shape (n_samples,)

sklearn的BaseEstimator、transformerMixin、ClassifierMixin、RegressorMixin、ClusterMixin介绍的更多相关文章

  1. 基于sklearn的 BaseEstimator开发接口:模型融合Stacking

    转载:https://github.com/LearningFromBest/CMB-credit-card-department-prediction-of-purchasing-behavior- ...

  2. sklearn多分类问题

    sklearn实战-乳腺癌细胞数据挖掘(博主亲自录制视频) https://study.163.com/course/introduction.htm?courseId=1005269003& ...

  3. Sklearn 与 TensorFlow 机器学习实战—一个完整的机器学习项目

    本章中,你会假装作为被一家地产公司刚刚雇佣的数据科学家,完整地学习一个案例项目.下面是主要步骤: 项目概述. 获取数据. 发现并可视化数据,发现规律. 为机器学习算法准备数据. 选择模型,进行训练. ...

  4. 机器学习实战 | SKLearn最全应用指南

    作者:韩信子@ShowMeAI 教程地址:http://www.showmeai.tech/tutorials/41 本文地址:http://www.showmeai.tech/article-det ...

  5. 使用sklearn进行数据挖掘-房价预测(4)—数据预处理

    在使用机器算法之前,我们先把数据做下预处理,先把特征和标签拆分出来 housing = strat_train_set.drop("median_house_value",axis ...

  6. 利用Sklearn实现加州房产价格预测,学习运用机器学习的整个流程(包含很多细节注解)

    Chapter1_housing_price_predict .caret, .dropup > .btn > .caret { border-top-color: #000 !impor ...

  7. Hands on Machine Learning with sklearn and TensorFlow —— 一个完整的机器学习项目(加州房地产)

    数据集地址:https://github.com/ageron/handson-ml/tree/master/datasets 先行知识准备:NumPy,Pandas,Matplotlib的模块使用 ...

  8. 利用sklearn的LabelEncoder对标签进行数字化编码

    from sklearn.preprocessing import LabelEncoder def gen_label_encoder(): labels = ['BB', 'CC'] le = L ...

  9. Sklearn库例子——决策树分类

    Sklearn上关于决策树算法使用的介绍:http://scikit-learn.org/stable/modules/tree.html 1.关于决策树:决策树是一个非参数的监督式学习方法,主要用于 ...

随机推荐

  1. Ubuntu:搜狗输入法不能输入中文

    搜狗输入法不能输入中文 问题描述 可以打开搜狗输入法,可以打英文,但是不能切换成中文. 其他输入法正常使用(这个可以判断是不是fcitx是不是出现错误). 有一个关于sogou的内部错误提示 解决方法 ...

  2. Python 字符串的相关操作

    s = "abcdefg" s1 = s.capitalize() # 把首字母变成大写, 返回给你一个新的字符串 print(s) print(s1) s = "ale ...

  3. tensorflow训练打游戏ai

    python3,所需模块请自行补齐 # coding=utf8 import pygame import random from pygame.locals import * import numpy ...

  4. SWIFT Tuple Pattern及Struct Pattern

    定义一个Tuple let color = (1.0,1.0,1.0,1.0) switch color{ case (0.0,0.5...1.0,let blue,_): //匹配第一个值为0.0第 ...

  5. HDU1702:ACboy needs your help again!

    ACboy needs your help again! Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K ( ...

  6. android 自动拨打电话 挂断电话代码

    页面布局文件代码  (  res下面的layout下面的activity_main.xml代码 ) <RelativeLayout xmlns:android="http://sche ...

  7. 实验吧—隐写术——WP之 欢迎来到地狱

    解压压缩包后出现三个文件.jpg .zip .docx 发现图片打开不显示,用winhex打开发现缺少文件头,将jpg的文件头补上 保存后图片可以打开 是一个百度网盘的链接,注意l和1的区别,网盘里是 ...

  8. cf 557D 二分图黑白染色

    题意:给出一个 n 点 m 边的图,问最少加多少边使其能够存在奇环,加最少边的情况数有多少种 奇环和偶环其实就是二分图的性质:二分图不存在奇环,所以只要判断这张图是否是二分图就行了: 如果本身就不是二 ...

  9. systemd学习笔记

    一.systemd介绍 systemd即为system daemon,是linux下的一种init软件与多数发行版使用的System V风格init相比,systemd采用了以下新技术: (1) 采用 ...

  10. day20 python sys os time json pickl 正则

    字符组 : [字符组] 在同一个位置可能出现的各种字符组成了一个字符组,在正则表达式中用[]表示 字符分为很多类,比如数字.字母.标点等等. 假如你现在要求一个位置....9这10个数之一. 量词 几 ...