| Download
playtest for lab meeting
Project: playtest
Path: 2020-12-01-053846.ipynb
Views: 114Image: ubuntu2004
Kernel: Python 3 (system-wide)
Import libraries
In [2]:
Data preprocessing
Load dataset
In [3]:
Explore
In [14]:
Transform dataset
In [15]:
Modeling
Create method
In [19]:
Split dataset
In [20]:
Train model
In [21]:
SVC(gamma=0.001, kernel='linear')
Get predictions
In [22]:
In [23]:
In [24]:
Classification report for classifier SVC(gamma=0.001, kernel='linear'):
precision recall f1-score support
0 0.97 0.99 0.98 88
1 0.94 0.90 0.92 91
2 1.00 0.99 0.99 86
3 0.97 0.86 0.91 91
4 0.99 0.95 0.97 92
5 0.90 0.97 0.93 91
6 0.98 0.99 0.98 91
7 0.97 0.96 0.96 89
8 0.88 0.92 0.90 88
9 0.87 0.93 0.90 92
accuracy 0.94 899
macro avg 0.95 0.94 0.94 899
weighted avg 0.95 0.94 0.94 899
Confusion matrix:
[[87 0 0 0 0 0 1 0 0 0]
[ 0 82 0 0 0 0 0 0 3 6]
[ 1 0 85 0 0 0 0 0 0 0]
[ 0 0 0 78 0 4 0 1 8 0]
[ 1 0 0 0 87 0 0 0 0 4]
[ 0 0 0 0 0 88 1 0 0 2]
[ 0 1 0 0 0 0 90 0 0 0]
[ 0 1 0 0 1 2 0 85 0 0]
[ 0 3 0 1 0 1 0 1 81 1]
[ 1 0 0 1 0 3 0 1 0 86]]
In [0]: