Skip to content

Commit

Permalink
typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kkappler committed Mar 22, 2024
1 parent d40e58b commit 2be5369
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions aurora/transfer_function/regression/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RegressionEstimator(object):
model of solving Y = X*b +epsilon for b. X is variously called the "input",
"predictor", "explanatory", "confounding", "independent" "exogenous", variable(s)
or the "design matrix", "model matrix" or "regressor matrix".
Y are variously called the the "output", "predicted", "outcome",
Y are variously called the "output", "predicted", "outcome",
"response", "endogenous", "regressand", or "dependent" variable. I will try to
use input and output.
Expand Down Expand Up @@ -51,11 +51,11 @@ class RegressionEstimator(object):
X.data is numpy array (normally 2-dimensional)
These are the input variables. Like the matlab codes each observation
corresponds to a row and each parameter (channel) is a column.
X : numpy array (normally 2-dimensional)
X : numpy array (normally 2-dimensional)
This is a "pure array" representation of _X used to emulate Gary
Egbert's matlab codes. It may or may not be deprecated.
_Y : xarray.Dataset
These are the output variables, aranged same as X above.
These are the output variables, arranged same as X above.
Y : numpy array (normally 2-dimensional)
This is a "pure array" representation of _X used to emulate Gary
Egbert's matlab codes. It may or may not be deprecated.
Expand Down Expand Up @@ -169,7 +169,9 @@ def solve_underdetermined(self):
S_inv = np.diag(1.0 / s)
self.b = (V.T @ S_inv @ U.T) * self.Y
if self.iter_control.return_covariance:
logger.warning("Warning covariances are not xarray, may break things downstream")
logger.warning(
"Warning covariances are not xarray, may break things downstream"
)
self.cov_nn = np.zeros((self.n_channels_out, self.n_channels_out))
self.cov_ss_inv = np.zeros((self.n_channels_in, self.n_channels_in))

Expand Down Expand Up @@ -242,7 +244,7 @@ def qr_decomposition(self, X=None, sanity_check=False):
elif self.qr_input == "Z":
X = self.Z
else:
logger.error("Matrix to perform QR decompostion not specified")
logger.error("Matrix to perform QR decomposition not specified")
raise Exception

Q, R = np.linalg.qr(X)
Expand All @@ -252,7 +254,7 @@ def qr_decomposition(self, X=None, sanity_check=False):
if np.isclose(np.matmul(Q, R) - X, 0).all():
pass
else:
logger.error("Failed QR decompostion sanity check")
logger.error("Failed QR decomposition sanity check")
raise Exception
return Q, R

Expand Down

0 comments on commit 2be5369

Please sign in to comment.