-
大小:文件类型: .rar金币: 2下载: 1 次发布日期: 2022-01-11
- 语言: 其他
- 标签: 机器学习 Scikit-Learn TensorFlow 源码
资源简介
Hands-On Machine Learning with Scikit-Learn & TensorFlow 中文版+英文版电子书+源码+数据
代码片段和文件信息
“““
This module merges two files from Scikit-Learn 0.20 to make a few encoders
available for users using an earlier version:
* sklearn/preprocessing/data.py (OneHotEncoder and CategoricalEncoder)
* sklearn/compose/_column_transformer.py (ColumnTransformer)
I just copy/pasted the contents fixed the imports and __all__ and also
copied the definitions of three pipeline functions whose signature changes
in 0.20: _fit_one_transformer _transform_one and _fit_transform_one.
The original authors are listed below.
----
The :mod:‘sklearn.compose._column_transformer‘ module implements utilities
to work with heterogeneous data and to apply different transformers to
different columns.
“““
# Authors: Andreas Mueller
# Joris Van den Bossche
# License: BSD 3 clause
from __future__ import division
import numbers
import warnings
import numpy as np
from scipy import sparse
from sklearn.base import clone baseEstimator TransformerMixin
from sklearn.externals import six
from sklearn.utils import Bunch check_array
from sklearn.externals.joblib.parallel import delayed Parallel
from sklearn.utils.metaestimators import _baseComposition
from sklearn.utils.validation import check_is_fitted FLOAT_DTYPES
from sklearn.pipeline import _name_estimators
from sklearn.preprocessing import FunctionTransformer
from sklearn.preprocessing.label import LabelEncoder
from itertools import chain
# weight and fit_params are not used but it allows _fit_one_transformer
# _transform_one and _fit_transform_one to have the same signature to
# factorize the code in ColumnTransformer
def _fit_one_transformer(transformer X y weight=None **fit_params):
return transformer.fit(X y)
def _transform_one(transformer X y weight **fit_params):
res = transformer.transform(X)
# if we have a weight for this transformer multiply output
if weight is None:
return res
return res * weight
def _fit_transform_one(transformer X y weight **fit_params):
if hasattr(transformer ‘fit_transform‘):
res = transformer.fit_transform(X y **fit_params)
else:
res = transformer.fit(X y **fit_params).transform(X)
# if we have a weight for this transformer multiply output
if weight is None:
return res transformer
return res * weight transformer
BOUNDS_THRESHOLD = 1e-7
zip = six.moves.zip
map = six.moves.map
range = six.moves.range
__all__ = [
‘OneHotEncoder‘
‘OrdinalEncoder‘
‘ColumnTransformer‘
‘make_column_transformer‘
]
def _argmax(arr_or_spmatrix axis=None):
return arr_or_spmatrix.argmax(axis=axis)
def _handle_zeros_in_scale(scale copy=True):
‘‘‘ Makes sure that whenever scale is zero we handle it correctly.
This happens in most scalers when we have constant features.‘‘‘
# if we are fitting on 1D arrays scale might be a scalar
if np.isscalar(scale):
if scale == .0:
scale
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 195 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\.gitignore
文件 284756 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\01_the_machine_learning_landscape.ipynb
文件 1350273 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\02_end_to_end_machine_learning_project.ipynb
文件 447511 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\03_classification.ipynb
文件 851389 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\04_training_linear_models.ipynb
文件 914359 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\05_support_vector_machines.ipynb
文件 204214 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\06_decision_trees.ipynb
文件 553305 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\07_ensemble_learning_and_random_forests.ipynb
文件 5760930 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\08_dimensionality_reduction.ipynb
文件 203686 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\09_up_and_running_with_tensorflow.ipynb
文件 320538 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\10_introduction_to_artificial_neural_networks.ipynb
文件 1954346 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\11_deep_learning.ipynb
文件 24726 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\12_distributed_tensorflow.ipynb
文件 4981104 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\13_convolutional_neural_networks.ipynb
文件 674734 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\14_recurrent_neural_networks.ipynb
文件 349978 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\15_autoencoders.ipynb
文件 1415260 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\16_reinforcement_learning.ipynb
文件 48616 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\book_equations.ipynb
文件 1423529 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\datasets\housing\housing.csv
文件 409488 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\datasets\housing\housing.tgz
文件 3680 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\datasets\housing\README.md
文件 31674 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\datasets\inception\imagenet_class_names.txt
文件 36323 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\datasets\lifesat\gdp_per_capita.csv
文件 405467 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\datasets\lifesat\oecd_bli_2015.csv
文件 4311 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\datasets\lifesat\README.md
文件 32 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\docker\.env
文件 89 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\docker\bashrc.bash
文件 4986 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\docker\bin\nbclean_checkpoints
文件 583 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\docker\bin\nbdiff_checkpoint
文件 2136 2018-09-17 17:51 Hands-On Machine Learning with Scikit-Learn & TensorFlow-master-源码+数据\docker\bin\rm_empty_subdirs
............此处省略71个文件信息
- 上一篇:waterways.rar
- 下一篇:EGM2008.zip
相关资源
- Logistic回归总结非常好的机器学习总结
- Convex Analysis and Optimization (Bertsekas
- 机器学习个人笔记完整版v5.2-A4打印版
- JUNIOR:粒子物理学中无监督机器学习
- 语料库.zip
- 中国科学技术大学 研究生课程 机器学
- 遗传算法越野小车unity5.5
- 吴恩达机器学习编程题
- shape_predictor_68_face_landmarks.dat.bz2 68个标
- 机器学习实战高清pdf,中文版+英文版
- 李宏毅-机器学习(视频2017完整)
- 机器学习深度学习 PPT
- 麻省理工:深度学习介绍PPT-1
- Wikipedia机器学习迷你电子书之四《D
- Learning From Data Yaser S. Abu-Mostafa
- 北大林宙辰:机器学习一阶算法的优
- 李宏毅深度学习ppt
- 机器学习方法R实现-用决策树、神经网
- 数字金融反欺诈白皮书
- 机器学习班PPT原件全邹博
- 机器学习实战(源码和数据样本)
- 计算广告含有目录 刘鹏版
- 数据挖掘导论完整版PPT及课后习题答
- kaggle信用卡欺诈数据
- 机器学习技法原始讲义和课程笔记
- 机器学习数学 陈希孺《 概率论与数理
- 概率论与数理统计陈希孺
- 哈尔滨工业大学深圳 机器学习 2017 考
- [概率论与数理统计]陈希孺带目录
- 刘鹏计算广告完整超清晰带目录版
评论
共有 条评论