Skip to content

Commit

Permalink
corrige pb
Browse files Browse the repository at this point in the history
  • Loading branch information
linogaliana committed Feb 20, 2024
1 parent ed90988 commit 4d9f1c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions applications/_ape.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,10 @@ df_test['prediction'] = predictions['prediction'].astype(str).str.replace(r'__la
```

```{python}
from sklearn.metrics import accuracy_score, f1_score
from sklearn.metrics import accuracy_score
accuracy_score(df_test['nace'],df_test['prediction'])
df['match'] = (df['nace']==df['prediction'])
df_test['match'] = (df_test['nace']==df_test['prediction'])
# Aggregating by 'nace' to count correct predictions and calculate accuracy
aggregation = df_test.groupby('nace').agg(correct_predictions=('match', 'sum'),
Expand Down

0 comments on commit 4d9f1c7

Please sign in to comment.