Example #1
0
 def __init__(self, forward_model=None, data=None, ll_params=None, spatial_model=None, initial_tree=None):
     """
     Constructor for AoMRSimpleShapeState
     Note that the first parameter ``grammar`` of base class AoMRShapeState is removed because 
     this class is a grammar specific implementation
     """
     self.MAXIMUM_DEPTH = 5
     ShapeGrammarState.__init__(self, grammar=aomr_simple_shape_pcfg, forward_model=forward_model, 
                                data=data, ll_params=ll_params, spatial_model=spatial_model, 
                                initial_tree=initial_tree)
 def __init__(self, forward_model=None, data=None, ll_params=None, spatial_model=None, initial_tree=None):
     """
     Constructor for AoMRShapeState
     Note that the first parameter ``grammar`` of base class AoMRShapeState is removed because 
     this class is a grammar specific implementation
     """
     self.moves = [self.subtree_proposal, self.add_remove_branch_proposal, 
                   self.change_part_proposal, self.add_remove_part_proposal]
     ShapeGrammarState.__init__(self, grammar=aomr_shape_pcfg, forward_model=forward_model, 
                                data=data, ll_params=ll_params, spatial_model=spatial_model, 
                                initial_tree=initial_tree)
 def __init__(self,
              forward_model=None,
              data=None,
              ll_params=None,
              spatial_model=None,
              initial_tree=None):
     """
     Constructor for AoMRShapeState
     Note that the first parameter ``grammar`` of base class AoMRShapeState is removed because 
     this class is a grammar specific implementation
     """
     self.moves = [
         self.subtree_proposal, self.add_remove_branch_proposal,
         self.change_part_proposal, self.add_remove_part_proposal
     ]
     ShapeGrammarState.__init__(self,
                                grammar=aomr_shape_pcfg,
                                forward_model=forward_model,
                                data=data,
                                ll_params=ll_params,
                                spatial_model=spatial_model,
                                initial_tree=initial_tree)