Ejemplo n.º 1
0
    def __init__(self, gm, accumulator=None, parameter=InfParam()):

        if accumulator is None:
            self.accumulator = defaultAccumulator(gm=gm)
        else:
            self.accumulator = accumulator
        kwargs = parameter.kwargs
        self.gm_ = gm

        self.arg_ = None
        self.value_ = None
        self.initType = kwargs.get('initType', 'localOpt')
Ejemplo n.º 2
0
    def __init__(self, gm, accumulator=None, parameter=InfParam()):

        if accumulator is None:
            self.accumulator = defaultAccumulator(gm=gm)
        else:
            self.accumulator = accumulator
        kwargs = parameter.kwargs
        self.gm_ = gm

        self.steps = kwargs.get('steps', 100)
        self.fusionSolver = kwargs.get('fuisionSolver', 'lf2')

        self.arg_ = None
        self.value_ = None

        self.fusionMover = inference.adder.minimizer.FusionMover(self.gm_)

        self.nLabels = self.gm_.numberOfLabels(0)
        self.nVar = self.gm_.numberOfVariables