Open hjyoon93 opened 8 months ago
Inside approximate inference using sampling class,
there is this "query" function as below.
query(variables, n_samples=10000, samples=None, evidence=None, virtual_evidence=None, joint=True, state_names=None, show_progress=True, seed=None)
If I sample using "n_samples=100", what sampling method does it use to sample 100 samples?
Is it forward sampling, rejection sampling or likelihood weighted sampling?
And If I use query method to do sampling, does it sample based on evidence I give?
@hjyoon93 When no evidence is provided, it does a forward sampling. When evidence is provided, it does a rejection sampling till the specified number of samples are generated that satisfy the given evidence.
Inside approximate inference using sampling class,
there is this "query" function as below.
query(variables, n_samples=10000, samples=None, evidence=None, virtual_evidence=None, joint=True, state_names=None, show_progress=True, seed=None)
If I sample using "n_samples=100", what sampling method does it use to sample 100 samples?
Is it forward sampling, rejection sampling or likelihood weighted sampling?
And If I use query method to do sampling, does it sample based on evidence I give?