-
Notifications
You must be signed in to change notification settings - Fork 380
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
Feature/Check input for NaNs when available_mask = 1 #894
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@jmoralez Appreciate your review on this. Thanks. |
@quest-bot loot #890 |
👋 Hey @jmoralez, you can't loot on a PR you didn't create. If you think this is a mistake, contact us at help@quine.sh |
@quest-bot loot #890 |
of code logic review: nbs_dev
Review: .py file
@jmoralez |
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.
Thanks a lot! I appreciate the thorough tests
This addresses #890
Main changes
_check_nan()
function to validate the input whereby for row records withavailable_mask=1
, we shall raise ValueError if there is NaN value.Rationale
check_nan()
is called as part of_prepare_fit()
. One main reason we perform the validation check before the execution ofTimeSeriesDataset.from_df()
is that within thefrom_df()
, it shall useutilsforecast.process_df
->to_numpy()
which shall replace NaN values of categorical variable type as -1.0. Hence, we cannot perform validation based on the dataset returned byTimeSeriesDataset.from_df()
to flag the NaN values in categorical features.available_mask=1
is automatically assigned as part ofTimeSeriesDataset.from_df()
. incheck_nan()
, we follow the same practice and assignavailable_mask=1
if users do not provideavailable_mask
as one of their input columns.