Exemplo n.º 1
0
    def __init__(self,
                 p_x_y_,
                 card_T_,
                 posterior_mean,
                 posterior_var,
                 x_vec,
                 sigma_x,
                 symmetric_init=True,
                 nror=50,
                 KL_gmm=False):

        GenericIB.__init__(self, p_x_y_, card_T_, np.inf, [], nror)
        self.name = 'KL means IB'

        self.cardinality_X = p_x_y_.shape[1]
        self.cardinality_Y = p_x_y_.shape[0]

        self.p_y = self.p_x_y.sum(1)
        self.p_t = np.zeros(self.cardinality_T)
        self.x_vec = x_vec
        self.sigma_x = sigma_x

        self.symmetric_init = symmetric_init
        self.KL_gmm = KL_gmm

        # compute the posterior mean and variance of observation
        self.posterior_mean = posterior_mean
        self.posterior_var = posterior_var
Exemplo n.º 2
0
    def __init__(self, p_x_y_, card_T_):
        GenericIB.__init__(self, p_x_y_, card_T_, np.inf, [], 5)
        self.name = 'agglomerative IB'

        self.cardinality_X = p_x_y_.shape[1]
        self.cardinality_Y = p_x_y_.shape[0]
        self.cost_mat = np.zeros(
            (self.cardinality_Y, self.cardinality_Y)) + np.inf

        self.merge_costs = dict()

        self.index_list = np.arange(self.cardinality_Y).tolist()
        self.index_vec = np.arange(self.cardinality_Y)
Exemplo n.º 3
0
    def __init__(self, p_x_y_, card_T_,symmetric_init = False ,nror=50):
        GenericIB.__init__(self, p_x_y_, card_T_, np.inf, [], nror)
        self.name = 'KL means IB'

        self.cardinality_X=p_x_y_.shape[1]
        self.cardinality_Y=p_x_y_.shape[0]
        #self.cost_mat= np.zeros((self.cardinality_Y,self.cardinality_Y))+np.inf

        self.symmetric_init = symmetric_init
        self.p_y = self.p_x_y.sum(1)
        self.p_t = np.zeros(self.cardinality_T)

        # calculate p(x|y)
        self.p_x_given_y = self.p_x_y / self.p_y[:, np.newaxis]
Exemplo n.º 4
0
 def __init__(self, p_x_y_, card_T_, nror_):
     GenericIB.__init__(self, p_x_y_, card_T_, np.inf, [], nror_)
     self.name = 'symmetric sIB'
 def __init__(self, p_x_y_, card_T_, nror_):
     GenericIB.__init__(self, p_x_y_, card_T_, np.inf, [], nror_)
     self.name = 'sequential IB'
 def __init__(self, p_x_y_, card_T_, nror_):
     GenericIB.__init__(self, p_x_y_, card_T_, np.inf, [], nror_)
     self.name = 'modified sIB'
 def __init__(self, p_x_y_, card_T_, nror_):
     GenericIB.__init__(self, p_x_y_, card_T_, np.inf, [], nror_)
     self.name = 'linearized symmetric sIB'
     self.p_x_and_tilde_y = []
     self.sort_indices = []
     self.reconstruct_ind = []