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

densratiofunc never terminates #74

Open
3f6a opened this issue Nov 26, 2024 · 4 comments
Open

densratiofunc never terminates #74

3f6a opened this issue Nov 26, 2024 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@3f6a
Copy link

3f6a commented Nov 26, 2024

using DensityRatioEstimation, Optim
d = densratiofunc(5randn(100), randn(1000), KLIEP())

I am running this but it takes forever. Seems it will never finish.

@juliohm
Copy link
Member

juliohm commented Nov 26, 2024

I can reproduce the issue. Thank you for reporting. Will take a look into it.

@juliohm juliohm added the bug Something isn't working label Nov 26, 2024
@juliohm
Copy link
Member

juliohm commented Nov 26, 2024

@3f6a this is actually a problem with the Optim backend. If you switch to ConvexLib for example, it works as expected:

using DensityRatioEstimation, Convex, ECOS

d = densratiofunc(5randn(100), randn(1000), KLIEP(), optlib=ConvexLib)

I am investigating if something changed in Optim.jl that could potentially affect the convergence rate here.

In any case, I am also investigating a complete refactor to help end-users. The approach with extensions is non-trivial as we need to load both the optimization framework (Convex.jl) and the solver (ECOS.jl) for it to work.

@juliohm
Copy link
Member

juliohm commented Nov 26, 2024

The issue is indeed in Optim.jl, reported here: JuliaNLSolvers/Optim.jl#1121

@juliohm juliohm added help wanted Extra attention is needed and removed bug Something isn't working labels Nov 27, 2024
@juliohm
Copy link
Member

juliohm commented Nov 27, 2024

@3f6a as a side note, I would simply use SLIC instead of KLIEP as it is much faster and produces better results in general. Still, we need to fix the issue with the Optim.jl backend. Any help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants