Ejemplo n.º 1
0
    def __init__(self,
                 D,
                 H,
                 Hprime,
                 gamma,
                 to_learn=['W', 'pi', 'sigma'],
                 comm=MPI.COMM_WORLD):
        """ MCA-ET init method.

        Takes data dimension *D*, number of hidden causes *H*, 
        and ET approximation parameters *Hprime* and *gamma*. Optional
        list of parameters *to_learn* and MPI *comm* object.    
        """
        CAModel.__init__(self, D, H, Hprime, gamma, to_learn, comm)

        #
        self.rho_temp_bound = 1.05  # for rho: never use a T smaller than this
        self.W_tol = 1e-4  # for W: ensure W[W<W_tol] = W_tol

        # Noise Policy
        W_tol = self.W_tol
        self.noise_policy = {
            'W': (W_tol, +np.inf, True),
            'pi': (W_tol, 1 - W_tol, False),
            'sigma': (W_tol, +np.inf, False)
        }
Ejemplo n.º 2
0
    def __init__(self,
                 D,
                 H,
                 Hprime,
                 gamma,
                 to_learn=['W', 'pi', 'sigma'],
                 comm=MPI.COMM_WORLD):
        """ MMCA-ET init method.

        Takes data dimension *D*, number of hidden causes *H*, 
        and ET approximation parameters *Hprime* and *gamma*. Optional
        list of parameters *to_learn* and MPI *comm* object.    
        """
        CAModel.__init__(self, D, H, Hprime, gamma, to_learn, comm)

        #
        self.rho_T_bound = 1.20  # for rho: never use a T smaller than this
        self.rho_lbound = 1  # for rho: never use a rho smaller than this
        self.rho_ubound = 35  # for rho: never use a rho larger than this
        self.tol = 1e-4  # for W: ensure W[W<tol] = tol

        self.rev_corr = False

        # Noise Policy
        tol = self.tol
        self.noise_policy = {
            'W': (-np.inf, +np.inf, False),
            'pi': (tol, 1 - tol, False),
            'sigma': (tol, +np.inf, False)
        }
Ejemplo n.º 3
0
 def __init__(self,
              D,
              H,
              Hprime,
              gamma,
              to_learn=['W', 'pi', 'sigma'],
              comm=MPI.COMM_WORLD):
     CAModel.__init__(self, D, H, Hprime, gamma, to_learn, comm)
Ejemplo n.º 4
0
    def __init__(self, D, H, Hprime, gamma, to_learn=["W", "pi", "sigma"], comm=MPI.COMM_WORLD):
        """ MCA-ET init method.

        Takes data dimension *D*, number of hidden causes *H*, 
        and ET approximation parameters *Hprime* and *gamma*. Optional
        list of parameters *to_learn* and MPI *comm* object.    
        """
        CAModel.__init__(self, D, H, Hprime, gamma, to_learn, comm)

        #
        self.rho_temp_bound = 1.05  # for rho: never use a T smaller than this
        self.W_tol = 1e-4  # for W: ensure W[W<W_tol] = W_tol

        # Noise Policy
        W_tol = self.W_tol
        self.noise_policy = {
            "W": (W_tol, +np.inf, True),
            "pi": (W_tol, 1 - W_tol, False),
            "sigma": (W_tol, +np.inf, False),
        }
Ejemplo n.º 5
0
    def __init__(self, D, H, Hprime, gamma, to_learn=['W', 'pi', 'sigma'], comm=MPI.COMM_WORLD):
        """ MMCA-ET init method.

        Takes data dimension *D*, number of hidden causes *H*, 
        and ET approximation parameters *Hprime* and *gamma*. Optional
        list of parameters *to_learn* and MPI *comm* object.    
        """
        CAModel.__init__(self, D, H, Hprime, gamma, to_learn, comm)
            
        # 
        self.rho_T_bound = 1.20       # for rho: never use a T smaller than this
        self.rho_lbound = 1           # for rho: never use a rho smaller than this
        self.rho_ubound = 35          # for rho: never use a rho larger than this
        self.tol = 1e-4               # for W: ensure W[W<tol] = tol

        self.rev_corr = False

        # Noise Policy
        tol = self.tol
        self.noise_policy = {
            'W'    : ( -np.inf,   +np.inf, False           ),
            'pi'   : (     tol,     1-tol, False           ),
            'sigma': (     tol,   +np.inf, False           )
        }
Ejemplo n.º 6
0
 def __init__(self, D, H, Hprime, gamma, to_learn=['W', 'pi', 'sigma'], comm=MPI.COMM_WORLD):
     CAModel.__init__(self, D, H, Hprime, gamma, to_learn, comm)