GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — print more · WinVector/Examples@6fce904

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • rebalance
    • rw_simple_example.Rmd
    • rw_simple_example.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎rebalance/rw_simple_example.Rmd‎

Copy file name to clipboardExpand all lines: rebalance/rw_simple_example.Rmd
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ knitr::kable(d)
6161
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`.
6262

6363
```{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)
6570
```
6671

6772
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

‎rebalance/rw_simple_example.md‎

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 numberDiff line numberDiff line change
@@ -88,12 +88,18 @@ reversed in model `m_0.50` relative to the order given by model
8888
`m_0.29`.
8989

9090
``` 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)
9297
```
9398

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 |
97103

98104
This means no monotone correction that looks only at the predictions can
99105
make the same adaptations as these two prevalence tailored models. And

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.