DensityRatioEstimation.jl
DensityRatioEstimation.jl copied to clipboard
densratiofunc never terminates
using DensityRatioEstimation, Optim
d = densratiofunc(5randn(100), randn(1000), KLIEP())
I am running this but it takes forever. Seems it will never finish.
I can reproduce the issue. Thank you for reporting. Will take a look into it.
@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.
The issue is indeed in Optim.jl, reported here: https://github.com/JuliaNLSolvers/Optim.jl/issues/1121
@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.