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. 2018-2019-2 《网络对抗技术》Exp0 Kali安装 Week1 20165202

    2018-2019-2 <网络对抗技术>Exp0 Kali安装 Week1 20165202 一.下载 虚拟机环境 Kali所需要虚拟机软件为VMware,在之前其他课程中使用的即为VMw ...

  2. L240

    Giant rocks from space are falling from the sky more than they used to, but don't worry. For the pas ...

  3. Linux内核参数优化记录

    //fs.file-max 最大打开文件数 //fs.nr_open=20480000 单个进程允许打开的文件句柄上限 //信号量及共享内存,可以使用ipcs -l来获取 //kernel.sem 信 ...

  4. ASIHTTPRequest缓存策略download cache

    本文为大家介绍了iOS开发ASIHTTPRequest使用download cache的内容,其中包括cache策略,存储策略,其他cache相关的特性,编写自己的cache等等内容. 从1.8版本开 ...

  5. macOS 使用brew安装mysql,客户端连接不上

    macos 使用brew安装mysql8.0后,使用mysql官方的workbench连接不上,出现√ mysql8.0 Authentication plugin 'caching_sha2_pas ...

  6. tensorflow中常用学习率更新策略

    神经网络训练过程中,根据每batch训练数据前向传播的结果,计算损失函数,再由损失函数根据梯度下降法更新每一个网络参数,在参数更新过程中使用到一个学习率(learning rate),用来定义每次参数 ...

  7. magento如何改变首页的布局

    打开MAGENTO_INSTALLED_DIR/app/design/frontend/default/default/layout/page.xml 找到名字为'root'的block定义 < ...

  8. OK335xS GPMC nand device register hacking

    /********************************************************************************* * OK335xS GPMC na ...

  9. Texas Instruments matrix-gui-2.0 hacking -- index.php

    <?php /* * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * * * Redistrib ...

  10. opencv-python教程学习系列7-opencv图像基本操作

    前言 opencv-python教程学习系列记录学习python-opencv过程的点滴,本文主要介绍图像的基本操作,坚持学习,共同进步. 系列教程参照OpenCV-Python中文教程: 系统环境 ...