# Path: pyglm/components/priors.py
# def create_prior(model, **kwargs):
#     typ = model['type'].lower()
#     if typ == 'normal' or \
#        typ == 'gaussian':
#        return Gaussian(model, **kwargs)
#     elif typ == 'categorical':
#        return Categorical(model, **kwargs)
#     elif typ == 'jointcategorical' or \
#          typ == 'joint_categorical':
#        return JointCategorical(model, **kwargs)
#     elif typ == 'spherical_gaussian':
#         return SphericalGaussian(model, **kwargs)
#     elif typ == 'group_lasso' or \
#          typ == 'grouplasso':
#         return GroupLasso(model, **kwargs)
#     elif typ == 'dpp':
#         return DeterminenalPointProcess(model, **kwargs)
#     elif typ == 'dirichlet':
#         return Dirichlet(model)
#     else:
#         raise Exception("Unrecognized prior type: %s" % typ)


import numpy as np
import theano.tensor as T
from component import Component
from pyglm.components.priors import create_prior
        """ Initialize the filtered stim model
        """
        self.model = model
        N = model['N']

        prms = model['network']['weight']
        self.value = prms['value']
        
        # Define weight matrix
        self.W = self.value * T.ones((N,N))

        # Define log probability
        self.log_p = T.constant(0.0)

    def get_state(self):
        return {'W': self.W}
    
class GaussianWeightModel(Component):
    def __init__(self, model):
        """ Initialize the filtered stim model
        """
        self.model = model
        N = model['N']
        prms = model['network']['weight']

        self.prior = create_prior(prms['prior'])
	
        # Implement refractory period by having negative mean on self loops
        if 'refractory_prior' in prms:
            #self.mu[np.diag_indices(N)] = prms['mu_refractory']

# Path: pyglm/components/priors.py
# def create_prior(model, **kwargs):
#     typ = model['type'].lower()
#     if typ == 'normal' or \
#        typ == 'gaussian':
#        return Gaussian(model, **kwargs)
#     elif typ == 'categorical':
#        return Categorical(model, **kwargs)
#     elif typ == 'jointcategorical' or \
#          typ == 'joint_categorical':
#        return JointCategorical(model, **kwargs)
#     elif typ == 'spherical_gaussian':
#         return SphericalGaussian(model, **kwargs)
#     elif typ == 'group_lasso' or \
#          typ == 'grouplasso':
#         return GroupLasso(model, **kwargs)
#     elif typ == 'dpp':
#         return DeterminenalPointProcess(model, **kwargs)
#     elif typ == 'dirichlet':
#         return Dirichlet(model)
#     else:
#         raise Exception("Unrecognized prior type: %s" % typ)


# Path: pyglm/components/weights.py
import numpy as np
import theano.tensor as T
from component import Component
from pyglm.components.priors import create_prior

        """ Initialize the filtered stim model
        """
        self.model = model
        N = model['N']

        prms = model['network']['weight']
        self.value = prms['value']
        
        # Define weight matrix
        self.W = self.value * T.ones((N,N))

        # Define log probability
        self.log_p = T.constant(0.0)

    def get_state(self):
        return {'W': self.W}
    
class GaussianWeightModel(Component):
    def __init__(self, model):
        """ Initialize the filtered stim model
        """
        self.model = model
        N = model['N']
        prms = model['network']['weight']

        self.prior = create_prior(prms['prior'])
	
        # Implement refractory period by having negative mean on self loops
        if 'refractory_prior' in prms:
            #self.mu[np.diag_indices(N)] = prms['mu_refractory']

            self.refractory_prior = create_prior(prms['refractory_prior'])