MichaelLLi / evalITR

R Package for Evaluating Individualized Treatment Rules
13 stars 3 forks source link

Feat: train under sample splitting (WIP) #21

Closed xiaolong-y closed 1 year ago

xiaolong-y commented 1 year ago

This PR now allows users to train the machine learning models under either sample splitting or cross validation by setting the argument n_folds in run_itr. Please set n_folds = 0 to enable training under sample splitting. Please see this updated readme for more details.

@jialul This code is still undergoing tests so it would be great if you could try running latest functions on your machine to test run. Thank you! In the meantime, I will clean up the codes and work on the documentations.

jialul commented 1 year ago

Thanks @xiaolong-y! Can you update your changes to the causal-ml-gates branch you created earlier within Michael's evalITR repo. It seems that the changes you make current stay in your personal branch, which I cannot pull from it.

jialul commented 1 year ago

Also, by eyeballing your code, I think you may want to write them in the package format. For example, new inputs like ratio needs to be documented and functions you called from other packages need to be imported before running your own function. Kosuke recommended this book when I started formatting the code. Guess you may find it helpful!

xiaolong-y commented 1 year ago

@jialul Thank you for your response! Since this code is still experimental, I thought merging after cleaning up and testing will be prefered. You can still download the code of this PR using devtools by inputting devtools::install_github("MichaelLLi/evalITR#21"). Please let me know if you run into any issue.

Thank you for the suggestion and I will look into it!

jialul commented 1 year ago

No need to worry about merging or conflicts. What you've done on causal-ml-gates will not affect either the master or causal-ml. Please update your changes to causal-ml-gates so that I can pull from that branch, thanks!