Reputation: 51
i'm doing a competition in zindi plateform which they are using The evaluation metric for this challenge as Log Loss.
so i'm working with fastai library and i want the metric log loss .. i didn't find LogLoss as metric in this library !
i tried some codes like the function provided by sklearn from sklearn.metrics import log_loss
but i didn't work
the link of the competition : https://zindi.africa/competitions/basic-needs-basic-rights-kenya-tech4mentalhealth
Upvotes: 3
Views: 589
Reputation: 173
if needed as a metric (typically mostly used as a loss) you should be able to use cross_entropy function from pytorch:
import torch.nn.functional as F
metrics=[F.cross_entropy,(plus other metrics if needed)]
model= cnn_learner(data, model, metrics=metrics,...)
Upvotes: 2