Until you create a machine learning environment with Python on Windows 7 and run it


Even if you say machine learning, what should you put in and what to do, so keep a log of trial and error I will also post a reference link When you review it later, it will be a memo that you can remember how much you searched (desire)

Why I decided to use Python

20 selections of content and libraries that beginners of machine learning can learn quickly (Python edition) % E6% A9% 9F% E6% A2% B0% E5% AD% A6% E7% BF% 92% E5% 88% 9D% E5% BF% 83% E8% 80% 85% E3% 81% 8C% E3 % 80% 81% E7% B4% A0% E6% 97% A9% E3% 81% 8F% E5% AD% A6% E3% 81% B9% E3% 82% 8B% E3% 82% B3% E3% 83 % B3% E3% 83% 86% E3% 83% B3% E3% 83% 84% E3% 81% A8% E3% 83% A9) It's Python Also, I remember hearing the name "scikit-learn" in a library for machine learning.

Which is the best Python environment for Windows ...?

It's hard to build an environment from scratch (it's fun if you have the time), so I want to use a package that feels good. Do you like this area? Is it?

About 3 years ago, I thought I should study Python, so I dropped it. Portable Python seems to have stopped developing. Python (x, y) has stopped updating on 06/30/2015, and 2.x series is excluded by saying ... With anaconda, I thought it would be okay to change it after moving to Linux, but I chose WinPython because it is a portable ski that does not mess with the registry. It seems that NumPy and SciPy, which I had a hard time installing on Linux, as well as the scikit-learn I was looking for are packaged, isn't it?

There was a great comparison page, so I used it as a reference. "Comparison of Python packages", minus9d's diary

WinPython, I decided on you!

It says that there is a VC ++ 2015 redistributable package, so drop it in. Is WinPython maintained for 2 generations? The latest of now (2016/7/12) seems to be the following two generations

I decided to use the larger version without thinking deeply I think there was a language like the development version when the minor version was odd, but what kind of rule does Python use?

For the time being, I made a py directory directly under the C drive and put it in, whether it was installation or just extraction. If you want to change the installation directory, you can cut it and move it, so portable type is easy.

Finally a machine learning tutorial

You can proceed with the tutorial on the scikit-learn page, but find a page where you can proceed with the tutorial in Japanese for yourself, saying that English is ... and step by step. "Introduction to Machine Learning with scikit-learn", Takezo dying blog

There are a lot of exes in the directory where WinPython is put, and I'm wondering which one to start, but Jupyter Notebook seems to be more convenient than the interactive shell, so I will move it and type in the code like that

At the end, it's nice that the judgment result 8 is returned, but I got a warning.

C:\py\python-3.5.1.amd64\lib\site-packages\sklearn\utils\validation.py:386: DeprecationWarning: Passing 1d arrays as data is deprecated in 0.17 and willraise ValueError in 0.19. Reshape your data either using X.reshape(-1, 1) if your data has a single feature or X.reshape(1, -1) if it contains a single sample.

Is passing data as a one-dimensional array abolished from scikit-learn version 0.17? I think I wrote that it will be an error when it becomes 0.19, but even if you look at the tutorial page of the scikit-learn head family, the same code remains, so it is a mystery

If you change to the code below, the warning will stop, but what is the principle ... I wonder if that side is related because it has changed to a two-dimensional array.


I was able to confirm that shortening the array passed to fit reduces the accuracy, and it seems that I learned for the time being? So up to this area The continuation is coming again

Recommended Posts

Until you create a machine learning environment with Python on Windows 7 and run it
Create a decent shell and python environment on Windows
Until you install Python with pythonbrew and run Flask on a WSGI server
Until you create Python Virtualenv on Windows and launch Jupyter
Build a 64-bit Python 2.7 environment with TDM-GCC and MinGW-w64 on Windows 7
Building a Windows 7 environment for getting started with machine learning with Python
Prepare a machine learning project format and run it on SageMaker
Create a Python virtual development environment on Windows
Build a Python machine learning environment with a container
Steps to create a Python virtual environment with VS Code on Windows
Create a Python3 environment with pyenv on Mac and display a NetworkX graph
Run a machine learning pipeline with Cloud Dataflow (Python)
Build a machine learning Python environment on Mac OS
Create a comfortable Python 3 (Anaconda) development environment on windows
Build a machine learning application development environment with Python
Create a machine learning environment from scratch with Winsows 10
Build a machine learning environment natively on Windows 10 (x64)
Build a machine learning scikit-learn environment with VirtualBox and Ubuntu
Create a Python environment on Mac (2017/4)
Create a virtual environment with Python!
Create a Linux environment on Windows 10
Create a python environment on centos
Create a python machine learning model relearning mechanism with mlflow
Steps to quickly create a deep learning environment on Mac with TensorFlow and OpenCV
Machine learning environment settings based on Python 3 on Mac (coexistence with Python 2)
Until you run python with apache
Create a Python environment for professionals in VS Code on Windows
Create a Python execution environment for Windows with VScode + Remote WSL
Build a Python environment on your Mac with Anaconda and PyCharm
Until you build the environment with ABCI and run MaskTrack RCNN
Create a C ++ and Python execution environment with WSL2 + Docker + VSCode
Create a simple Python development environment with VS Code and Docker
Everything from building a Python environment to running it on Windows
LaTeX and R (a little Python) environment construction with SublimeText3 (Windows)
Run servo with Python on ESP32 (Windows)
Create a python environment on your Mac
[Python] Create a virtual environment with Anaconda
A memo with Python2.7 and Python3 on CentOS
Building a Python 3.6 environment with Windows + PowerShell
Creating a python virtual environment on Windows
Python and machine learning environment construction (macOS)
Create a Linux virtual machine on Windows
Build AI / machine learning environment with Python
How to quickly create a machine learning environment using Jupyter Notebook on macOS Sierra with anaconda
[Definitive Edition] Building an environment for learning "machine learning" using Python on Windows
[AWS] Create a Python Lambda environment with CodeStar and do Hello World
Deploy a Python app on Google App Engine and integrate it with GitHub
[Introduction to machine learning] Until you run the sample code with chainer
Create a Python development environment on Windows (Visual Studio Code remote WSL).
Quickly build a python environment for deep learning and data science (Windows)
Rock-paper-scissors with Python Let's run on a Windows local server for beginners
Create a decision tree from 0 with Python and understand it (5. Information Entropy)
Install and run Python3.5 + NumPy + SciPy on Windows 10
Building a python environment with virtualenv and direnv
Simply build a Python 3 execution environment on Windows
Build a python environment with ansible on centos6
Create a virtual environment with conda in Python
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
You can easily create a GUI with Python
Create a python3 build environment with Sublime Text3
[Venv] Create a python virtual environment on Ubuntu