Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when passing featurizer that requires more than 1 row in SparseLinearDrLearner #905

Open
itamarfaran opened this issue Aug 5, 2024 · 1 comment

Comments

@itamarfaran
Copy link
Contributor

in file econml/utilities.py:75 (function name check_high_dimensional):

d_x = clone(featurizer, safe=False).fit_transform(X[[0], :]).shape[1]

when passing a transformer such as SplineTransformer, it raises an error:

ValueError: Found array with 1 sample(s) (shape=(1, 1)) while a minimum of 2 is required by SplineTransformer.

from what I understand this line only runs to infer the number of rows out, but it fails the whole fit process.
this would also fail for transformers as OneHotEncoder as the number of new rows is dependent on the data

@itamarfaran itamarfaran changed the title Bug when passing featurizer that requires more than 1 row Bug when passing featurizer that requires more than 1 row in SparseLinearDrLearner Aug 5, 2024
@itamarfaran
Copy link
Contributor Author

#906

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant