isoexp/contextual/contextual_linucb.py [44:71]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self.inv_design_matrices = np.zeros((self.K, d, d))
        self.bs = self.thetas_hat.copy()
        for arm in range(self.K):
            self.inv_design_matrices[arm] = np.eye(d, d) / self.reg_factor
        # self.range = 1
        # self.est_bound_theta = 0
        # self.est_bound_features = 0
        self.n_samples = np.zeros((self.K,))
        self.iteration = 0

    @property
    def n_actions(self):
        return self.K

    @property
    def n_features(self):
        return self.dim

    # def auto_alpha(self):
    #     d = self.n_features
    #     sigma, B, D = self.noise_variance, self.bound_theta, self.bound_features
    #     return sigma * np.sqrt(d * np.log((1 + max(1, self.iteration - 1) * D * D / self.reg_factor) / self.delta)) \
    #            + np.sqrt(self.reg_factor) * B

    def alpha(self):
        d = self.dim
 #       print(d)
        sigma, B, D = self.noise_variance, self.bound_context, self.bound_features
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



isoexp/contextual/contextual_linucb.py [259:276]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self.inv_design_matrices = np.zeros((self.K, d, d))
        self.bs = self.thetas_hat.copy()
        for arm in range(self.K):
            self.inv_design_matrices[arm] = np.eye(d, d) / self.reg_factor
        self.n_samples = np.zeros((self.K,))
        self.iteration = 0

    @property
    def n_actions(self):
        return self.K

    @property
    def n_features(self):
        return self.dim

    def alpha(self):
        d = self.dim
        sigma, B, D = self.noise_variance, self.bound_context, self.bound_features
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



