Setup:
git clone git@github.com:nabeken/vagrant-aws.git
cd vagrant-aws
git checkout spot-3
gem build vagrant-aws.gemspec
vagrant install plugin vagrant-aws-0.5.0.gem
Vagrantfile:
library(tidyverse) | |
library(gganimate) | |
library(modelr) | |
options(na.action = na.warn) | |
slopes <- 0 | |
intercepts <- 0 | |
fit <- 0 |
## Let's create a function for conducting power analysis for two groups with a t-test | |
t.test.power <- function(N = 100, samples = 100, g1_mean = 0, g1_sd = 1, | |
g2_mean = 0, g2_sd = 1){ | |
## Setting up an empty vector to collect p-values for each sample | |
PValues <- rep(NA, samples) | |
Group1Mean <- rep(NA, samples) | |
Group2Mean <- rep(NA, samples) | |
for(i in 1:samples){ |
library(curl) | |
testfunc <- function(x){ | |
## Setting up data vendor calls in parallel | |
############################### | |
out <<- list() | |
dbout <<- list() |
graphTree <- function(feature_names, model, tree) { | |
allTrees <- xgb.model.dt.tree(feature_names = feature_names, model = model) | |
allTrees <- | |
allTrees %>% | |
filter(Tree == tree) | |
allTrees <- data.table(allTrees) | |
library(xgboost) | |
library(dplyr) | |
library(parallel) | |
library(ModelMetrics) | |
print(detectCores()) | |
Train <- | |
iris %>% | |
mutate( |
#devtools::install_github("JackStat/cfb") | |
library(foreach) | |
library(cfb) | |
TotalWeeks = 8 | |
allScoringSummary <- foreach(i = 1:TotalWeeks, .combine = 'rbind') %do% { | |
message(i) | |
scb <- NCAAscoreboard(2016, i) |
library(microbenchmark) | |
SS <- runif(10000) | |
forLoop <- function(x){ | |
fill = rep(NA, length(x)) | |
for(i in 1:length(x)){ | |
fill[i] = sqrt(x[i]) | |
} | |
return(fill) | |
} |
N = 100000 | |
Actual = as.numeric(runif(N) > .5) | |
Predicted = as.numeric(runif(N)) | |
actual = Actual | |
predicted = Predicted | |
s1 <- system.time(a1 <- ModelMetrics::auc(Actual, Predicted)) | |
## Suffers from integer overflow | |
s2 <- system.time(a2 <- Metrics::auc(Actual, Predicted)) |
Setup:
git clone git@github.com:nabeken/vagrant-aws.git
cd vagrant-aws
git checkout spot-3
gem build vagrant-aws.gemspec
vagrant install plugin vagrant-aws-0.5.0.gem
Vagrantfile:
## 2010-06-25 | |
## (c) Felix Andrews <felix@nfrac.org> | |
## GPL-2 | |
## If 'which' is given it should be a logical matrix specifying bold cells. | |
## Otherwise: in each column or row with numeric data, the maximum or minimum | |
## value is set bold; 'max' can have entries for each column/row, NA means skip. | |
## Examples: | |
## library(xtable) |