Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collinearity Speed Up v2 #421

Merged
merged 19 commits into from
Jul 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
issues resolved
  • Loading branch information
ChadGueli committed Jun 27, 2022
commit 7bab946a5244ede9c25fa3f53a340490ab3ae0e6
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ def evaluate(self):
collinear_columns = []
good_columns = self.numeric_columns.copy()
while True:
e_vals, e_vecs = np.linalg.eigh(C)
e_vals = np.sign(e_vals) * (e_vals.abs() + self.EPSILON)
vifs = np.sum(e_vecs*e_vecs, axis=0) / e_vals
e_vals = np.linalg.eigvalsh(C)
e_vals = np.sign(e_vals) / (abs(e_vals) + self.EPSILON)
collinearity = vifs >= self.VIF_UB

i = collinearity.argmax()
Expand All @@ -44,4 +43,4 @@ def evaluate(self):
axis=Axis.COLUMN,
)
)
return suggestions
return suggestions