@@ -180,20 +180,20 @@ if (comp_enable) {
180
180
# aggregating the bldg_sf to a single card, and using that card to predict
181
181
# which becomes the value for the mult-card pin. Since we don't predict on the
182
182
# 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 %> %
184
184
filter(meta_pin_num_cards %in% c(2 , 3 ))
185
185
186
- selected_cards <- multicard_props %> %
186
+ selected_cards <- multicard_pins %> %
187
187
group_by(meta_pin ) %> %
188
188
arrange(sqft_card_num_sort ) %> %
189
189
slice(1 ) %> %
190
190
ungroup()
191
191
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 )
194
194
195
195
comp_assessment_data_intermediate <-
196
- bind_rows(singlecard_props , selected_cards )
196
+ bind_rows(singlecard_pins , selected_cards )
197
197
198
198
comp_assessment_data_prepped <- recipes :: bake(
199
199
object = lgbm_final_full_recipe ,
@@ -317,16 +317,16 @@ if (comp_enable) {
317
317
) %> %
318
318
select(- starts_with(" comp_idx_" )) %> %
319
319
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
322
322
) %> %
323
323
relocate(pin , card )
324
324
325
325
final_comps_data <- cbind(comps [[1 ]], comps [[2 ]])
326
326
327
327
# Grab removed multi_card_cards,re-add them, and assign them the comps data
328
328
# that we used for the main frankencard used for prediction
329
- removed_cards <- multicard_props %> %
329
+ removed_cards <- multicard_pins %> %
330
330
anti_join(selected_cards , by = c(" meta_pin" , " meta_card_num" )) %> %
331
331
select(meta_pin , meta_card_num )
332
332
0 commit comments