Skip to content

Commit

Permalink
Add Dan language
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'refs/remotes/origin/54-include-imputed-strata-in-assessment_data-assessment_card' into 54-include-imputed-strata-in-assessment_data-assessment_card
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
  • Loading branch information
Damonamajor committed Nov 18, 2024
2 parents cfe990b + f22d226 commit 3eed3df
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 3eed3df

Please sign in to comment.