开发者

Mallet : Get confidence value in Maxent algorithm

开发者 https://www.devze.com 2023-03-17 04:27 出处:网络
I am using the maxent algo in mallet for label classification. I was wondering whether it is possible to get some kind of confidence value for the label predicted by the maxent classifier. What I basi

I am using the maxent algo in mallet for label classification. I was wondering whether it is possible to get some kind of confidence value for the label predicted by the maxent classifier. What I basically ne开发者_JAVA百科ed is the top K prediction(not for each token, but from entire data) instances that the classifier is most confident about and use them for bootstrapping. Is there any way to do this ?


Look at the Labeling object returned when you call any mallet classify method. This class contains all of the computed scores for each label: the best one becomes the answer (this is the one returned by getBestLabel() method). The rub is that these scores are not usually probabilities. I'm not familiar with mallet's maxent classifier--you will need to look at the code and determine if the returned scores can be "cast" to probabilities somehow or perhaps are already in the proper form. At any rate it sounds like what you want to do is assign meaning to the relative difference between the top K scores. Again, this depends on the exact details of the maxent classifier. So look at the Labeling object instances actually returned on your data set and use your best judgement.

Hope this helps!

0

精彩评论

暂无评论...
验证码 换一张
取 消