abess-team/abess

There are some warnings when calling abess in DoubleML.

Everglow00 opened this issue · 1 comments

I use an abess learner in DoubleMLPLR, but there are some warnings. The following is my code:

from doubleml import DoubleMLData
from sklearn.base import clone
from abess.linear import LinearRegression    
n_obs = 500
n_vars = 100
theta = 3
X = np.random.normal(size=(n_obs, n_vars))
d = np.dot(X[:, :3], np.array([5, 5, 5])) + np.random.standard_normal(size=(n_obs,))
y = theta * d + np.dot(X[:, :3], np.array([5, 5, 5])) + np.random.standard_normal(size=(n_obs,))
dml_data_sim = DoubleMLData.from_arrays(X, y, d)
abess = LinearRegression(cv = 5)
ml_g_abess = clone(abess)
ml_m_abess = clone(abess)
ml_plr_abess = DoubleMLPLR(dml_data_sim, ml_g_abess, ml_m_abess)
dml_plr_abess.fit(); 

After running the code, there will be warnings like "Learner provided for ml_g is probably invalid".

@Everglow00 , we have fixed the issues. You can install the latest abess package to see it.