Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Enhancement for distributed sparse linear regression example #7864

Merged
merged 10 commits into from
Oct 1, 2017

Conversation

eric-haibin-lin
Copy link
Member

  • added the log_loss metric used in avazu kaggle competition
  • removed irrelevant code in the LR example
  • added a readme file to the sparse folder

@szha

@eric-haibin-lin eric-haibin-lin changed the title enhancement for distributed sparse linear regression example [WIP] enhancement for distributed sparse linear regression example Sep 13, 2017
@eric-haibin-lin eric-haibin-lin changed the title [WIP] enhancement for distributed sparse linear regression example Enhancement for distributed sparse linear regression example Sep 16, 2017
@@ -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):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where does the name come from?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log loss used in avazu kaggle competition
https://www.kaggle.com/wiki/LogLoss

.. 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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's t and y? what's K?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to update the equation for log loss... Will update it later

@piiswrong piiswrong merged commit 36043b9 into apache:master Oct 1, 2017
crazy-cat pushed a commit to crazy-cat/incubator-mxnet that referenced this pull request Oct 26, 2017
…7864)

* add log loss

* update sparse LR example

* add readme

* fix typo

* fix lint

* change name from log loss to nll

* lint

* enhance test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants