Suchinthana commited on
Commit
80208be
·
1 Parent(s): 4f9f9c2

changing variables

Browse files
Files changed (1) hide show
  1. app.py +20 -16
app.py CHANGED
@@ -34,20 +34,22 @@ def predict_and_plot_logreg(dirty, wait, lastyear, usa):
34
 
35
  plt.figure(figsize=(12, 6))
36
 
 
37
  plt.subplot(1, 2, 1)
38
- plt.scatter(X_test.iloc[:, 1], y_test, color='blue', alpha=0.6, label='Actual Good Values')
39
- plt.scatter(wait, predicted_value, color='red', label=f'Input: Wait={wait}, Predicted Good={predicted_value:.2f}', zorder=5)
40
- plt.title('Wait vs Good')
41
- plt.xlabel('Wait')
42
  plt.ylabel('Good')
43
  plt.legend()
44
  plt.grid(True)
45
 
 
46
  plt.subplot(1, 2, 2)
47
- plt.scatter(X_test.iloc[:, 3], y_test, color='blue', alpha=0.6, label='Actual Good Values')
48
- plt.scatter(usa, predicted_value, color='red', label=f'Input: USA={usa}, Predicted Good={predicted_value:.2f}', zorder=5)
49
- plt.title('USA vs Good')
50
- plt.xlabel('USA')
51
  plt.ylabel('Good')
52
  plt.legend()
53
  plt.grid(True)
@@ -67,20 +69,22 @@ def predict_and_plot_nn(dirty, wait, lastyear, usa):
67
 
68
  plt.figure(figsize=(12, 6))
69
 
 
70
  plt.subplot(1, 2, 1)
71
- plt.scatter(X_test.iloc[:, 1], y_test, color='blue', alpha=0.6, label='Actual Good Values')
72
- plt.scatter(wait, predicted_value, color='red', label=f'Input: Wait={wait}, Predicted Good={predicted_value:.2f}', zorder=5)
73
- plt.title('Wait vs Good (NN)')
74
- plt.xlabel('Wait')
75
  plt.ylabel('Good')
76
  plt.legend()
77
  plt.grid(True)
78
 
 
79
  plt.subplot(1, 2, 2)
80
- plt.scatter(X_test.iloc[:, 3], y_test, color='blue', alpha=0.6, label='Actual Good Values')
81
- plt.scatter(usa, predicted_value, color='red', label=f'Input: USA={usa}, Predicted Good={predicted_value:.2f}', zorder=5)
82
- plt.title('USA vs Good (NN)')
83
- plt.xlabel('USA')
84
  plt.ylabel('Good')
85
  plt.legend()
86
  plt.grid(True)
 
34
 
35
  plt.figure(figsize=(12, 6))
36
 
37
+ # Dirty vs Good plot
38
  plt.subplot(1, 2, 1)
39
+ plt.scatter(X_test.iloc[:, 0], y_test, color='blue', alpha=0.6, label='Actual Good Values') # X_test.iloc[:, 0] corresponds to 'dirty'
40
+ plt.scatter(dirty, predicted_value, color='red', label=f'Input: Dirty={dirty}, Predicted Good={predicted_value:.2f}', zorder=5)
41
+ plt.title('Dirty vs Good')
42
+ plt.xlabel('Dirty')
43
  plt.ylabel('Good')
44
  plt.legend()
45
  plt.grid(True)
46
 
47
+ # Wait vs Good plot
48
  plt.subplot(1, 2, 2)
49
+ plt.scatter(X_test.iloc[:, 1], y_test, color='blue', alpha=0.6, label='Actual Good Values')
50
+ plt.scatter(wait, predicted_value, color='red', label=f'Input: Wait={wait}, Predicted Good={predicted_value:.2f}', zorder=5)
51
+ plt.title('Wait vs Good')
52
+ plt.xlabel('Wait')
53
  plt.ylabel('Good')
54
  plt.legend()
55
  plt.grid(True)
 
69
 
70
  plt.figure(figsize=(12, 6))
71
 
72
+ # Dirty vs Good plot
73
  plt.subplot(1, 2, 1)
74
+ plt.scatter(X_test.iloc[:, 0], y_test, color='blue', alpha=0.6, label='Actual Good Values') # X_test.iloc[:, 0] corresponds to 'dirty'
75
+ plt.scatter(dirty, predicted_value, color='red', label=f'Input: Dirty={dirty}, Predicted Good={predicted_value:.2f}', zorder=5)
76
+ plt.title('Dirty vs Good (NN)')
77
+ plt.xlabel('Dirty')
78
  plt.ylabel('Good')
79
  plt.legend()
80
  plt.grid(True)
81
 
82
+ # Wait vs Good plot
83
  plt.subplot(1, 2, 2)
84
+ plt.scatter(X_test.iloc[:, 1], y_test, color='blue', alpha=0.6, label='Actual Good Values')
85
+ plt.scatter(wait, predicted_value, color='red', label=f'Input: Wait={wait}, Predicted Good={predicted_value:.2f}', zorder=5)
86
+ plt.title('Wait vs Good (NN)')
87
+ plt.xlabel('Wait')
88
  plt.ylabel('Good')
89
  plt.legend()
90
  plt.grid(True)