Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add loss function equations for each distribution to Docs #7392

Closed
exalate-issue-sync bot opened this issue May 11, 2023 · 2 comments
Closed

Add loss function equations for each distribution to Docs #7392

exalate-issue-sync bot opened this issue May 11, 2023 · 2 comments
Assignees

Comments

@exalate-issue-sync
Copy link

Users have been confused on which loss functions are used within H2O 3. Providing equations to docs will reduce confusion.

Request:
Add loss function equations (below) to [https://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/algo-params/distribution.html|https://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/algo-params/distribution.html] .

bernoulli
−2w(y∗log⁡(f)+(1−y)∗log⁡(1−f))

quasibinomial
y==f:
0

f>1:
−2w∗y∗log⁡(f)
f<0:
−2w∗(1−y)∗log⁡(1−f)
else:
−2w∗(y∗log⁡(f)+(1−y)∗log⁡(1−f))

gaussian
Equivalent to wMSE (weighted mean squared error):
w∗(y−f)^2

poisson
with f = link(f)
−2w∗(y∗f−exp( f ))

gamma
with f = link(f)
2w∗(y∗exp⁡(−f)+f)

laplace
w∗|y−f|

quantile
y > f:
wQuantileAlpha(y-f)
y≤f:
w∗(1−QuantileAlpha)∗(f−y)

huber

|y-f| ≤Huber_Delta :

  w*(y-f)^2   (Equivalent to wMSE)

y≤f:

  2w∗(|y−f|  −Huber_Delta)∗Huber_Delta (Equivalent to wMAE)

modified_huber
with yf = (2y-1)f
yf <−1:
-4w
(yf)
yf>1:
0
else:
w*(yf)^2

tweedie
with f = link(f), requires 1> _tweediePower > 2 :
2wy^(2-Tweedie_Power)/((1-Tweedie_Power)(2-Tweedie_Power)) - yexp(f(1-Tweedie_Power))/(1-Tweedie_Power)+exp(f*(2-Tweedie_Power))/(2-Tweedie_Power)

[~accountid:5bd237b8dd3cc64b77e71676], please verify the definitions are correct. The equations were created based on code: [https://github.com/h2oai/h2o-3/blob/master/h2o-core/src/main/java/hex/DistributionFactory.java|https://github.com/h2oai/h2o-3/blob/master/h2o-core/src/main/java/hex/DistributionFactory.java]

@h2o-ops
Copy link
Collaborator

h2o-ops commented May 14, 2023

JIRA Issue Details

Jira Issue: PUBDEV-8261
Assignee: hannah.tillman
Reporter: Neema Mashayekhi
State: Resolved
Fix Version: 3.34.0.1
Attachments: N/A
Development PRs: Available

@h2o-ops
Copy link
Collaborator

h2o-ops commented May 14, 2023

Linked PRs from JIRA

#5623

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants