CausalForest.apply_forest
— MethodGet the causal effect for each row in x given a causal forest
CausalForest.apply_forest_ols
— MethodGet the causal effect for each row in x given a causal forest
CausalForest.apply_forest_oob
— MethodPrediction on out of bag sample for a random forest
CausalForest.build_forest
— MethodBuild a causal forest.
- if
bootstrap=True
we sample for each tree via bootstrap else we use subsampling - if
honest=True
we use 2 samples one too build splits and the other one to fill leaves otherwise we use the whole sample for the two steps - if
const_mtry=True
we use a constant mtry otherwise we use a random mtry followingmin(max(Poisson(m_pois),1),number_of_features)
- if
m_pois=-1
we set mtry tosqrt(number_of_features)
else mtry is m_pois - if
optimisatio=true
we use cross validation to tune regression random forest of gamma
CausalForest.build_forest_ols
— MethodBuild a causal forest.
- if
centering=True
Y and W are centered else they stay unchanged - if
bootstrap=True
we sample for each tree via bootstrap else we use subsampling - if
honest=True
we use 2 samples one too build splits and the other one to fill leaves otherwise we use the whole sample for the two steps - if
const_mtry=True
we use a constant mtry otherwise we use a random mtry followingmin(max(Poisson(m_pois),1),number_of_features)
CausalForest.build_forest_oob
— MethodBuild a random forest which keep track of the oob sample
CausalForest.get_freq_by_depth
— MethodGet frequency of splitting on each covariate by depth in a causal forest
CausalForest.importance
— MethodGet frequency based importance for each covariate in causal forest