Skip to content

Commit fc53281

Browse files
Replace variable name
1 parent a8dacd2 commit fc53281

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pipeline/04-interpret.R

+8-8
Original file line numberDiff line numberDiff line change
@@ -180,20 +180,20 @@ if (comp_enable) {
180180
# aggregating the bldg_sf to a single card, and using that card to predict
181181
# which becomes the value for the mult-card pin. Since we don't predict on the
182182
# other cards, we set them aside for comp generation re-attach them later
183-
multicard_props <- comp_assessment_data_preprocess %>%
183+
multicard_pins <- comp_assessment_data_preprocess %>%
184184
filter(meta_pin_num_cards %in% c(2, 3))
185185

186-
selected_cards <- multicard_props %>%
186+
selected_cards <- multicard_pins %>%
187187
group_by(meta_pin) %>%
188188
arrange(sqft_card_num_sort) %>%
189189
slice(1) %>%
190190
ungroup()
191191

192-
singlecard_props <- comp_assessment_data_preprocess %>%
193-
filter(!meta_pin %in% multicard_props$meta_pin)
192+
singlecard_pins <- comp_assessment_data_preprocess %>%
193+
filter(!meta_pin %in% multicard_pins$meta_pin)
194194

195195
comp_assessment_data_intermediate <-
196-
bind_rows(singlecard_props, selected_cards)
196+
bind_rows(singlecard_pins, selected_cards)
197197

198198
comp_assessment_data_prepped <- recipes::bake(
199199
object = lgbm_final_full_recipe,
@@ -317,16 +317,16 @@ if (comp_enable) {
317317
) %>%
318318
select(-starts_with("comp_idx_")) %>%
319319
cbind(
320-
pin = comp_assessment_data$meta_pin,
321-
card = comp_assessment_data$meta_card_num
320+
pin = comp_assessment_data_intermediate$meta_pin,
321+
card = comp_assessment_data_intermediate$meta_card_num
322322
) %>%
323323
relocate(pin, card)
324324

325325
final_comps_data <- cbind(comps[[1]], comps[[2]])
326326

327327
# Grab removed multi_card_cards,re-add them, and assign them the comps data
328328
# that we used for the main frankencard used for prediction
329-
removed_cards <- multicard_props %>%
329+
removed_cards <- multicard_pins %>%
330330
anti_join(selected_cards, by = c("meta_pin", "meta_card_num")) %>%
331331
select(meta_pin, meta_card_num)
332332

0 commit comments

Comments
 (0)