Skip to content

Commit

Permalink
Add test for NA or NULL values (#79)
Browse files Browse the repository at this point in the history
* Add test

* Update reports/performance/_outliers.qmd

Co-authored-by: Dan Snow <[email protected]>

* lintr

---------

Co-authored-by: Dan Snow <[email protected]>
  • Loading branch information
Damonamajor and dfsnow committed Jan 14, 2025
1 parent 5b53df6 commit a34ff0d
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions reports/performance/_outliers.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -477,3 +477,35 @@ outlier_decile_breakout(training_data, 1)
```

:::

## Possible Output Errors

::: panel-tabset

### Card Level

```{r _outliers_output_errors_card}
assessment_card %>%
summarize(
"NA Card FMV" = sum(is.na(pred_card_initial_fmv)),
"Negative Card FMV" = sum(pred_card_initial_fmv < 0, na.rm = TRUE)
) %>%
datatable()
```

### Pin Level

```{r _outliers_output_errors_pin}
assessment_pin %>%
summarize(
"NA Pin FMV" = sum(is.na(pred_pin_final_fmv)),
"Negative Pin FMV" = sum(pred_pin_final_fmv < 0, na.rm = TRUE),
"NA Building FMV" = sum(is.na(pred_pin_final_fmv_bldg)),
"Negative Building FMV" = sum(pred_pin_final_fmv_bldg < 0, na.rm = TRUE),
"NA Land FMV" = sum(is.na(pred_pin_final_fmv_land)),
"Negative Land FMV" = sum(pred_pin_final_fmv_land < 0, na.rm = TRUE)
) %>%
datatable()
```

:::

0 comments on commit a34ff0d

Please sign in to comment.