Conversation
🚀 Deployed on https://deploy-preview-672--etna-docs.netlify.app |
Codecov Report
@@ Coverage Diff @@
## master #672 +/- ##
==========================================
+ Coverage 83.80% 84.09% +0.28%
==========================================
Files 119 119
Lines 6399 6412 +13
==========================================
+ Hits 5363 5392 +29
+ Misses 1036 1020 -16
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
tests/test_analysis/test_feature_relevance/test_relevance_table.py
Outdated
Show resolved
Hide resolved
tests/test_analysis/test_feature_relevance/test_relevance_table.py
Outdated
Show resolved
Hide resolved
tests/test_analysis/test_feature_relevance/test_relevance_table.py
Outdated
Show resolved
Hide resolved
) | ||
df_exog_now["target"] = df_now | ||
df_exog_now = df_exog_now.dropna() | ||
if len(df_exog_now) != len(df_now) and not none_warning: |
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.
Add this warning also to the second method and add test case
) | ||
df_exog_now["target"] = df_now | ||
df_exog_now = df_exog_now.dropna() | ||
if len(df_exog_now) != len(df_now) and not none_warning_raised: |
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 need to drop the nan values before casting categoricals to float, exchange this two sections
"Exogenous data contains columns with category type! It will be converted to float. If this is not desired behavior, use encoders." | ||
) | ||
df_exog_now["target"] = df_now | ||
df_exog_now = df_exog_now.dropna() |
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.
Let's drop nans the same way as here to make this step similar in both methods
df = pd.DataFrame({"segment": seg, "timestamp": timestamps, "target": target}) | ||
ts = TSDataset.to_dataset(df) | ||
|
||
cast = ["1.1"] * 10 + ["2"] * 10 + ["56.1"] * 10 |
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.
Add nans to this column + test for this case(nans in castable categorical column)
|
||
def test_target_none_model_table(exog_and_target_dfs): | ||
df, df_exog = exog_and_target_dfs | ||
tmp = np.arange(len(df["a", "target"]), dtype=float) |
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.
Let'c create the separate fixture for this case, you can make it out of the exog_and_target_dfs
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.
👍
IMPORTANT: Please do not create a Pull Request without creating an issue first.
Before submitting (must do checklist)
Type of Change
Proposed Changes
Related Issue
Closing issues
#668