Skip to content

Commit d991643

Browse files
authored
Merge pull request #7 from zyang91/zyang91-patch-1
auto fix
2 parents f91c2c4 + 871dc5e commit d991643

File tree

2 files changed

+89
-90
lines changed

2 files changed

+89
-90
lines changed

Assignment/assignment4_html.html

Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,34 +1422,34 @@
14221422
@media screen {
14231423
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
14241424
}
1425-
code span.al { color: #ef2929; }
1426-
code span.an { color: #8f5902; font-weight: bold; font-style: italic; }
1427-
code span.at { color: #204a87; }
1428-
code span.bn { color: #0000cf; }
1429-
code span.cf { color: #204a87; font-weight: bold; }
1430-
code span.ch { color: #4e9a06; }
1431-
code span.cn { color: #8f5902; }
1432-
code span.co { color: #8f5902; font-style: italic; }
1433-
code span.cv { color: #8f5902; font-weight: bold; font-style: italic; }
1434-
code span.do { color: #8f5902; font-weight: bold; font-style: italic; }
1435-
code span.dt { color: #204a87; }
1436-
code span.dv { color: #0000cf; }
1437-
code span.er { color: #a40000; font-weight: bold; }
1438-
code span.ex { }
1439-
code span.fl { color: #0000cf; }
1440-
code span.fu { color: #204a87; font-weight: bold; }
1441-
code span.im { }
1442-
code span.in { color: #8f5902; font-weight: bold; font-style: italic; }
1443-
code span.kw { color: #204a87; font-weight: bold; }
1444-
code span.op { color: #ce5c00; font-weight: bold; }
1445-
code span.ot { color: #8f5902; }
1446-
code span.pp { color: #8f5902; font-style: italic; }
1447-
code span.sc { color: #ce5c00; font-weight: bold; }
1448-
code span.ss { color: #4e9a06; }
1449-
code span.st { color: #4e9a06; }
1450-
code span.va { color: #000000; }
1451-
code span.vs { color: #4e9a06; }
1452-
code span.wa { color: #8f5902; font-weight: bold; font-style: italic; }
1425+
code span.al { color: #ef2929; }
1426+
code span.an { color: #8f5902; font-weight: bold; font-style: italic; }
1427+
code span.at { color: #204a87; }
1428+
code span.bn { color: #0000cf; }
1429+
code span.cf { color: #204a87; font-weight: bold; }
1430+
code span.ch { color: #4e9a06; }
1431+
code span.cn { color: #8f5902; }
1432+
code span.co { color: #8f5902; font-style: italic; }
1433+
code span.cv { color: #8f5902; font-weight: bold; font-style: italic; }
1434+
code span.do { color: #8f5902; font-weight: bold; font-style: italic; }
1435+
code span.dt { color: #204a87; }
1436+
code span.dv { color: #0000cf; }
1437+
code span.er { color: #a40000; font-weight: bold; }
1438+
code span.ex { }
1439+
code span.fl { color: #0000cf; }
1440+
code span.fu { color: #204a87; font-weight: bold; }
1441+
code span.im { }
1442+
code span.in { color: #8f5902; font-weight: bold; font-style: italic; }
1443+
code span.kw { color: #204a87; font-weight: bold; }
1444+
code span.op { color: #ce5c00; font-weight: bold; }
1445+
code span.ot { color: #8f5902; }
1446+
code span.pp { color: #8f5902; font-style: italic; }
1447+
code span.sc { color: #ce5c00; font-weight: bold; }
1448+
code span.ss { color: #4e9a06; }
1449+
code span.st { color: #4e9a06; }
1450+
code span.va { color: #000000; }
1451+
code span.vs { color: #4e9a06; }
1452+
code span.wa { color: #8f5902; font-weight: bold; font-style: italic; }
14531453
.sourceCode .row {
14541454
width: 100%;
14551455
}
@@ -2001,31 +2001,31 @@ <h2>Threshold 0.25 and model evaluation</h2>
20012001
<span id="cb5-3"><a href="#cb5-3" tabindex="-1"></a>test_preds1 <span class="ot">&lt;-</span> <span class="fu">ifelse</span>(test_probs1 <span class="sc">&gt;</span> threshold1, <span class="dv">1</span>, <span class="dv">0</span>)</span>
20022002
<span id="cb5-4"><a href="#cb5-4" tabindex="-1"></a><span class="fu">confusionMatrix</span>(<span class="fu">as.factor</span>(test_preds1), <span class="fu">as.factor</span>(test<span class="sc">$</span>recidivism_yes), <span class="at">positive =</span> <span class="st">&quot;1&quot;</span>)</span></code></pre></div>
20032003
<pre><code>## Confusion Matrix and Statistics
2004-
##
2004+
##
20052005
## Reference
20062006
## Prediction 0 1
20072007
## 0 156 29
20082008
## 1 2320 3337
2009-
##
2010-
## Accuracy : 0.5979
2011-
## 95% CI : (0.5852, 0.6105)
2012-
## No Information Rate : 0.5762
2013-
## P-Value [Acc &gt; NIR] : 0.0003946
2014-
##
2015-
## Kappa : 0.062
2016-
##
2009+
##
2010+
## Accuracy : 0.5979
2011+
## 95% CI : (0.5852, 0.6105)
2012+
## No Information Rate : 0.5762
2013+
## P-Value [Acc &gt; NIR] : 0.0003946
2014+
##
2015+
## Kappa : 0.062
2016+
##
20172017
## Mcnemar&#39;s Test P-Value : &lt; 0.00000000000000022
2018-
##
2019-
## Sensitivity : 0.9914
2020-
## Specificity : 0.0630
2021-
## Pos Pred Value : 0.5899
2022-
## Neg Pred Value : 0.8432
2023-
## Prevalence : 0.5762
2024-
## Detection Rate : 0.5712
2025-
## Detection Prevalence : 0.9683
2026-
## Balanced Accuracy : 0.5272
2027-
##
2028-
## &#39;Positive&#39; Class : 1
2018+
##
2019+
## Sensitivity : 0.9914
2020+
## Specificity : 0.0630
2021+
## Pos Pred Value : 0.5899
2022+
## Neg Pred Value : 0.8432
2023+
## Prevalence : 0.5762
2024+
## Detection Rate : 0.5712
2025+
## Detection Prevalence : 0.9683
2026+
## Balanced Accuracy : 0.5272
2027+
##
2028+
## &#39;Positive&#39; Class : 1
20292029
## </code></pre>
20302030
</div>
20312031
<div id="threshold-0.5-and-model-evaluation" class="section level2">
@@ -2040,31 +2040,31 @@ <h2>Threshold 0.5 and model evaluation</h2>
20402040
<span id="cb7-3"><a href="#cb7-3" tabindex="-1"></a>test_preds2 <span class="ot">&lt;-</span> <span class="fu">ifelse</span>(test_probs2 <span class="sc">&gt;</span> threshold2, <span class="dv">1</span>, <span class="dv">0</span>)</span>
20412041
<span id="cb7-4"><a href="#cb7-4" tabindex="-1"></a><span class="fu">confusionMatrix</span>(<span class="fu">as.factor</span>(test_preds2), <span class="fu">as.factor</span>(test<span class="sc">$</span>recidivism_yes), <span class="at">positive =</span> <span class="st">&quot;1&quot;</span>)</span></code></pre></div>
20422042
<pre><code>## Confusion Matrix and Statistics
2043-
##
2043+
##
20442044
## Reference
20452045
## Prediction 0 1
20462046
## 0 1337 809
20472047
## 1 1139 2557
2048-
##
2049-
## Accuracy : 0.6666
2050-
## 95% CI : (0.6543, 0.6786)
2051-
## No Information Rate : 0.5762
2048+
##
2049+
## Accuracy : 0.6666
2050+
## 95% CI : (0.6543, 0.6786)
2051+
## No Information Rate : 0.5762
20522052
## P-Value [Acc &gt; NIR] : &lt; 0.00000000000000022
2053-
##
2054-
## Kappa : 0.305
2055-
##
2056-
## Mcnemar&#39;s Test P-Value : 0.00000000000009041
2057-
##
2058-
## Sensitivity : 0.7597
2059-
## Specificity : 0.5400
2060-
## Pos Pred Value : 0.6918
2061-
## Neg Pred Value : 0.6230
2062-
## Prevalence : 0.5762
2063-
## Detection Rate : 0.4377
2064-
## Detection Prevalence : 0.6327
2065-
## Balanced Accuracy : 0.6498
2066-
##
2067-
## &#39;Positive&#39; Class : 1
2053+
##
2054+
## Kappa : 0.305
2055+
##
2056+
## Mcnemar&#39;s Test P-Value : 0.00000000000009041
2057+
##
2058+
## Sensitivity : 0.7597
2059+
## Specificity : 0.5400
2060+
## Pos Pred Value : 0.6918
2061+
## Neg Pred Value : 0.6230
2062+
## Prevalence : 0.5762
2063+
## Detection Rate : 0.4377
2064+
## Detection Prevalence : 0.6327
2065+
## Balanced Accuracy : 0.6498
2066+
##
2067+
## &#39;Positive&#39; Class : 1
20682068
## </code></pre>
20692069
</div>
20702070
<div id="threshold-0.75-and-model-evaluation" class="section level2">
@@ -2083,31 +2083,31 @@ <h2>Threshold 0.75 and model evaluation</h2>
20832083
<span id="cb9-3"><a href="#cb9-3" tabindex="-1"></a>test_preds3 <span class="ot">&lt;-</span> <span class="fu">ifelse</span>(test_probs3 <span class="sc">&gt;</span> threshold3, <span class="dv">1</span>, <span class="dv">0</span>)</span>
20842084
<span id="cb9-4"><a href="#cb9-4" tabindex="-1"></a><span class="fu">confusionMatrix</span>(<span class="fu">as.factor</span>(test_preds3), <span class="fu">as.factor</span>(test<span class="sc">$</span>recidivism_yes), <span class="at">positive =</span> <span class="st">&quot;1&quot;</span>)</span></code></pre></div>
20852085
<pre><code>## Confusion Matrix and Statistics
2086-
##
2086+
##
20872087
## Reference
20882088
## Prediction 0 1
20892089
## 0 2240 2439
20902090
## 1 236 927
2091-
##
2092-
## Accuracy : 0.5421
2093-
## 95% CI : (0.5292, 0.5549)
2094-
## No Information Rate : 0.5762
2095-
## P-Value [Acc &gt; NIR] : 1
2096-
##
2097-
## Kappa : 0.1611
2098-
##
2091+
##
2092+
## Accuracy : 0.5421
2093+
## 95% CI : (0.5292, 0.5549)
2094+
## No Information Rate : 0.5762
2095+
## P-Value [Acc &gt; NIR] : 1
2096+
##
2097+
## Kappa : 0.1611
2098+
##
20992099
## Mcnemar&#39;s Test P-Value : &lt;0.0000000000000002
2100-
##
2101-
## Sensitivity : 0.2754
2102-
## Specificity : 0.9047
2103-
## Pos Pred Value : 0.7971
2104-
## Neg Pred Value : 0.4787
2105-
## Prevalence : 0.5762
2106-
## Detection Rate : 0.1587
2107-
## Detection Prevalence : 0.1991
2108-
## Balanced Accuracy : 0.5900
2109-
##
2110-
## &#39;Positive&#39; Class : 1
2100+
##
2101+
## Sensitivity : 0.2754
2102+
## Specificity : 0.9047
2103+
## Pos Pred Value : 0.7971
2104+
## Neg Pred Value : 0.4787
2105+
## Prevalence : 0.5762
2106+
## Detection Rate : 0.1587
2107+
## Detection Prevalence : 0.1991
2108+
## Balanced Accuracy : 0.5900
2109+
##
2110+
## &#39;Positive&#39; Class : 1
21112111
## </code></pre>
21122112
</div>
21132113
<div id="threshold-comparison-and-auc" class="section level2">

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
## MUSA 5080: Public Policy Analytics Assignment Showcase
22

3-
Updated from first assignment- midterm
43

5-
rested 3 assignment+ final will be updated after the semester
4+
only one assignment left+ final will be updated after the semester

0 commit comments

Comments
 (0)