when i train a global model and have series with d...
# mlforecast
j
when i train a global model and have series with different lengths, then i get the following warning. I think xgb can handle this naturally, but I am not sure if this effects the fc quality, because I am not sure about all inner working in mlforecast. Can I ignore this warning when I use xgb, or would you suggest to not use series with different leghts with mlforecast?
Copy code
--> warnings.warn(f'Found null values in {", ".join(cols_with_nulls)}.')
Copy code
def _get_features_for_next_step(self, X_df=None):
        new_x = self._update_features()
        if X_df is not None:
            n_series = len(self.uids)
            h = X_df.shape[0] // n_series
            rows = np.arange(self._h, X_df.shape[0], h)
            X = ufp.take_rows(X_df, rows)
            X = ufp.drop_index_if_pandas(X)
            new_x = ufp.horizontal_concat([new_x, X])
        if isinstance(new_x, pd.DataFrame):
            nulls = new_x.isnull().any()
            cols_with_nulls = nulls[nulls].index.tolist()
        else:
            nulls = new_x.select(pl.all().is_null().any())
            cols_with_nulls = [k for k, v in nulls.to_dicts()[0].items() if v]
        #if cols_with_nulls:
        #    warnings.warn(f'Found null values in {", ".join(cols_with_nulls)}.')
        self._h += 1
        new_x = new_x[self.features_order_]
        if self.as_numpy:
            new_x = ufp.to_numpy(new_x)
        return new_x
j
That warning is there in case you see a very bad performance, which can happen if most of the features are nulls. If you're confident on what you're doing you can ignore that with something like:
Copy code
warnings.filterwarnings("ignore", message=r"Found null values.*")
j
k, thx
i am 80% cnonfident :)