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

API: Loss #2

Open
jonas-eschle opened this issue Nov 28, 2020 · 0 comments
Open

API: Loss #2

jonas-eschle opened this issue Nov 28, 2020 · 0 comments
Labels
API discussion Definition of API and discussion

Comments

@jonas-eschle
Copy link
Contributor

Discusson to find the optimal loss (objective, cost function) API for likelihood(-like) minimization.

Questions

Simultaneous losses

A simultaneous fit adds multiple likelihoods. How should they be combined?

  • two kinds of losses: a simple one and a simultaneous; the latter stores multiple simple ones, if two simultaneous are combined, a new simultaneous, flattened is returned.

  • one kind of loss: simple ones that can have multiple data and models. Disadvantage: how to combine different losses that are not of the same kind? Is there a real usecase for this? E.g. extended and non-extended NLL?

API

initialization

  • model with pdf (or similar) attribute or callable
  • data that can be given to model
  • constraints (or similar)

value()

A method that calculates the value of the loss. Maybe can take the parameter values (therefore also a method, not an attribute).

value_and_gradient()

Calculate the value and the gradients, can be not implemented.

get_params()

An option to get all possible tunable parameters. Can be useful but maybe too specific?

errordef

Definition of the 1 sigma error. Should this be a method that takes nsigma as argument?

data

An attribute to access the input data that was used (single or multiple)

model

An attribute to access the model that was used (single or multiple)

constraints

Or other name? Additional terms added to the likelihood function that do not fit the "data and model" scheme, such as boundary penalization or gaussian constraints with auxiliary measurements of single parameters.

@jonas-eschle jonas-eschle added the API discussion Definition of API and discussion label Nov 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API discussion Definition of API and discussion
Projects
None yet
Development

No branches or pull requests

1 participant