[PYTHON] Learning record 6 (10th day)

Learning record (10th day)

Start studying: Saturday, December 7th Books used: Miyuki Oshige "Details! Python3 Introductory Note ”(Sotec, 2017)

Resume from [Numpy array (Ch.15 / p.380)](9th day), Finished until [Classification of handwritten characters (Ch.16 / p.396)](10th day)

I will start machine learning from today.

Machine learning (classification of handwritten characters)

(1) Divide the learning data into training data and test data. (2) Put the training data and teacher data into the ** learner **. → Trained model (classifier) (3) Put test data and teacher data into a classifier and evaluate the performance.

・ Uses a learning device called scikit-learn -Classification of handwritten characters (using the datasets module of the sklearn package) A package is a collection of ** multiple modules **. ・ Practice using scikit-learn number image data This time, the image data (digits.data) and the teacher data (digits.target) are used separately. 2/3 of the image data is training data, 1/3 is test data The teacher data is also divided so as to correspond to the above. Algorithm uses SVM (Support Vector Machine) SVC ・ When I put the test data in the classifier, the following error occurred  Classification metrics can't handle a mix of multiclass-multioutput and multiclass targets → It was solved when I tried everything again. Cause unknown···. During the reproduction, there was an error several times due to the double-byte space, so it may be possible.

Gamma in SVM of support vector machine

-Not limited to gamma, the parameters of the learner can be adjusted with the argument of svm.svc (). In the book, gamma = 0.001 and the accuracy was 96.3%, but when gamma = 1, the accuracy dropped to 9.8%. On the contrary, when gamma = 0.001, the accuracy is 93.2%. It doesn't seem that it should be low. Does the adjustment around here correspond to the tuning that you often hear?

Recommended Posts

Learning record 9 (13th day)
Learning record 3 (7th day)
Learning record 5 (9th day)
Learning record 6 (10th day)
Learning record 8 (12th day)
Learning record 1 (4th day)
Learning record 7 (11th day)
Learning record 2 (6th day)
Learning record 16 (20th day)
Learning record 22 (26th day)
Learning record No. 21 (25th day)
Learning record 13 (17th day) Kaggle3
Learning record No. 10 (14th day)
Learning record 12 (16th day) Kaggle2
Learning record No. 24 (28th day)
Learning record No. 23 (27th day)
Learning record No. 25 (29th day)
Learning record No. 26 (30th day)
Learning record No. 20 (24th day)
Learning record No. 14 (18th day) Kaggle4
Learning record No. 15 (19th day) Kaggle5
Learning record 11 (15th day) Kaggle participation
Programming learning record day 2
Learning record No. 17 (21st day)
Learning record
Learning record No. 18 (22nd day)
Learning record # 3
Learning record # 1
Learning record # 2
Learning record No. 19 (23rd day)
Learning record No. 29 (33rd day)
Learning record No. 28 (32nd day)
Learning record No. 27 (31st day)
Python learning day 4
Learning record (2nd day) Scraping by #BeautifulSoup
Learning record so far
Go language learning record
Learning record (4th day) #How to get the absolute path from the relative path
Linux learning record ① Plan
Effective Python Learning Memorandum Day 15 [15/100]
<Course> Deep Learning: Day2 CNN
Effective Python Learning Memorandum Day 6 [6/100]
Effective Python Learning Memorandum Day 12 [12/100]
Effective Python Learning Memorandum Day 9 [9/100]
Effective Python Learning Memorandum Day 8 [8/100]
Rabbit Challenge Deep Learning 1Day
<Course> Deep Learning: Day1 NN
Effective Python Learning Memorandum Day 14 [14/100]
Effective Python Learning Memorandum Day 1 [1/100]
Subjects> Deep Learning: Day3 RNN
Rabbit Challenge Deep Learning 2Day
Effective Python Learning Memorandum Day 13 [13/100]
Effective Python Learning Memorandum Day 3 [3/100]
Effective Python Learning Memorandum Day 5 [5/100]
Effective Python Learning Memorandum Day 4 [4/100]
Effective Python Learning Memorandum Day 7 [7/100]
Effective Python Learning Memorandum Day 2 [2/100]
Learning record (3rd day) #CSS selector description method #BeautifulSoup scraping
Learning record (6th day) #Set type #Dictionary type #Mutual conversion of list tuple set #ndarray type #Pandas (DataFrame type)
Thoroughly study Deep Learning [DW Day 0]
[Rabbit Challenge (E qualification)] Deep learning (day2)