Skip to content

Set sample split error #241

Answered by SvenKlaassen
hazelkang asked this question in Q&A
Discussion options

You must be logged in to vote

I tried to replicate you problem but on 0.7.1 this works

import doubleml as dml
import numpy as np
from doubleml.datasets import make_plr_CCDDHNR2018

from sklearn.ensemble import RandomForestRegressor
from sklearn.base import clone
from sklearn.model_selection import train_test_split

print(f"DoubleML Version: {dml.__version__}")

learner = RandomForestRegressor(n_estimators=100, max_features=20, max_depth=5, min_samples_leaf=2)
ml_l = clone(learner)
ml_m = clone(learner)

np.random.seed(1234)
obj_dml_data = make_plr_CCDDHNR2018(alpha=0.5, n_obs=100)


np.random.seed(314)
dml_plr_obj_external = dml.DoubleMLPLR(
    obj_dml_data,
    ml_l,
    ml_m,
    n_folds = 2,
    apply_cross_fittin…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@SvenKlaassen
Comment options

Answer selected by SvenKlaassen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants