Hem345 commited on
Commit
2d064e0
·
verified ·
1 Parent(s): e9ea34c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -43,8 +43,7 @@ def plot_training_and_test_data(X_train, y_train, X_test, predictions):
43
  plt.scatter(X_train[indices, 0], X_train[indices, 1], label=f'Training ({label})')
44
 
45
  # Plot test data with predicted labels
46
- numerical_predictions = np.arange(len(np.unique(predictions)))
47
- plt.scatter(X_test[:, 0], X_test[:, 1], label=f'Test (Predicted Labels)', marker='x', c=numerical_predictions[predictions])
48
 
49
  plt.xlabel('X-coordinate')
50
  plt.ylabel('Y-coordinate')
 
43
  plt.scatter(X_train[indices, 0], X_train[indices, 1], label=f'Training ({label})')
44
 
45
  # Plot test data with predicted labels
46
+ plt.scatter(X_test[:, 0], X_test[:, 1], label=f'Test (Predicted Labels)', marker='x', c=predictions)
 
47
 
48
  plt.xlabel('X-coordinate')
49
  plt.ylabel('Y-coordinate')