[1, 0, 0]
[0, 1, 0]
[0, 0, 1]
[1, 0, 1]
[0, 0]
[1, 0]
[0, 1]
Nationality | C1 | C2 | C3 |
French | 0 | 0 | 1 |
Italian | 1 | 0 | 0 |
German | 0 | 1 | 0 |
Other | −1 | −1 | −1 |
Nationality | C1 | C2 |
French | +0.25 | +0.50 |
Italian | +0.25 | −0.50 |
German | −0.50 | 0 |
Color | Binary 1 | Binary 2 | Binary 3 |
0 | 0 | 0 | |
0 | 0 | 1 | |
0 | 1 | 0 | |
0 | 1 | 1 | |
1 | 0 | 0 | |
1 | 0 | 1 | |
1 | 1 | 1 |
Color | Ranking |
1 | |
2 | |
3 | |
4 | |
5 | |
6 |
word2vec
Bonus - Proximity to an internation airport
›sklearn.tree.DecisionTreeClassifier
********************************************************************************
Original Dataset
********************************************************************************
sepal_length sepal_width petal_length petal_width class
0 5.1 3.5 1.4 0.2 Iris-setosa
1 4.9 3.0 1.4 0.2 Iris-setosa
2 4.7 3.2 1.3 0.2 Iris-setosa
3 4.6 3.1 1.5 0.2 Iris-setosa
4 5.0 3.6 1.4 0.2 Iris-setosa
.. ... ... ... ... ...
145 6.7 3.0 5.2 2.3 Iris-virginica
146 6.3 2.5 5.0 1.9 Iris-virginica
147 6.5 3.0 5.2 2.0 Iris-virginica
148 6.2 3.4 5.4 2.3 Iris-virginica
149 5.9 3.0 5.1 1.8 Iris-virginica
[150 rows x 5 columns]
criterion | max_depth | score | |
---|---|---|---|
0 | gini | 1 | 0.666667 |
1 | gini | 2 | 0.933333 |
2 | gini | 3 | 0.960000 |
3 | gini | 4 | 0.966667 |
4 | gini | 5 | 0.960000 |
5 | gini | 6 | 0.960000 |
6 | entropy | 1 | 0.666667 |
7 | entropy | 2 | 0.933333 |
8 | entropy | 3 | 0.960000 |
9 | entropy | 4 | 0.953333 |
10 | entropy | 5 | 0.953333 |
11 | entropy | 6 | 0.953333 |
sklearn.ensemble.BaggingClassifier
sklean.ensemble.RandomForestClassifier.feature_importances_
sklearn.inspection.permutation_importance