piiswrong commented on a change in pull request #7864: Enhancement for distributed sparse linear regression example URL: https://github.com/apache/incubator-mxnet/pull/7864#discussion_r140078898
########## File path: python/mxnet/metric.py ########## @@ -917,6 +917,73 @@ def update(self, labels, preds): self.sum_metric += (-numpy.log(prob + self.eps)).sum() self.num_inst += label.shape[0] +@register +@alias('log_loss') +class LogarithmicLoss(EvalMetric): + """Computes logarithmic loss. + + The cross entropy over a batch of sample size :math:`N` is given by + + .. math:: + -\\sum_{n=1}^{N}\\sum_{k=1}^{K}t_{nk}\\log (y_{nk}), + + where :math:`t_{nk}=1` if and only if sample :math:`n` belongs to class :math:`k`. Review comment: what's t and y? what's K? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services