Py之mlxtend:mlxtend库的简介、安装、使用方法之详细攻略

Py之mlxtend:mlxtend库的简介、安装、使用方法之详细攻略

目录

mlxtend库的简介

mlxtend库的安装

mlxtend库的使用方法

1、基础用法

ML之mlxtend:基于iris鸢尾花数据集利用逻辑回归LoR/随机森林RF/支持向量机SVM/集成学习算法结合mlxtend库实现模型可解释性(决策边界可视化)


mlxtend库的简介

       mlxtend(machine learning extensions,机器学习扩展)是一个用于日常数据科学任务的有用工具的Python库。mlxtend可以用作模型的可解释性,还包括统计评估、数据模式、图像提取等。mlxtend是一个Python第三方库,用于支持机器学习和数据分析任务。
       mlxtend库提供了许多有用的工具,可以帮助您更轻松地进行数据预处理、特征选择、模型选择和评估、集成学习以及可视化等任务。以下是mlxtend库的一些主要功能:
>> 数据预处理:提供数据清洗和转换工具,包括缺失值填充、数据标准化和离散化、数据集分割等。
>> 数据可视化:提供了多种可视化工具,包括学习曲线、决策边界和特征重要性等。
>> 特征选择:提供了多种常见的特征选择算法,包括递归特征消除、基于树的特征选择和基于模型的特征选择等。
>> 模型选择和评估:提供了用于网格搜索、交叉验证和模型评估的工具,可以帮助您选择最佳的机器学习模型。
>> 集成学习:提供了多种集成学习算法,包括投票分类器、堆叠分类器和AdaBoost等。

Github:GitHub - rasbt/mlxtend: A library of extension and helper modules for Python's data analysis and machine learning libraries.

文档:Home - mlxtend

mlxtend库的安装

pip install mlxtend
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple mlxtend

C:\Users\Administrator>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple mlxtend
WARNING: Ignoring invalid distribution -rotobuf (e:\program files\python\python36\lib\site-packages)
WARNING: Ignoring invalid distribution -rotobuf (e:\program files\python\python36\lib\site-packages)
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting mlxtendDownloading https://pypi.tuna.tsinghua.edu.cn/packages/45/89/492924d6fc2cc9524f90febd0e9f7487c02261a8689c7c97348b09d0d071/mlxtend-0.20.0-py2.py3-none-any.whl (1.3 MB)|████████████████████████████████| 1.3 MB 819 kB/s
Requirement already satisfied: pandas>=0.24.2 in e:\program files\python\python36\lib\site-packages (from mlxtend) (1.1.4)
Requirement already satisfied: joblib>=0.13.2 in e:\program files\python\python36\lib\site-packages (from mlxtend) (0.16.0)
Requirement already satisfied: numpy>=1.16.2 in e:\program files\python\python36\lib\site-packages (from mlxtend) (1.19.5)
Requirement already satisfied: setuptools in e:\program files\python\python36\lib\site-packages (from mlxtend) (39.1.0)
Requirement already satisfied: matplotlib>=3.0.0 in e:\program files\python\python36\lib\site-packages (from mlxtend) (3.1.1)Downloading https://pypi.tuna.tsinghua.edu.cn/packages/2a/4f/11a257bc17f675691080219c6fe3525e49c7077535c3d64c0c2afc79cfc9/mlxtend-0.19.0-py2.py3-none-any.whl (1.3 MB)|████████████████████████████████| 1.3 MB 1.1 MB/s
Requirement already satisfied: scikit-learn>=0.20.3 in e:\program files\python\python36\lib\site-packages (from mlxtend) (0.24.2)
Collecting scipy>=1.2.1Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f3/9f/80522344838ae24cac9e945240436269cbb92349f7f1f4c9dfc10cb6bad5/scipy-1.5.4-cp36-cp36m-win_amd64.whl (31.2 MB)|████████████████████████████████| 31.2 MB 2.2 MB/s
Requirement already satisfied: kiwisolver>=1.0.1 in e:\program files\python\python36\lib\site-packages (from matplotlib>=3.0.0->mlxtend) (1.0.1)
Requirement already satisfied: cycler>=0.10 in e:\program files\python\python36\lib\site-packages (from matplotlib>=3.0.0->mlxtend) (0.10.0)
Requirement already satisfied: python-dateutil>=2.1 in e:\program files\python\python36\lib\site-packages (from matplotlib>=3.0.0->mlxtend) (2.8.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in e:\program files\python\python36\lib\site-packages (from matplotlib>=3.0.0->mlxtend) (2.2.0)
Requirement already satisfied: pytz>=2017.2 in e:\program files\python\python36\lib\site-packages (from pandas>=0.24.2->mlxtend) (2018.3)
Requirement already satisfied: threadpoolctl>=2.0.0 in e:\program files\python\python36\lib\site-packages (from scikit-learn>=0.20.3->mlxtend) (2.1.0)
Requirement already satisfied: six in e:\program files\python\python36\lib\site-packages (from cycler>=0.10->matplotlib>=3.0.0->mlxtend) (1.15.0)
WARNING: Ignoring invalid distribution -rotobuf (e:\program files\python\python36\lib\site-packages)
Installing collected packages: scipy, mlxtendAttempting uninstall: scipyWARNING: Ignoring invalid distribution -rotobuf (e:\program files\python\python36\lib\site-packages)Found existing installation: scipy 1.1.0Uninstalling scipy-1.1.0:Successfully uninstalled scipy-1.1.0
WARNING: Ignoring invalid distribution -rotobuf (e:\program files\python\python36\lib\site-packages)
WARNING: Ignoring invalid distribution -rotobuf (e:\program files\python\python36\lib\site-packages)
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
wxgl 0.6.3 requires matplotlib>=3.1.2, but you have matplotlib 3.1.1 which is incompatible.
scikit-survival 0.13.1 requires scikit-learn<0.24,>=0.22.0, but you have scikit-learn 0.24.2 which is incompatible.
pandas-profiling 2.9.0 requires matplotlib>=3.2.0, but you have matplotlib 3.1.1 which is incompatible.
paddlepaddle 1.6.3 requires matplotlib<=2.2.4, but you have matplotlib 3.1.1 which is incompatible.
paddlepaddle 1.6.3 requires numpy<=1.16.4,>=1.12, but you have numpy 1.19.5 which is incompatible.
paddlepaddle 1.6.3 requires scipy<=1.2.1,>=0.19.0, but you have scipy 1.5.4 which is incompatible.
keras-resnet 0.2.0 requires keras>=2.2.4, but you have keras 2.2.2 which is incompatible.
autokeras 0.2.19 requires scikit-learn==0.19.1, but you have scikit-learn 0.24.2 which is incompatible.
autokeras 0.2.19 requires torch==0.4.1, but you have torch 1.3.1 which is incompatible.
autokeras 0.2.19 requires torchvision==0.2.1, but you have torchvision 0.4.1 which is incompatible.
autokeras 0.2.19 requires tqdm==4.25.0, but you have tqdm 4.51.0 which is incompatible.
albumentations 0.4.3 requires opencv-python>=4.1.1, but you have opencv-python 3.4.1.15 which is incompatible.
Successfully installed mlxtend-0.19.0 scipy-1.5.4

mlxtend库的使用方法

1、基础用法

ML之mlxtend:基于iris鸢尾花数据集利用逻辑回归LoR/随机森林RF/支持向量机SVM/集成学习算法结合mlxtend库实现模型可解释性(决策边界可视化)

ML之mlxtend:基于iris鸢尾花数据集利用逻辑回归LoR/随机森林RF/支持向量机SVM/集成学习算法结合mlxtend库实现模型可解释性_一个处女座的程序猿的博客-CSDN博客


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部