Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -99,7 +99,7 @@ def plot_figure(N, u1, std1, u2, std2, show_dist, classifier=None):
|
|
| 99 |
#zz = np.array( [model_sk.predict( [[xx,yy]])[0] for xx, yy in zip(np.ravel(X), np.ravel(Y)) ] )
|
| 100 |
|
| 101 |
#Reshaping the predicted class into the meshgrid shape
|
| 102 |
-
Z = zz.reshape(
|
| 103 |
|
| 104 |
pp.pcolormesh(xx, yy, Z, cmap=cmap_light, alpha=0.2)
|
| 105 |
elif classifier == 'QDA':
|
|
@@ -114,7 +114,7 @@ def plot_figure(N, u1, std1, u2, std2, show_dist, classifier=None):
|
|
| 114 |
#zz = np.array( [model_sk.predict( [[xx,yy]])[0] for xx, yy in zip(np.ravel(X), np.ravel(Y)) ] )
|
| 115 |
|
| 116 |
#Reshaping the predicted class into the meshgrid shape
|
| 117 |
-
Z = zz.reshape(
|
| 118 |
|
| 119 |
print("Z: ",Z)
|
| 120 |
pp.pcolormesh(xx, yy, Z, cmap=cmap_light, alpha=0.2)
|
|
|
|
| 99 |
#zz = np.array( [model_sk.predict( [[xx,yy]])[0] for xx, yy in zip(np.ravel(X), np.ravel(Y)) ] )
|
| 100 |
|
| 101 |
#Reshaping the predicted class into the meshgrid shape
|
| 102 |
+
Z = zz.reshape(xx.shape)
|
| 103 |
|
| 104 |
pp.pcolormesh(xx, yy, Z, cmap=cmap_light, alpha=0.2)
|
| 105 |
elif classifier == 'QDA':
|
|
|
|
| 114 |
#zz = np.array( [model_sk.predict( [[xx,yy]])[0] for xx, yy in zip(np.ravel(X), np.ravel(Y)) ] )
|
| 115 |
|
| 116 |
#Reshaping the predicted class into the meshgrid shape
|
| 117 |
+
Z = zz.reshape(xx.shape)
|
| 118 |
|
| 119 |
print("Z: ",Z)
|
| 120 |
pp.pcolormesh(xx, yy, Z, cmap=cmap_light, alpha=0.2)
|