Commit
•
163c84f
1
Parent(s):
1e03edb
Update news_category_similar_news_prediction.py
Browse files
news_category_similar_news_prediction.py
CHANGED
@@ -105,9 +105,10 @@ def add_flags_to_prediction_df(df):
|
|
105 |
df['text'] = headlines_desc
|
106 |
df['used_for_training'] = 0
|
107 |
df['allocated'] = 0
|
108 |
-
df.rename(columns={'category': 'y_pred', 'parsed_date': 'date_time'}, inplace=True)
|
109 |
|
110 |
df.drop(columns=['similar_news', 'src', 'title', 'description'], inplace=True)
|
|
|
111 |
return df
|
112 |
|
113 |
|
|
|
105 |
df['text'] = headlines_desc
|
106 |
df['used_for_training'] = 0
|
107 |
df['allocated'] = 0
|
108 |
+
df.rename(columns={'category': 'y_pred', 'parsed_date': 'date_time', 'pred_proba': 'y_pred_proba'}, inplace=True)
|
109 |
|
110 |
df.drop(columns=['similar_news', 'src', 'title', 'description'], inplace=True)
|
111 |
+
df['y_true_proba'] = df['y_pred_proba']
|
112 |
return df
|
113 |
|
114 |
|