GeezerVison is showing github.com — print more · WinVector/Examples@6fce904
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: rebalance/rw_simple_example.Rmd +6-1Lines changed: 6 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -61,7 +61,12 @@ knitr::kable(d) | 61 | 61 | Now notice the relative order of the predictions in rows 1 and 5 are reversed in model `m_0.50` relative to the order given by model `m_0.29`. | 62 | 62 |
| 63 | 63 | ```{r} | 64 | | -d[c(1, 5), qc(pred_m_0.29, pred_m_0.50)] | | 64 | +comps <- d[c(1, 5), qc(pred_m_0.29, pred_m_0.50)] | | 65 | +stopifnot(comps[1, 'pred_m_0.29'] != comps[2, 'pred_m_0.29']) | | 66 | +stopifnot(comps[1, 'pred_m_0.50'] != comps[2, 'pred_m_0.50']) | | 67 | +stopifnot((comps[1, 'pred_m_0.29'] >= comps[2, 'pred_m_0.29']) != (comps[1, 'pred_m_0.50'] >= comps[2, 'pred_m_0.50'])) | | 68 | +
| | 69 | +knitr::kable(comps) | 65 | 70 | ``` | 66 | 71 |
| 67 | 72 | This means no monotone correction that looks only at the predictions can make the same adaptations as these two prevalence tailored models. And that is our demonstration. | |
Collapse file Copy file name to clipboardExpand all lines: rebalance/rw_simple_example.md +10-4Lines changed: 10 additions & 4 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -88,12 +88,18 @@ reversed in model `m_0.50` relative to the order given by model | 88 | 88 | `m_0.29`. | 89 | 89 |
| 90 | 90 | ``` r | 91 | | -d[c(1, 5), qc(pred_m_0.29, pred_m_0.50)] | | 91 | +comps <- d[c(1, 5), qc(pred_m_0.29, pred_m_0.50)] | | 92 | +stopifnot(comps[1, 'pred_m_0.29'] != comps[2, 'pred_m_0.29']) | | 93 | +stopifnot(comps[1, 'pred_m_0.50'] != comps[2, 'pred_m_0.50']) | | 94 | +stopifnot((comps[1, 'pred_m_0.29'] >= comps[2, 'pred_m_0.29']) != (comps[1, 'pred_m_0.50'] >= comps[2, 'pred_m_0.50'])) | | 95 | + | | 96 | +knitr::kable(comps) | 92 | 97 | ``` | 93 | 98 |
| 94 | | - ## pred_m_0.29 pred_m_0.50 | 95 | | - ## 1 0.2304816 0.3655679 | 96 | | - ## 5 0.1796789 0.3930810 | | 99 | +| | pred_m_0.29 | pred_m_0.50 | | | 100 | +|:----|------------:|------------:| | | 101 | +| 1 | 0.2304816 | 0.3655679 | | | 102 | +| 5 | 0.1796789 | 0.3930810 | | 97 | 103 |
| 98 | 104 | This means no monotone correction that looks only at the predictions can | 99 | 105 | make the same adaptations as these two prevalence tailored models. And | |
|