I recently became interested in machine learning and started studying Python. Since machine learning is a prerequisite, the library is complete "[Anadonda](https://ja.wikipedia.org/wiki/Anaconda_(Python%E3%83%87%E3%82%A3%E3%82%B9%E3%" 83% 88% E3% 83% AA% E3% 83% 93% E3% 83% A5% E3% 83% BC% E3% 82% B7% E3% 83% A7% E3% 83% B3)) " I built a learning environment and proceeded with learning, but on the way, "[Spyder](https://ja.wikipedia.org/wiki/Spyder_(%E3%82%BD%E3%83%95) % E3% 83% 88% E3% 82% A6% E3% 82% A7% E3% 82% A2))) ”has been used, and the learning efficiency has improved significantly. So, I will post this article for beginners who are just starting machine learning with Python.
Anaconda is a free open source distribution of Python and R for scientific computing (data science, machine learning applications, large-scale data processing, predictive analysis, etc.) that simplifies package management and deployment. This is what I aimed for. Package versions are managed by the package management system conda. The Anaconda distribution is used by more than 15 million users and includes over 1500 popular data science packages for Windows, Linux and macOS. (Quoted from Wikipedia)
A Python environment with all the libraries required for machine learning is provided, so if you use Python for machine learning, this is a free package that you can choose.
Spyder (formerly Pydee) is an open source, cross-platform integrated development environment designed for scientific programming in Python. NumPy, SciPy, Matplotlib, IPython, etc. are integrated in Spyder. (Quoted from Wikipedia)
It is an integrated development environment as described. The protagonist of this article. "Spyder" will be installed automatically when you install "Anaconda".
The installation procedure for "Anaconda" is described below.
"Anaconda: Install Windows version"
When the installation is completed, "Spyder" is automatically installed in the Windows startup.
When you start "Spyder", the following screen will be displayed. I started it once at the beginning of the installation, but I didn't know how to use it, and I didn't realize how amazing this child was. Since I got stuck on the way and started using "Spyder", my learning efficiency has improved dramatically.
① When you start Spyder, the following screen will open.
(2) Describe the syntax on the "temp.py" screen on the left side of the screen.
③ Press the execute button.
④ The result is displayed on the console at the bottom right of the screen.
⑤ Of course, you can easily save the program file. Let's save the program you made.
Here is the main issue. I will introduce how "Spyder" is an excellent learning environment.
Initially, I started learning by starting "Anadonda Powershell Prompt" and inputting a program from the terminal. It was the procedure described in the teaching material, and there was no pain at first. However, when it comes to long syntax such as def statement, Class statement, and for statement, I find it very troublesome to input each one.
However, with "Spyder", it is easy to enter and edit the syntax all at once on the screen. It's easy to change variables and re-execute, so you can change various things and try the movement. It was a great help when I was studying Python. In addition, the functions are color-coded, so it is easy to understand at a glance.
And if I tried to move it and got an error, it took time to investigate. For example, the example below is an error that is output when the ":" after "x> 0" is omitted. Somehow a multi-line message is coming out. It's hard to understand.
However, with "Spyder", if the syntax is incorrect, an "x" will be displayed in the column column to let you know on the spot. If you move the cursor to "x", it will tell you the details of the error. You don't have to worry about trivial syntax mistakes.
For example, execute the following syntax.
a = 20
b = 30
c = (a+b)/3
d = (a+b)%3
e = "kamera"
f = "taiko"
g = e + f
h = ("neko","inu","saru")
i = [("aka","ao"),("kiiro","siro")]
j = {0 : "test",1 :"tst2",2 : "test3"}
If I wanted to know what was set in a variable and the variable type, I ran the variable name and type commands to check. These tasks can be very time consuming, such as when an error occurs.
However, with "Spyder", "Variable Explorer" is displayed in the upper right corner of the screen. The variables used are displayed there. You can check it without typing a variable type or command, and you can save time and effort.
There is a function called debug mode. This allows the syntax to be processed line by line so you can see how it is processed. Especially when using def, if statement, for statement, etc., it helps to follow the movement visibly. Especially when combined with "Variable Explorer", it becomes clear at a glance when it was rewritten.
For example, try running the following syntax in debug mode.
test = []
for x in [0,1,2]:
for y in [1,2]:
if x != y:
test.append((x, y))
The process is halfway, but it is as follows. On the syntax screen, the line currently being processed is marked with an arrow. The Variable Explorer shows what you are doing at that point. Since you can proceed step by step, you will be able to understand the contents of the process. This makes it easy to understand syntax that you didn't understand what it would be like.
Syntax screen | Variable explorer screen |
---|---|
You can easily save the created program as a script. And you can pull it out from the file screen at any time.
As mentioned above, it has all the features for beginners who want to learn Python. The evaluation may be different when using it in actual work, but it is a very excellent tool for learning. If you are a beginner just starting to learn Python, please take advantage of it.
that's all