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

[WIP] Add Causal ML benchmark #389

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft

[WIP] Add Causal ML benchmark #389

wants to merge 9 commits into from

Conversation

yiweny
Copy link
Contributor

@yiweny yiweny commented Apr 14, 2024

No description provided.

@github-actions github-actions bot removed the data label Apr 14, 2024
@yiweny yiweny self-assigned this Apr 14, 2024
Comment on lines 12 to 16
treatment indicator (1 if treated, 0 if not treated), age,
education, Black (1 if black, 0 otherwise), Hispanic
(1 if Hispanic, 0 otherwise), married (1 if married, 0 otherwise),
nodegree (1 if no degree, 0 otherwise), RE74 (earnings in 1974),
RE75 (earnings in 1975), and RE78 (earnings in 1978).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this into a readable doc-string.

train = 'https://www.fredjo.com/files/jobs_DW_bin.new.10.train.npz'
test = 'https://www.fredjo.com/files/jobs_DW_bin.new.10.test.npz'

def __init__(self, root: str, feature_engineering: bool = False):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc-string.

Comment on lines 18 to 22
lalonde_treated = 'https://users.nber.org/~rdehejia/data/nsw_treated.txt'
lalonde_control = 'https://users.nber.org/~rdehejia/data/nsw_control.txt'
psid = 'https://users.nber.org/~rdehejia/data/psid_controls.txt'
train = 'https://www.fredjo.com/files/jobs_DW_bin.new.10.train.npz'
test = 'https://www.fredjo.com/files/jobs_DW_bin.new.10.test.npz'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lalonde_treated = 'https://users.nber.org/~rdehejia/data/nsw_treated.txt'
lalonde_control = 'https://users.nber.org/~rdehejia/data/nsw_control.txt'
psid = 'https://users.nber.org/~rdehejia/data/psid_controls.txt'
train = 'https://www.fredjo.com/files/jobs_DW_bin.new.10.train.npz'
test = 'https://www.fredjo.com/files/jobs_DW_bin.new.10.test.npz'
lalonde_treated_url = 'https://users.nber.org/~rdehejia/data/nsw_treated.txt'
lalonde_control_url = 'https://users.nber.org/~rdehejia/data/nsw_control.txt'
psid_url = 'https://users.nber.org/~rdehejia/data/psid_controls.txt'
train_url = 'https://www.fredjo.com/files/jobs_DW_bin.new.10.train.npz'
test_url = 'https://www.fredjo.com/files/jobs_DW_bin.new.10.test.npz'

Comment on lines 26 to 27
train = self.download_url(Jobs.train, root)
test = self.download_url(Jobs.test, root)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
train = self.download_url(Jobs.train, root)
test = self.download_url(Jobs.test, root)
train = self.download_url(self.train_url, root)
test = self.download_url(self.test_url, root)

torch_frame/datasets/jobs.py Show resolved Hide resolved
torch_frame/nn/models/bcauss.py Outdated Show resolved Hide resolved
parser.add_argument("--lr", type=float, default=0.00001)
parser.add_argument("--epochs", type=int, default=2)
parser.add_argument("--seed", type=int, default=2)
parser.add_argument("--compile", action="store_true")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unusued.

Comment on lines 54 to 55
treated_eval_dataset.materialize(path=osp.join(path, "treated_eval_data.pt"))
control_eval_dataset.materialize(path=osp.join(path, "control_eval_data.pt"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to materialize again?

examples/bcauss.py Outdated Show resolved Hide resolved
examples/bcauss.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants