smartdata-analysis-and-statistics / precmed

A doubly robust precision medicine approach to estimate and validate conditional average treatment effects
https://smartdata-analysis-and-statistics.github.io/precmed/
Apache License 2.0
4 stars 0 forks source link

examples: how much time do they take #20

Closed jcaldasmagalhaes closed 1 year ago

jcaldasmagalhaes commented 1 year ago

Check how much time each examle takes, so that we can do something in case any example takes too long

jcaldasmagalhaes commented 1 year ago

This is the runtime of the examples in my computer. pmmean example crashes, shall we open an issue on this?

####### export(abc) abc: start time examples 2022-09-02 13:33:30 abc: end time examples 2022-09-02 13:35:29 Time difference of 119.4676 secs 119.467581987381

####### export(cv) cv: start time examples 2022-09-02 13:35:29 cv: end time examples 2022-09-02 13:37:15 Time difference of 106.3361 secs 106.336148023605

####### export(cvcount) cvcount: start time examples 2022-09-02 13:37:15 cvcount: end time examples 2022-09-02 13:37:29 Time difference of 13.92702 secs 13.9270219802856

####### export(cvmean) cvmean: start time examples 2022-09-02 13:37:29 cvmean: end time examples 2022-09-02 13:37:36 Time difference of 7.128212 secs 7.12821197509766

####### export(cvsurv) cvsurv: start time examples 2022-09-02 13:37:36 cvsurv: end time examples 2022-09-02 13:38:12 Time difference of 35.94302 secs 35.943018913269

####### export(dr.inference) dr.inference: start time examples 2022-09-02 13:38:12 dr.inference: end time examples 2022-09-02 13:42:17 Time difference of 244.6657 secs 244.66574883461

####### export(drcount.inference) drcount.inference: start time examples 2022-09-02 13:42:17 drcount.inference: end time examples 2022-09-02 13:42:40 Time difference of 22.87217 secs 22.8721661567688

####### export(drmean.inference) drmean.inference: start time examples 2022-09-02 13:42:40 drmean.inference: end time examples 2022-09-02 13:42:52 Time difference of 12.10776 secs 12.1077620983124

####### export(drsurv.inference) drsurv.inference: start time examples 2022-09-02 13:42:52 drsurv.inference: end time examples 2022-09-02 13:46:11 Time difference of 198.9732 secs 198.973232984543

####### export(pm) pm: start time examples 2022-09-02 13:46:11 pm: end time examples 2022-09-02 13:50:00 Time difference of 229.1361 secs 229.136101961136

####### export(pmcount) pmcount: start time examples 2022-09-02 13:50:00 pmcount: end time examples 2022-09-02 13:50:00 Time difference of 0.2330821 secs 0.233082056045532

####### export(pmmean) ERROR

Error in intxmean(y = y, trt = trt, x.cate = x.cate, x.init = x.init, : object 'x.init' not found In addition: Warning message: In data.preproc.mean(fun = "pm", cate.model = cate.model, init.model = init.model, :

Error in intxmean(y = y, trt = trt, x.cate = x.cate, x.init = x.init, : object 'x.init' not found

####### export(pmsurv) pmsurv: start and end times 2022-09-02 13:52:40 2022-09-02 13:52:46 Time difference of 6.0167 secs 6.01670002937317

NightlordTW commented 1 year ago

Enable the following examples (remove #Dontrun argument):

StanWijn commented 1 year ago

Enabled these functions and tested the examples

jcaldasmagalhaes commented 1 year ago

Thomas: we can keep examples that take at most 15 seconds max