-2

I am trying to use graphlab.evaluation.log_loss function though I can't import it. I try to use log_loss function :

evaluation.log_loss(..)

but I get the following error: " AttributeError: 'module' object has no attribute 'log_loss'" though other metrics such as confusion_matrix, rmse and others are working. Any ideas?

Community
  • 1
  • 1
ig-melnyk
  • 2,769
  • 2
  • 25
  • 35
  • What OS and graphlab version are you using? On a side note, I think the more pythonic pattern would be `from graphlab import evaluation`. – papayawarrior Dec 22 '15 at 18:07
  • @papayawarrior you are about "from graphlab import evalution". Version : '1.6.1'. OS : Mac OS X El Capitan – ig-melnyk Dec 22 '15 at 19:42

1 Answers1

2

The log_loss evaluation function was added in GraphLab Create version 1.7, so upgrading should do the trick.

>>> import graphlab
>>> graphlab.version
'1.7.1'

>>> from graphlab import evaluation
>>> evaluation.log_loss(graphlab.SArray([1, 0, 1]), 
                        graphlab.SArray([0.7, 0.4, 0.8]))
0.3635480396729776
papayawarrior
  • 1,027
  • 7
  • 10