Beispiel #1
0
 def __init__(self,
              lambda_weights: float = 0.1,
              lambda_leaves: float = 0.1,
              **loss_kwargs):
     super().__init__(lambda_weights, lambda_leaves, **loss_kwargs)
     check_pars(self.required_pars, **loss_kwargs)
     self.alphas = self.kwargs['alphas']
Beispiel #2
0
 def __init__(self,
              lambda_weights: float = 0.1,
              lambda_leaves: float = 0.1,
              **loss_kwargs):
     super().__init__(lambda_weights, lambda_leaves, **loss_kwargs)
     check_pars(self.required_pars, **loss_kwargs)
     self.n_harmonics = self.kwargs['n_harmonics']
     self.cosines = None
     self.sines = None
     self.P = None
Beispiel #3
0
 def __init__(self,
              lambda_weights: float = 0.1,
              lambda_leaves: float = 0.1,
              **loss_kwargs):
     super().__init__(lambda_weights, lambda_leaves, **loss_kwargs)
     check_pars(self.required_pars, **loss_kwargs)
     self.lambda_smooth = self.kwargs['lambda_smooth']
     self.lambdas = None
     self.Q_inv = None
     self.D = None
Beispiel #4
0
 def __init__(self,
              lambda_weights: float = 0.1,
              lambda_leaves: float = 0.1,
              **loss_kwargs):
     super().__init__(lambda_weights, lambda_leaves, **loss_kwargs)
     check_pars(self.required_pars, **loss_kwargs)
     self.S = self.kwargs['S']
     self.precision = self.kwargs['precision']
     self.S_inv = np.linalg.inv(self.S.T @ self.S)
     self.lambdas, self.Q = eigh(
         self.S.T @ self.kwargs['precision'] @ self.S)
     self.Q_inv = np.linalg.inv(self.Q)
     self.H_inv = lambda H: self.compute_H_inv(np.mean(H))
     self.n_dims = self.S.shape[1]