Give sklearn a home on Anaconda (environment deployment, quickly give me machine learning support!)

Why should we use sklearn

scikit-learn is a machine learning tool based on Python language

  • Simple and efficient data mining and data analysis tools
  • Can be reused in various environments
  • Built on NumPy, SciPy and matplotlib
  • Open source, commercially available-BSD license
  • In short, it is convenient to use, someModels and data can be directly called, Studying is easy!

Why we choose anaconda

  • Anaconda is a python distribution, including python and many common software libraries, and a package manager conda. Common scientific computing libraries are included, making installation easier than regular python installation.

  • Anaconda is a Python release that focuses on data analysis. It contains more than 190 scientific packages and their dependencies, such as conda and Python.

The advantages of Anaconda can be summed up in eight words:Save time, worry, and analysis tool.

There are a lot of downloads of anaconda on the Internet, everyone can solve it by yourself!

Create a sklearn virtual environment

Then let's start creating a sklearn virtual environment on sklearn now!

Create a new virtual environment on conda

condacreate-n environment name python=version number For
example: the environment we created is calledmachine-learning, The python version is3.6

conda create -n machine-learning python=3.6

View the package list of the virtual environment

First, we have to activate the environment

conda activate 环境名

Then we can call list

conda list

Insert picture description here
This is the package for the initial environment

Download the corresponding package

The packages we need to download are
numpy scipy scikit-learn

pip install numpy
pip install scipy
pip3 install -U scikit-learn # 这是3.+版本的安装命令

Insert picture description here
After installation, we view the results of the list
Insert picture description here

In this way, we have created a virtual environment that can use sklearn on anaconda!

How to run sklearn in the notebook please see here

Check in to sklearn on Jupyter-notebook

Guess you like

Origin blog.csdn.net/qq_42136832/article/details/115262285