Skip to content

Commit

Permalink
Update pipeline/02-assess.R
Browse files Browse the repository at this point in the history
Co-authored-by: Dan Snow <31494343+dfsnow@users.noreply.github.com>
  • Loading branch information
Damonamajor and dfsnow authored Nov 18, 2024
1 parent 75d8d4e commit f22d226
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pipeline/02-assess.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ assessment_data_pred <- read_parquet(paths$input$assessment$local) %>%
)
}

# For the lightgbm model, values are recoded to a 0 based scale.
# This means that these values are a 1:1 match with values of a
# different scale. Because of this, we map values to our original
# calculations for continuity.
# The trained model encodes categorical values as base-0 integers.
# However, here we want to recover the original (unencoded) values
# of our strata variables. To do so, we create a mapping of the
# encoded to unencoded values and use the to recover both the original
# strata values and those imputed by step_impute_knn (in R/recipes.R)
mapping_1 <- assessment_data_pred %>%
filter(!is.na(meta_strata_1)) %>%
distinct(temp_strata_1, meta_strata_1)
Expand Down

0 comments on commit f22d226

Please sign in to comment.