This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(bayestestR) | |
library(bayesAB) | |
# See Manifesto Functions at www.themetricsmanifesto.com | |
# Put in your same working director | |
source("manifesto_functions.R") | |
bayesPhishArrive <- function(prior_vals = c(5,1), total_vals = c(87,12)){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Package names | |
packages <- c("readr", "tidyverse", "lubridate", "survival", "survminer", "shiny", "shinydashboard","reactable","shinyalert") | |
# Install packages not yet installed | |
installed_packages <- packages %in% rownames(installed.packages()) | |
if (any(installed_packages == FALSE)) { | |
install.packages(packages[!installed_packages]) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source("helper_functions.R") | |
#30MB File Upload | |
options(shiny.maxRequestSize = 30*1024^2) | |
ui <- dashboardPage( | |
title="Vuln Burndown", | |
dashboardHeader(title = "Vulnerability Burndown"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source("manifesto_functions.R") | |
################ | |
### Introduction | |
patches <- 0:20 | |
average <- 23/4 | |
plot(p, dpois(patches, average), type="h", lwd=3, | |
ylab="Probability Of Emergency Patch", | |
xlab="Count Of Emergency Patches") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source("manifesto_functions.R") | |
### OPTIONAL A/B Case Study | |
### Code Slide #1 | |
# Declare list to hold configurations | |
base_configs <- list() | |
# Amount of simulation | |
base_configs["n_draws"] <- 100000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source("manifesto_functions.R") | |
######################### | |
### Beta-Binomial Example | |
# Make grid of 10K sequential possibilities between 0 to 1 | |
plausible_rates <- data.frame( | |
possible_grid = seq(from = 0, to = 1, length = 10000)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source("manifesto_functions.R") | |
###################### | |
### Naive Escape Rates | |
MakeBetaGraph(10, 100, xlab = "Rate", ylab = "Strength", | |
tlab = "January Escape Rates", | |
slab = "Mean and Highest Density Interval", xadj = .001) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source("manifesto_functions.R") | |
########################### | |
### Non-Bayesian Wait Times | |
# Number of product teams | |
group_count = 10 | |
# Empty Data Frame to hold results | |
dt <- tibble() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source("manifesto_functions.R") | |
############################################## | |
### Introduction: Random Bombs and Horse Kicks | |
# Bomb Narrative | |
bombs <- tibble(hits = c(0,1,2,3,4,5), | |
frequency = c(229, 211, 93, 35, 7, 1), | |
ratio = frequency/sum(frequency)) | |
bombs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source("manifesto_functions.R") | |
################## | |
### Get Small Data | |
#Engineer One and Two Remediation Rate Beliefs | |
eng_one <- c(4,7) #Median and 90% Stretch | |
eng_two <- c(2,4) |
NewerOlder