Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
678 changes: 678 additions & 0 deletions script/Assign5.Rmd

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions script/Assignment4.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,10 @@ filter(testProbs.thresholds, Threshold == .5) %>%
- Average cost of a crime committed by a recidivist: $50,000
- Average compensation for wrongful incarceration: $50,000

**True negative Cost**: "An individual is predicted not to recidivate and indeed does not recidivate." - No cost
**True positive Cost**: "An individual is predicted to recidivate and then does recidivate." - $40k
**False negative Cost**: "An individual is predicted not to recidivate but then does recidivate." - $100k
**False positive Cost**: "An individual is predicted to recidivate but does not actually recidivate." - $50k
- **True negative Cost**: "An individual is predicted not to recidivate and indeed does not recidivate." - No cost
- **True positive Cost**: "An individual is predicted to recidivate and then does recidivate." - $40k
- **False negative Cost**: "An individual is predicted not to recidivate but then does recidivate." - $100k
- **False positive Cost**: "An individual is predicted to recidivate but does not actually recidivate." - $50k

```{r cost}
whichThreshold.cost <- whichThreshold %>%
Expand Down Expand Up @@ -608,7 +608,7 @@ whichThreshold.cost %>%
threshold.cost <- whichThreshold.cost%>%
filter(Variable == 'Cost.all')

#-> lowest cost when threshold = 0.49
#-> lowest cost when threshold = 0.50
```


Expand Down
39 changes: 21 additions & 18 deletions script/Assignment4.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions script/Assignment4.md
Original file line number Diff line number Diff line change
Expand Up @@ -1316,10 +1316,10 @@ filter(testProbs.thresholds, Threshold == .5) %>%
- Average cost of a crime committed by a recidivist: $50,000
- Average compensation for wrongful incarceration: $50,000

**True negative Cost**: "An individual is predicted not to recidivate and indeed does not recidivate." - No cost
**True positive Cost**: "An individual is predicted to recidivate and then does recidivate." - $40k
**False negative Cost**: "An individual is predicted not to recidivate but then does recidivate." - $100k
**False positive Cost**: "An individual is predicted to recidivate but does not actually recidivate." - $50k
- **True negative Cost**: "An individual is predicted not to recidivate and indeed does not recidivate." - No cost
- **True positive Cost**: "An individual is predicted to recidivate and then does recidivate." - $40k
- **False negative Cost**: "An individual is predicted not to recidivate but then does recidivate." - $100k
- **False positive Cost**: "An individual is predicted to recidivate but does not actually recidivate." - $50k


```r
Expand Down Expand Up @@ -1353,7 +1353,7 @@ whichThreshold.cost %>%
threshold.cost <- whichThreshold.cost%>%
filter(Variable == 'Cost.all')

#-> lowest cost when threshold = 0.49
#-> lowest cost when threshold = 0.50
```


Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified script/Assignment4_files/figure-html/cost-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified script/Assignment4_files/figure-html/roc_curve-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified script/Assignment4_files/figure-html/roc_curve-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified script/Assignment4_files/figure-html/roc_curve-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.