ARS-toscana / ConcePTIONAlgorithmPregnancies

Repository of the script of the ConcePTION Algorithm for Pregnancies
GNU Affero General Public License v3.0
5 stars 3 forks source link

error in v5.0 step_05_03_predictive_model.R #73

Closed visama closed 1 year ago

visama commented 1 year ago

I got an error while running v5.0.1:

system.time(source(paste0(thisdir,"/p_steps_pregnancy/step_05_03_predictive_model.R"))) Cross validation: num.trees = 100 - mtry = 1 - always.split.variables = 1 Error: sample_fraction too small, no observations sampled. Ranger will EXIT now. Error in ranger(formula = days_from_start ~ record_type + origin + age_at_start_of_pregnancy + : User interrupt or internal error. Timing stopped at: 86.8 0.132 68.68

This might be because of the predictive model error, but I leave it here: system.time(source(paste0(thisdir,"/p_steps_pregnancy/step_05_04_check_overlap.R"))) Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection In addition: Warning message: In readChar(con, 5L, useBytes = TRUE) : cannot open compressed file '/home/vmaq/Kehitys/ConcePTIONAlgorithmPregnancies-release_5.0.1/g_intermediate/D3_group_model.RData', probable reason 'No such file or directory' Timing stopped at: 0.018 0 0.061

@GiorgioLimoncella

GiorgioLimoncella commented 1 year ago

Hi @visama,

It seems to me that your datasource only uses "PROMPT". In this case, the predictive model is not necessary. You can edit step 00_parameters_pregnancy, in the folder, p_parameteres_pregnancy and include 'THL' in line 41:

OLD:

datasources_that_do_not_use_prediction_on_red <- c("EFEMERIS", "POMME")

NEW:

datasources_that_do_not_use_prediction_on_red <- c("EFEMERIS", "POMME", "THL")

visama commented 1 year ago

Thanks, it works. Could you update our parameters in the script?

GiorgioLimoncella commented 1 year ago

perfect! I'll do it