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

Overhaul to MapObjective #317

Open
dannys4 opened this issue Mar 9, 2023 · 1 comment
Open

Overhaul to MapObjective #317

dannys4 opened this issue Mar 9, 2023 · 1 comment

Comments

@dannys4
Copy link
Contributor

dannys4 commented Mar 9, 2023

Currently MapObjective is a nice idea, but has some flaws

  • KLObjective is not really measuring the KL, it's off by a constant. Maybe we just disregard this and call it a quirk.
  • In practice, we need regularization. It would be really cool to have another abstract class like RegularizedObjective::MapObjective, where we create an abstract class RegularizerBase with e.g. child class L2Regularizer(lambda). Then, we could do something like RegularizedObjective obj = KLObjective(train, test, dim) + L2Regularizer(0.05).
@dannys4
Copy link
Contributor Author

dannys4 commented May 17, 2023

Additionally, I think we should extricate the data samples from the Objective. I believe that the best code would be

MapObjective obj = KLObjective() + MapSamples(train, test, dim) + L2Regularizer(0.05)

so then we could easily do a map from density objective via

MapObjective obj = KLObjective() + LogDensity(density_fcn) + L2Regularizer(0.05)

Please let me know any thoughts

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

No branches or pull requests

1 participant