Open emilijapur opened 2 years ago
Hey, @SteveBronder, how are you doing? Did You have an opportunity to look into this issue?
Hi sorry I meant to get to this during the week but had to work on the laplace approximations. I should have some time next week to take a look at this
Hello just to update looking at this now. It seems odd, but also optimize also gives back wonky results so it may be just because the pathfinder schema is based on lbfgs. Another issue here is that the program spends a looong time just generating error log messages which is the main cause of the slowdown.
@bob-carpenter right now in pathfinder we log an error for each approximate sample if we go over the number of evaluation attempts. Would it be okay if we only log an error only if we are unable to sample any approximate samples?
Yes, I think it's fine to cut down on the logging. The point is to get a message to the user so they can diagnose their code.
We can't really do anything if optimize is giving wonky results other than use better optimizers.
Sorry, I didn't get You. Is it a bug in my code? Because this code works with different inference methods (i.e. HMC). Are You going to look deeper into this problem?
Is it a bug in my code?
Idk, but your code works for HMC so this could very well just be a problem that LBFGS cannot do well.
Are You going to look deeper into this problem?
Yes I'm sending this over to Lu to look at as well. It's good to have models that break so this is very appreciated!
Hello again. I was trying out pathfinder algorithm for SEM model and my code works for different methods (HMC, Variational inference), however it always fails when using Pathfinder algorithm.
My code with generated data:
And while fitting with pathfinder I get errors:
Maybe I shall change some of my parameters ant that is why all iterations diverge? Or is it some deeper problem, i.e. pathfinder can not be used for Structual Equation Modelling (SEM)? Where could I read documentation or maybe see Raw code in order to know what each parameter does?
Thanks for help!