Scikit-learn(sklearn)是机器学习的第三方模块包,对常用的机器学习方法进行了封装,包括回归(Regression)、降维(Dimensionality Reduction)、分类(Classfication)、聚类(Clustering)等方法.
Sklearn具有以下特点:
简单高效的数据挖掘和数据分析工具
让每个人能够在复杂环境中重复使用
建立NumPy、Scipy、MatPlotLib之上
先确保python环境已ok,我的是Python 3.8.3
python -V
因为sklean基于建立NumPy、Scipy、MatPlotLib上所以先安装相应依赖,这里我们可以按下面操作
如果之前安装过numpy/scipy/matplotlib先卸载
pip uninstall scikit-learn
pip uninstall numpy
pip uninstall scipy
pip uninstall matplotlib
如果不能科学上网,推荐使用国内pip源镜像安装
比较常用的国内镜像包括:
(1)阿里云 http://mirrors.aliyun.com/pypi/simple/
(2)豆瓣http://pypi.douban.com/simple/
(3)清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
(4)中国科学技术大学 http://p