py-why / py-why/EconML

RegressionForest doesn't match fit-time shape of vector Y when predicting

Open
#416 3 comments 0 reactions 1 assignee View on GitHub

@vsyrgkanis is already working on this.

Since Feb 20, 2021.

bug
Dominant language
Jupyter Notebook
Stars
4.8k
Forks
827
PR merge metrics
No merged PRs in 30d

Description

If Y is a vector when fitting a RegressionForest, the return value from predict is an n×1 array instead. For example:

from econml.grf import RegressionForest
X=np.array([[0,1],[2,3],[4,5]])
y=np.array([1,2,3])
assert RegressionForest().fit(X,y).predict(X).shape == (3,)  # fails because the shape is (3,1)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.