Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -137,7 +137,7 @@ def visualize_ROC(set_threshold,set_input):
|
|
| 137 |
m1, c1 = 1, 0
|
| 138 |
x = np.linspace(0, 1, 500)
|
| 139 |
|
| 140 |
-
plt.plot(fpr_mod, tpr_mod, label = 'ROC', c='
|
| 141 |
|
| 142 |
plt.plot(x, x * m1 + c1, 'black', linestyle='--')
|
| 143 |
plt.xlim(0, 1)
|
|
@@ -281,7 +281,7 @@ def get_example():
|
|
| 281 |
np.random.seed(seed = 42)
|
| 282 |
|
| 283 |
N=100
|
| 284 |
-
pd_class1 = pd.DataFrame({'Sample Index': [i for i in range(1,int(N/4)+1)],'Predicted Prob': np.random.uniform(0.
|
| 285 |
pd_class2 = pd.DataFrame({'Sample Index': [i for i in range(int(N/4)+1,N+1)],'Predicted Prob': np.random.uniform(0,0.7,int(3*N/4)), 'Label (Y)': np.repeat(0,int(3*N/4))})
|
| 286 |
|
| 287 |
|
|
|
|
| 137 |
m1, c1 = 1, 0
|
| 138 |
x = np.linspace(0, 1, 500)
|
| 139 |
|
| 140 |
+
plt.plot(fpr_mod, tpr_mod, label = 'ROC', c='blue', linestyle='-')
|
| 141 |
|
| 142 |
plt.plot(x, x * m1 + c1, 'black', linestyle='--')
|
| 143 |
plt.xlim(0, 1)
|
|
|
|
| 281 |
np.random.seed(seed = 42)
|
| 282 |
|
| 283 |
N=100
|
| 284 |
+
pd_class1 = pd.DataFrame({'Sample Index': [i for i in range(1,int(N/4)+1)],'Predicted Prob': np.random.uniform(0.2,0.8,int(N/4)), 'Label (Y)': np.repeat(1,int(N/4))})
|
| 285 |
pd_class2 = pd.DataFrame({'Sample Index': [i for i in range(int(N/4)+1,N+1)],'Predicted Prob': np.random.uniform(0,0.7,int(3*N/4)), 'Label (Y)': np.repeat(0,int(3*N/4))})
|
| 286 |
|
| 287 |
|