Skip to content

Commit

Permalink
change param for imputation algo used in prediction
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelvoirol committed Jun 2, 2024
1 parent 98dceec commit 2440b12
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions submission.R
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,13 @@ predict_outcomes <- function(df, background_df = NULL, model_path = "./model.rds

# Preprocess the fake / holdout data
df_test <- clean_df(df, background_df)

str(df_test)
# verify that all variables on which trained are in the df
all(model$x %in% colnames(df_test))

# create a version of the test set which have all variables imputed
df_test_imputed = missForest::missForest(df_test)$ximp
# minor problem to be solved here
df_test_imputed = suppressWarnings(missForest::missForest(df_test, maxiter = 15, ntree = 200)$ximp)

# save vec_id
vec_nomem_encr = df_test%>%pull(nomem_encr)
Expand Down

0 comments on commit 2440b12

Please sign in to comment.