-
Install babel plugins to enable decorators.
npm install babel-plugin-transform-decorators-legacy --save-dev
-
Create or update your
.babelrc
file in root folder:
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(ggplot2) | |
# returns the odds of a model given an input vector x | |
get_log_odds <- function(model,x) { | |
n_coeff <- length(model$coefficients) | |
if (n_coeff - length(x) == 1) { | |
# user forgot the first 1 in [1, x1,...] | |
x <- c(1,x) |
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('helpers.R') | |
# ======================================== | |
# ==============[ Q 3.3.1 ]=============== | |
# ======================================== | |
load('hilda.Rdata') | |
# redefine the hospitaldays to be 1 for anything above 1 |
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
# ======================================== | |
# ==============[ Q 3.2.1 ]=============== | |
# ======================================== | |
load('hilda.Rdata') | |
source('helpers.R') | |
hilda <- setup_data_base(hilda) | |
# form the first model by splitting the ages into groups of five |
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
# ======================================== | |
# ==============[ Q 3.1.1 ]=============== | |
# ======================================== | |
# load data | |
load('hilda.Rdata') | |
source('helpers.R') | |
# redifine the hospitaldays to be 1 for anything above 1 | |
hilda$hospdays[(hilda$hospdays >= 1)] = 1 |
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(ggplot2) | |
source('helpers.R') | |
# ====================================== | |
# ==============[ Q 3.4 ]=============== | |
# ====================================== | |
# prepare the model by defining factors |
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(ggplot2) | |
source('helpers.R') | |
load('data.Rda') | |
head(data) | |
####### Setup data | |
data$crm <- (data$crimes / data$popul) * 1000 | |
data$crm <- ceiling(data$crm) |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using DataReader.Extensions; | |
using iTextSharp.text.log; | |
using iTextSharp.text.pdf; | |
using iTextSharp.text.pdf.parser; | |
namespace DataReader.ExploredCode |
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
d |
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
# Example Dockerfile | |
FROM hello-world |
OlderNewer