Update app.py
Browse files
app.py
CHANGED
@@ -27,6 +27,7 @@ def getColorMap(kernel, gamma):
|
|
27 |
Z = clf.decision_function(np.c_[xx.ravel(), yy.ravel()])
|
28 |
Z = Z.reshape(xx.shape)
|
29 |
|
|
|
30 |
plt.imshow(
|
31 |
Z,
|
32 |
interpolation="nearest",
|
@@ -34,7 +35,7 @@ def getColorMap(kernel, gamma):
|
|
34 |
aspect="auto",
|
35 |
origin="lower",
|
36 |
cmap=plt.cm.PuOr_r,
|
37 |
-
)
|
38 |
contours = plt.contour(xx, yy, Z, levels=[0], linewidths=2, linestyles="dashed")
|
39 |
plt.scatter(X[:, 0], X[:, 1], s=30, c=Y, cmap=plt.cm.Paired, edgecolors='k')
|
40 |
plt.title(f"Decision function for Non-Linear SVC with the {kernel} kernel and '{gamma}' gamma ", fontsize='14') #title
|
|
|
27 |
Z = clf.decision_function(np.c_[xx.ravel(), yy.ravel()])
|
28 |
Z = Z.reshape(xx.shape)
|
29 |
|
30 |
+
plt.figure(figsize=(5, 5))
|
31 |
plt.imshow(
|
32 |
Z,
|
33 |
interpolation="nearest",
|
|
|
35 |
aspect="auto",
|
36 |
origin="lower",
|
37 |
cmap=plt.cm.PuOr_r,
|
38 |
+
)
|
39 |
contours = plt.contour(xx, yy, Z, levels=[0], linewidths=2, linestyles="dashed")
|
40 |
plt.scatter(X[:, 0], X[:, 1], s=30, c=Y, cmap=plt.cm.Paired, edgecolors='k')
|
41 |
plt.title(f"Decision function for Non-Linear SVC with the {kernel} kernel and '{gamma}' gamma ", fontsize='14') #title
|