print("Dimensions des données : ", pen.shape)
pen.head(10)
Dimensions des données : (10992, 17)
x1 | y1 | x2 | y2 | x3 | y3 | x4 | y4 | x5 | y5 | x6 | y6 | x7 | y7 | x8 | y8 | chiffre | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 88 | 92 | 2 | 99 | 16 | 66 | 94 | 37 | 70 | 0 | 0 | 24 | 42 | 65 | 100 | 100 | 8 |
1 | 80 | 100 | 18 | 98 | 60 | 66 | 100 | 29 | 42 | 0 | 0 | 23 | 42 | 61 | 56 | 98 | 8 |
2 | 0 | 94 | 9 | 57 | 20 | 19 | 7 | 0 | 20 | 36 | 70 | 68 | 100 | 100 | 18 | 92 | 8 |
3 | 95 | 82 | 71 | 100 | 27 | 77 | 77 | 73 | 100 | 80 | 93 | 42 | 56 | 13 | 0 | 0 | 9 |
4 | 68 | 100 | 6 | 88 | 47 | 75 | 87 | 82 | 85 | 56 | 100 | 29 | 75 | 6 | 0 | 0 | 9 |
5 | 70 | 100 | 100 | 97 | 70 | 81 | 45 | 65 | 30 | 49 | 20 | 33 | 0 | 16 | 0 | 0 | 1 |
6 | 40 | 100 | 0 | 81 | 15 | 58 | 100 | 57 | 47 | 87 | 50 | 88 | 40 | 42 | 36 | 0 | 4 |
7 | 3 | 71 | 0 | 95 | 45 | 100 | 100 | 99 | 79 | 78 | 48 | 53 | 31 | 24 | 54 | 0 | 7 |
8 | 79 | 87 | 98 | 81 | 71 | 100 | 72 | 73 | 100 | 66 | 91 | 21 | 48 | 0 | 0 | 13 | 9 |
9 | 92 | 95 | 30 | 100 | 34 | 68 | 87 | 89 | 84 | 78 | 100 | 35 | 64 | 0 | 0 | 19 | 9 |
sub_first_xyc = [[s.loc[0, xN], s.loc[0, yN], s.loc[0, "chiffre"]] for s in sub]
fig = plt.figure(figsize = (15, 5))
for i in range(10):
ax = fig.add_subplot(2, 5, i + 1)
dessin(ax, sub_first_xyc[i][0], sub_first_xyc[i][1], sub_first_xyc[i][2])
fig = plt.figure(figsize = (15, 5))
for i in range(10):
ax = fig.add_subplot(2, 5, i + 1)
dessin(ax, cmoy.loc[i,xN], cmoy.loc[i,yN], str(i), pos = True)
seaborn.lmplot(data = pen_original_df, x = "Dim1", y = "Dim2", hue = "Chiffre",
fit_reg = False, height = 7, aspect = 1.5)
plt.show()
g = seaborn.lmplot(data = pen_original_df, x = "Dim1", y = "Dim2", hue = "Chiffre",
col = "Chiffre", col_wrap = 5, fit_reg = False)
g.set_titles(col_template = "chiffre : {col_name}", fontweight = "bold", size = 24)
plt.show()
seaborn.lmplot(data = pen_scale_df, x = "Dim1", y = "Dim2", hue = "Chiffre",
fit_reg = False, height = 7, aspect = 1)
plt.show()
g = seaborn.lmplot(data = pen_scale_df, x = "Dim1", y = "Dim2", hue = "Chiffre",
col = "Chiffre", col_wrap = 5, fit_reg = False)
g.set_titles(col_template = "chiffre : {col_name}", fontweight = "bold", size = 24)
plt.show()
recherche(chiffre)
¶application(chiffre, nb_classes)
¶recherche(0)
application(0, 4)
recherche(1)
Avec 4 classes, on est plus fin sur les distinctions entre les types de tracé :
application(1, 4)
recherche(2)
application(2, 1)
recherche(3)
application(3, 1)
recherche(4)
application(4, 3)
recherche(5)
application(5, 2)
recherche(6)
application(6, 2)
recherche(7)
application(7, 2)
recherche(8)
application(8, 8)
recherche(9)
application(9, 4)
Processus de Machine Learning usuel