You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even when I set both prediction functions to be lasso, which should support for sparse matrix in sklearn, the doubleml pkg throws the error that sparse matrix is not supported. Transforming the matrix to dense format will explode my memory. Is there any particular reason that sparse matrix cannot be used?
The text was updated successfully, but these errors were encountered:
It would have been nice to add the code separately from the screenshot. This makes it easier for everyone to work on this feature request and GitHub then also adds this nice copy-paste-buttons 😉.
fromdoubleml.datasetsimportmake_plr_CCDDHNR2018fromdoublemlimportDoubleMLDatan_obs=200n_vars=150alpha=0.5
(x, y, d) =make_plr_CCDDHNR2018(alpha=alpha, n_obs=n_obs, dim_x=n_vars, return_type='array')
fromscipy.sparseimportcsr_matrix, csc_matrixx=csc_matrix(x)
fromsklearn.baseimportclonefromsklearn.linear_modelimportLassolearner=Lasso()
ml_m=clone(learner)
ml_g=clone(learner)
obj_dml_data=DoubleMLData.from_arrays(x, y, d)
Even when I set both prediction functions to be lasso, which should support for sparse matrix in sklearn, the doubleml pkg throws the error that sparse matrix is not supported. Transforming the matrix to dense format will explode my memory. Is there any particular reason that sparse matrix cannot be used?
The text was updated successfully, but these errors were encountered: