Slackbot
08/03/2023, 1:27 PMJosé Morales
08/04/2023, 4:08 PMdf1 = fcst.preprocess(df)
df2 = fcst2.preprocess(df)
# make sure they features are the same except for the order
pd.testing.assert_frame_equal(df1, df2[df1.columns])
X_drop_cols = ['unique_id', 'ds', 'y']
coefs1 = LinearRegression().fit(df1.drop(columns=X_drop_cols), df1['y']).coef_
coefs2 = LinearRegression().fit(df2.drop(columns=X_drop_cols), df2['y']).coef_
# the following fails
np.testing.assert_allclose(
np.sort(coefs1),
np.sort(coefs2),
)
Please let us know if this helpsGuillaume GALIE
08/04/2023, 4:37 PMJosé Morales
08/04/2023, 4:48 PMGuillaume GALIE
08/07/2023, 7:11 AM