Package jdistlib.inference
Class ResidualInformedSparseCandidateProposal
java.lang.Object
jdistlib.inference.ResidualInformedSparseCandidateProposal
- All Implemented Interfaces:
AutoCloseable,SparseCandidateProposal
public final class ResidualInformedSparseCandidateProposal
extends Object
implements SparseCandidateProposal
Locally informed candidate proposal using a prepared
X'v product.
A uniform mixture component preserves support for every inactive candidate.-
Constructor Summary
ConstructorsConstructorDescriptionResidualInformedSparseCandidateProposal(PreparedTransposeProduct product, SparseResidualProvider residuals, double temperature, double uniformMixture) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()doublelogProbability(int candidate, SparseSubsetState state, SparseSubsetTarget target) sample(SparseSubsetState state, SparseSubsetTarget target, RandomEngine random)
-
Constructor Details
-
ResidualInformedSparseCandidateProposal
public ResidualInformedSparseCandidateProposal(PreparedTransposeProduct product, SparseResidualProvider residuals, double temperature, double uniformMixture)
-
-
Method Details
-
sample
public SparseCandidateChoice sample(SparseSubsetState state, SparseSubsetTarget target, RandomEngine random) - Specified by:
samplein interfaceSparseCandidateProposal
-
logProbability
- Specified by:
logProbabilityin interfaceSparseCandidateProposal
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSparseCandidateProposal
-