Python learning memo for machine learning by Chainer Chapter 9 Introduction to scikit-learn

What

This is an article that summarizes what I noticed and researched when learning machine learning using Chainer. This time, I will study scikit-learn.

It is written based on my understanding, so it may be incorrect. I will correct any mistakes, please forgive me.

Content

scikit-learn ** It seems that you will be able to train your model if you master this library. ** ** Model training? ?? What? It feels like, but can you understand if you read on? Data set for training? As

  • We use a dataset called the Boston house prices dataset, which is created by collecting information on the living environment of 506 regions in Boston, USA, and median rent information. *

I will try using it. It seems that the median property price is predicted from the 506 sample data set and compared with the actual median.

Preparation of training data and test data

Now, in the situation where the data is given from the Boston house prices dataset, if all this data is used for training (= model optimization), the data of 506 samples will be optimized, and it is actually unknown to the model. When trying to give data, there is no point in training if it does not match the actual situation at all. Since it is (called overfitting), it seems that some data should be used for validation of the model. ** Random allocation of data for training and testing is called the holdout method. ** ** Can be split with one of the following functions

#Split into training and test datasets
x_train, x_test, t_train, t_test = train_test_split(x, t, test_size=0.3, random_state=0)

It seems that methods to prevent overfitting have become the subject of academic research. In this library, data can be preprocessed so that the mean value of the dataset is 0 and the variance is 1.

The flow from data preprocessing to multiple regression analysis and evaluation with a decision function is You can integrate processing using pipelines

Comment I'm studying hard, so I thought I wanted to make something I played a competition called Deep racer. I wanted to appear in the AWS Deep racer.

Recommended Posts

Python learning memo for machine learning by Chainer Chapter 9 Introduction to scikit-learn
Python learning memo for machine learning by Chainer Chapter 8 Introduction to Numpy
Python learning memo for machine learning by Chainer Chapter 10 Introduction to Cupy
Python learning memo for machine learning by Chainer from Chapter 2
Python learning memo for machine learning by Chainer Chapter 7 Regression analysis
Python learning memo for machine learning by Chainer Chapters 1 and 2
Python learning memo for machine learning by Chainer until the end of Chapter 2
Python learning notes for machine learning with Chainer Chapters 11 and 12 Introduction to Pandas Matplotlib
Introduction to Deep Learning for the first time (Chainer) Japanese character recognition Chapter 2 [Model generation by machine learning]
An introduction to OpenCV for machine learning
Python & Machine Learning Study Memo ④: Machine Learning by Backpropagation
Introduction to machine learning
[Python] Easy introduction to machine learning with python (SVM)
An introduction to machine learning for bot developers
Python & Machine Learning Study Memo ②: Introduction of Library
[Translation] scikit-learn 0.18 Tutorial Introduction of machine learning by scikit-learn
[For beginners] Introduction to vectorization in machine learning
An introduction to machine learning
Preparing to start "Python machine learning programming" (for macOS)
How to Introduce IPython (Python2) to Mac OS X-Preparation for Introduction to Machine Learning Theory-
Super introduction to machine learning
Memo for building a machine learning environment using Python
Introduction to Python For, While
How to use machine learning for work? 03_Python coding procedure
Introduction to machine learning Note writing
Machine learning summary by Python beginners
[Introduction to Python3 Day 14] Chapter 7 Strings (7.1.1.1 to 7.1.1.4)
[Introduction to Python3 Day 15] Chapter 7 Strings (7.1.2-7.1.2.2)
Introduction to Machine Learning Library SHOGUN
Interval scheduling learning memo ~ by python ~
An introduction to Python for non-engineers
"Scraping & machine learning with Python" Learning memo
[Introduction to Python3 Day 21] Chapter 10 System (10.1 to 10.5)
Introduction to Deep Learning for the first time (Chainer) Japanese character recognition Chapter 4 [Improvement of recognition accuracy by expanding data]
Introduction to Deep Learning for the first time (Chainer) Japanese character recognition Chapter 1 [Environment construction]
Introduction to Python Basics of Machine Learning (Unsupervised Learning / Principal Component Analysis)
Before the introduction to machine learning. ~ Technology required for machine learning other than machine learning ~
I read "Reinforcement Learning with Python: From Introduction to Practice" Chapter 1
A memorandum of scraping & machine learning [development technique] by Python (Chapter 4)
A memorandum of scraping & machine learning [development technique] by Python (Chapter 5)
I read "Reinforcement Learning with Python: From Introduction to Practice" Chapter 2
Python & Machine Learning Study Memo: Environment Preparation
Introduction to Machine Learning: How Models Work
[Learning memo] Basics of class by python
Amplify images for machine learning with python
[Introduction to Python3, Day 17] Chapter 8 Data Destinations (8.1-8.2.5)
[Introduction to Python3, Day 17] Chapter 8 Data Destinations (8.3-8.3.6.1)
I installed Python 3.5.1 to study machine learning
Why Python is chosen for machine learning
[Introduction to Python3 Day 19] Chapter 8 Data Destinations (8.4-8.5)
[Introduction to Python3 Day 18] Chapter 8 Data Destinations (8.3.6.2 to 8.3.6.3)
[Shakyo] Encounter with Python for machine learning
Introduction to ClearML-Easy to manage machine learning experiments-
[Python] Web application design for machine learning
Introduction to Deep Learning for the first time (Chainer) Japanese character recognition Chapter 3 [Character recognition using a model]
Python & Machine Learning Study Memo ③: Neural Network
Python & Machine Learning Study Memo ⑥: Number Recognition
Introduction to Effectiveness Verification Chapter 1 in Python
An introduction to Python for C programmers
[Introduction to machine learning] Until you run the sample code with chainer
Search for technical blogs by machine learning focusing on "easiness to understand"