Skip to content

Commit

Permalink
removing debugging stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
kujaku11 committed May 29, 2024
1 parent 103c554 commit d01c0d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
15 changes: 3 additions & 12 deletions aurora/transfer_function/regression/TRME.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,10 @@ def update_residual_variance(self, correction_factor=1):
self._residual_variance *= correction_factor
return self._residual_variance

def update_b(self, b0):
def update_b(self):
"""matlab was: b = R\QTY;"""
try:
self.b = solve_triangular(self.R, self.QHYc)
except ValueError as error:
self.b = b0
# print(error)
# print(self.R)
# print(self.QHYc)
# self.b = solve_triangular(
# np.nan_to_num(self.R, nan=), np.nan_to_num(self.QHYc, nan=1)
# )
# print(self.b)

self.b = solve_triangular(self.R, self.QHYc)

def compute_inverse_signal_covariance(self):
"""
Expand Down
6 changes: 3 additions & 3 deletions aurora/transfer_function/regression/m_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def initial_estimate(self):
Make first estimate of TF (b), Y_hat, and residual_variance
"""
self.qr_decomposition()
self.update_b(1)
self.update_b()
self.update_y_hat()
self.update_residual_variance()

Expand All @@ -203,7 +203,7 @@ def apply_huber_regression(self):
b0 = self.b.copy()
self.iter_control.number_of_iterations += 1
self.update_y_cleaned_via_huber_weights()
self.update_b(b0)
self.update_b()
self.update_y_hat()
self.update_residual_variance(
correction_factor=self.correction_factor
Expand All @@ -220,7 +220,7 @@ def apply_redecending_influence_function(self):
while self.iter_control.continue_redescending:
self.iter_control.number_of_redescending_iterations += 1
self.update_y_cleaned_via_redescend_weights()
self.update_b(self.b.copy())
self.update_b()
self.update_y_hat()
self.update_residual_variance()
# crude estimate of expectation of psi
Expand Down

0 comments on commit d01c0d6

Please sign in to comment.