IUM_06
This commit is contained in:
parent
8976e3ad75
commit
9fdca1cb31
@ -6,9 +6,10 @@ from math import sqrt
|
||||
data = pd.read_csv('beer_review_sentiment_predictions.csv')
|
||||
y_pred = data['Predictions']
|
||||
y_test = data['Actual']
|
||||
y_test_binary = (y_test >= 3).astype(int)
|
||||
|
||||
# Calculate metrics
|
||||
accuracy = accuracy_score(y_test, y_pred.round())
|
||||
accuracy = accuracy_score(y_test_binary, y_pred.round())
|
||||
precision, recall, f1, _ = precision_recall_fscore_support(y_test, y_pred.round(), average='micro')
|
||||
rmse = sqrt(mean_squared_error(y_test, y_pred))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user