Module Index : Topics : Keywords
 
 
structure_learning.proposals.proposal
index
/Users/165421/Documents/code/structure_learning/src/structure_learning/proposals/proposal.py

 
Modules
       
numpy

 
Classes
       
abc.ABC(builtins.object)
StructureLearningProposal

 
class StructureLearningProposal(abc.ABC)
    StructureLearningProposal(initial_state: ~State, blacklist=None, whitelist=None, seed: int = 32)
 
Base class for proposal classes for structure learning using MCMC.
All inheriting classes must implement the following methods:
    propose() -> graph : numpy.ndarray, operation : str
    compute_acceptance_ratio() -> float
 
 
Method resolution order:
StructureLearningProposal
abc.ABC
builtins.object

Methods defined here:
__init__(self, initial_state: ~State, blacklist=None, whitelist=None, seed: int = 32)
Initialise StructureLearningProposal instance.
 
Parameters:
    graph (networkx.DiGraph): graph
    blacklist (numpy.ndarray): mask for edges to ignore in the proposal
    whitelist (numpy.ndarray): mask for edges to include in the proposal
accept(self)
compute_acceptance_ratio(self, current_state_score, proposed_state_score, current_state_prior=0, proposed_state_prior=0) -> float
get_nodes_to_rescore(self) -> List[str]
propose(self) -> Tuple[~State, str]
Propose a DAG

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

Data and other attributes defined here:
INITIAL = 'initial'
STAY_STILL = 'stay_still'
__abstractmethods__ = frozenset({'compute_acceptance_ratio', 'get_nodes_to_rescore', 'propose'})
operations = ['stay_still']

 
Data
        List = typing.List
State = ~State
Tuple = typing.Tuple