Exemplo n.º 1
0
    def create_updater(self):
        dt = 1. / 180
        batch_time = 1. / 60
        batch_size = batch_time / dt
        half_life = 120.
        rho = np.exp(np.log(0.5) / (half_life / batch_time))

        #self.updater = clda.PPFContinuousBayesianUpdater(self.decoder)
        self.updater = clda.PPFSmoothbatchSingleThread()
        self.updater.rho = rho
        self.updater.batch_time = batch_time
Exemplo n.º 2
0
                                                    encoder.units,
                                                    dt=dt,
                                                    dist_units='m')
decoder_rml = train._train_PPFDecoder_sim_known_beta(beta_est,
                                                     encoder.units,
                                                     dt=dt,
                                                     dist_units='m')

# Initialize learner and updater
batch_time = 60.
batch_size = batch_time / dt
half_life = 120.
rho = np.exp(np.log(0.5) / (half_life / batch_time))

learner = clda.BatchLearner(batch_size)
updater_sb = clda.PPFSmoothbatchSingleThread()
updater_sb.rho = rho

updater_cont = clda.PPFContinuousBayesianUpdater(decoder_rml)
updater_cont.rho = -1

## RUN
n_iter = X.shape[0]
spike_counts = data['spike_counts']
beta_hist = []

beta_cont_hist = np.zeros([n_iter, n_neurons, 3])
beta_cont_hist[0, :, -1] = beta[:, -1]

I = np.mat(np.eye(3 * n_neurons))
R_diag_neuron = 1e-4 * np.array([0.13, 0.13, 0.06 / 50])