Open dirknbr opened 5 months ago
Hi @dirknbr , can you include data and code to replicate this? The data can be mock/random data if that helps
sure
n = 200
df = pd.DataFrame()
df['X'] = np.random.normal(10, 1, n)
df['Tr'] = 10 + df.X + np.random.normal(0, 1, n)
df['Y'] = 10 + df.X + df.Tr + np.random.normal(0, 1, n)
gps = GPS_Regressor(treatment_grid_num = 20, random_seed = 512)
gps.fit(T = df['Tr'], X = df['X'], y = df['Y'])
gps_point = gps.point_estimate(np.array([1]))
Ok thanks @dirknbr , I'll take a look soon and get back to you 👍
Well @dirknbr , in short, numpy introduced a breaking change in some recent version. I can confirm that 3 unit tests in this package are now broken with the most recent version of numpy. Thanks for catching this!
Two options. The quicker one: I recommend you create a new virtual environment for your project work and force install a version of numpy < 1.20. This will have a cascading effect on the other dependencies and they'll end up being older versions too. The slightly more challenging one: could I get your help in patching causal-curve
to work with the latest version of numpy?
ok will have a look whether I can fix it
fixed it locally and will now try to upload it, pytest passes
Will this fix be available in the latest Numpy version (stable)? I am also encountering the same problem.
when I run
gps_point = gps.point_estimate(np.array([1]))
I get this error
the model was trained with continours treatment in pandas format