-
Notifications
You must be signed in to change notification settings - Fork 80
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #1311 +/- ##
===========================================
- Coverage 88.20% 56.03% -32.17%
===========================================
Files 186 197 +11
Lines 11807 12126 +319
===========================================
- Hits 10414 6795 -3619
- Misses 1393 5331 +3938
... and 134 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
🚀 Deployed on https://deploy-preview-1311--etna-docs.netlify.app |
@@ -82,6 +82,14 @@ def mrmr( | |||
redundancy_table = pd.DataFrame(np.inf, index=all_features, columns=all_features) | |||
top_k = min(top_k, len(all_features)) | |||
|
|||
# can't compute correlation of categorical column with the others | |||
cat_cols = regressors.dtypes[regressors.dtypes == "category"].index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't it be easier to cast all regressors to float?
try: | ||
regressors[cat_col] = regressors[cat_col].astype(float) | ||
except ValueError: | ||
raise ValueError(f"{cat_col} column cannot be cast to float type! Please, use encoders.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should test this error.
@@ -32,6 +33,12 @@ def df_with_regressors() -> Dict[str, pd.DataFrame]: | |||
regressor = df_regressors_useless[df_regressors_useless["segment"] == segment]["target"].values | |||
df_exog[f"regressor_useless_{i}"] = regressor | |||
|
|||
# useless categorical regressor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regressor -> regressors?
|
||
|
||
@pytest.mark.parametrize("fast_redundancy", [True, False]) | ||
def test_mrmr_with_categorical_regressor(df_with_regressors, fast_redundancy): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_mrmr_with_categorical_regressor
-> test_mrmr_with_castable_categorical_regressor
?
Before submitting (must do checklist)
Proposed Changes
Closing issues
closes #1310