scrapinghub / python-crfsuite

A python binding for crfsuite
MIT License
771 stars 221 forks source link

Get loss value(s) during training #21

Open usptact opened 9 years ago

usptact commented 9 years ago

I would like to use a hyperparameter search algorithm to find the best hyperparameters (L1 and L2). For this I think the last loss value reported by the training algorithm can be useful.

Is there a way to get the last loss value computed during training?

kmike commented 9 years ago

Hey @usptact,

Trainer parses the log on-the-fly using _TrainLogParser object. It should be possible to access loss values using trainer.logparser.iterations[i]['loss'].