Machine learning starting from 0 for theoretical physics students # 2

table of contents

  1. Standard Python
  2. Building a Python environment from 0
  3. Preparation for coding

It may be redundant, but I would like to write with an awareness of "from 0".

1. Standard Python

Development environment: MacOS 10.13.6 Basically, use Mac terminal as CUI. (CUI: Operate with Character User Interface characters)

The display format of the terminal is [Computer name: Current directory name User name ] It has become. (There is a way to shorten it, but if you are a beginner, you should know where the current directory is.) After that, describe only ``.

Python 2.7.16 was standard on the Mac. The confirmation method is as follows.

python


$python -V
Python 2.7.16

In my case, it was displayed in version 2.7.16.

2.0 Building a Python environment from scratch

It can be developed with Python2 as standard equipment, but it seems that Python has Python2 and Python3, and it seems that it has been decided that Python2 will not be upgraded after 2.7. If you want to learn Python from now on, I want to install Python3.

The installer is provided free of charge from the official Python website. Python official website If you download the latest release from here, there should be no problem.

Check the version when the installation is complete.

python


$python3 -V
Python 3.8.0

For MacOS, the command is python3. My version was 3.8.0.

3. Preparation for coding

Once Python3 is installed, you're ready to process the language Python on MacOS. However, it is meaningless without a program to process it. Next, get ready to write code.

The famous text editor Visual Studio Code (hereinafter: VSCode) is used. A text editor is the same as the memo that comes standard with the Mac, and you can think of VS Code as coding-specific.

Visual Studio Code Official Site Install from here as well.

Once installed, all you have to do is use it. You can customize VS Code to your own development environment by installing the plugin as an extension. If you want to use it in Japanese, the Japanese Language plugin, Since it is coded in Python, install the Python plugin. (The plugin can be enabled / disabled later)

If you install a plugin called Shell, you can use the terminal.

python


$code [file name]

Just type and VS Code will launch the file for you. After that, code with VS Code and save it with the shortcut key command + S on the Mac keyboard, and the coding is completed.

The terminal can also be started by using the shortcut key shift + control + @ in VS Code, so there is almost no need to use the GUI (mouse).

References

-[Pyhton that understands fluently](https://www.amazon.co.jp/ Python that understands fluently-Kei Iwasaki / dp / 4798151092/ref=sr_1_1?__mk_ja_JP = Katakana & dchild = 1 & keywords = Smoothly python & qid = 1519248379 & sr = 8-1 )

Next goal

--Installing Tesonrflow and Keras --Understanding the basics and framework of image recognition using MNIST

Recommended Posts

Machine learning starting from 0 for theoretical physics students # 1
Machine learning starting from 0 for theoretical physics students # 2
Machine learning starting from scratch (machine learning learned with Kaggle)
Python learning memo for machine learning by Chainer from Chapter 2
Study method for learning machine learning from scratch (March 2020 version)
Data set for machine learning
Japanese preprocessing for machine learning
[Machine learning] Understanding uncorrelatedness from mathematics
<For beginners> python library <For machine learning>
Machine learning meeting information for HRTech
[Recommended tagging for machine learning # 4] Machine learning script ...?
Newton's method for machine learning (from one variable to multiple variables)
Amplify images for machine learning with python
Non-information graduate students studied machine learning from scratch # 3: MNIST Handwritten digit recognition
"Python AI programming" starting from 0 for windows
Use machine learning APIs A3RT from Python
An introduction to OpenCV for machine learning
Why Python is chosen for machine learning
"Usable" one-hot Encoding method for machine learning
Machine learning
[Shakyo] Encounter with Python for machine learning
[Python] Web application design for machine learning
An introduction to Python for machine learning
Creating a development environment for machine learning
Feature engineering for machine learning starting with the 4th Google Colaboratory --Interaction features
An introduction to machine learning for bot developers
Machine learning starting with Python Personal memorandum Part2
Recommended study order for machine learning / deep learning beginners
Machine learning starting with Python Personal memorandum Part1
Upgrade the Azure Machine Learning SDK for Python
Notes on machine learning (updated from time to time)
Machine learning algorithms (from two-class classification to multi-class classification)
[Note] Python, when starting machine learning / deep learning [Links]
[Python] Collect images with Icrawler for machine learning [1000 images]
Overview of machine learning techniques learned from scikit-learn
Collect images for machine learning (Bing Search API)
[For beginners] Introduction to vectorization in machine learning
[CodeIQ] I wrote the probability distribution of dice (from CodeIQ math course for machine learning [probability distribution])
[Python] Save PDF from Google Colaboratory to Google Drive! -Let's collect data for machine learning-
[Memo] Machine learning
Machine learning classification
Machine Learning sample
Image collection Python script for creating datasets for machine learning
Build an interactive environment for machine learning in Python
[Recommended tagging for machine learning # 2] Extension of scraping script
[Recommended tagging for machine learning # 2.5] Modification of scraping script
Machine learning python code summary (updated from time to time)
[Machine learning] Understanding SVM from both scikit-learn and mathematics
Non-information graduate student studied machine learning from scratch # 1: Perceptron
Installation of TensorFlow, a machine learning library from Google
Preparing to start "Python machine learning programming" (for macOS)
[Python] I made a classifier for irises [Machine learning]
Pip the machine learning library from one end (Ubuntu)
14 e-mail newsletters useful for gathering information on machine learning
Memo for building a machine learning environment using Python
xgboost: A valid machine learning model for table data
Create a machine learning environment from scratch with Winsows 10
An introduction to machine learning from a simple perceptron
Everything for beginners to be able to do machine learning
I built an environment for machine learning from scratch (windows10 + Anaconda + VSCode + Tensorflow + GPU version)