@@ -440,12 +440,23 @@ walk2(
440440 )$ .pred )
441441 )
442442
443+ # Preserve the log-scale outcome and prediction alongside their dollar
444+ # equivalents. NA when the transform is off, since no log-space model
445+ # output exists in that case
443446 if (log_transform_enable ) {
444447 preds <- preds %> %
445448 mutate(
449+ pred_card_initial_fmv_log = pred_card_initial_fmv ,
450+ meta_sale_price_log = meta_sale_price ,
446451 pred_card_initial_fmv = exp(pred_card_initial_fmv ),
447452 meta_sale_price = meta_sale_price_original
448453 )
454+ } else {
455+ preds <- preds %> %
456+ mutate(
457+ pred_card_initial_fmv_log = NA_real_ ,
458+ meta_sale_price_log = NA_real_
459+ )
449460 }
450461
451462 preds %> %
@@ -456,8 +467,10 @@ walk2(
456467 " prior_far_tot" = params $ ratio_study $ far_column ,
457468 " prior_near_tot" = params $ ratio_study $ near_column
458469 )),
459- pred_card_initial_fmv , pred_card_initial_fmv_lin ,
460- meta_sale_price , meta_sale_date , meta_sale_document_num ,
470+ pred_card_initial_fmv , pred_card_initial_fmv_log ,
471+ pred_card_initial_fmv_lin ,
472+ meta_sale_price , meta_sale_price_log ,
473+ meta_sale_date , meta_sale_document_num ,
461474 meta_modeling_group
462475 ) %> %
463476 # Prior year values are AV, not FMV. Multiply by 10 to
0 commit comments