You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
as I mentioned in my PR #3, there seems to be some UserWarnings raised when KDE is fit with a small number of samples. I put here a small chunk of code which reproduces the warning; that is using my code from #3, so using the ABCpy inference scheme. I have not tried with the other algorithms yet.
I realize there is not much you can do about this as it is due to KDE, but maybe it can be helpful to provide a more explicit warning message saying that the number of samples for KDE are small? Not sure, I realize also this is not super important.
import sbibm
task_name = "two_moons"
task = sbibm.get_task(task_name) # See sbibm.get_available_tasks() for all tasks
prior = task.get_prior()
simulator = task.get_simulator()
observation = task.get_observation(num_observation=1) # 10 per task
from sbibm.algorithms.abcpy.rejection_abc import (
run as rej_abc,
)
num_simulations = 1000
num_samples = 10000
posterior_samples, _, _ = rej_abc(
task=task,
num_samples=num_samples,
num_observation=1,
num_simulations=num_simulations,
num_top_samples=30,
kde_bandwidth="cv",
)
The text was updated successfully, but these errors were encountered:
#8 adds additional information to the logging message when using KDE. We give this additional general info instead of an actual UserWarning because it is not clear when exactly there too few samples, e.g., how it depends on the number of samples and the number of dimensions of the distribution.
Hello,
as I mentioned in my PR #3, there seems to be some UserWarnings raised when KDE is fit with a small number of samples. I put here a small chunk of code which reproduces the warning; that is using my code from #3, so using the ABCpy inference scheme. I have not tried with the other algorithms yet.
I realize there is not much you can do about this as it is due to KDE, but maybe it can be helpful to provide a more explicit warning message saying that the number of samples for KDE are small? Not sure, I realize also this is not super important.
The text was updated successfully, but these errors were encountered: