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
## Stochastic Variational Deep Kernel Learning | |
## paper: https://arxiv.org/abs/1611.00336 | |
## code+data from the authors (thanks!!!): https://people.orie.cornell.edu/andrew/code/#SVDKL | |
## get data + prepare sample authors used for evaluation | |
wget https://people.orie.cornell.edu/andrew/code/svdklcode.zip | |
unzip svdklcode.zip |
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
##install.packages("cranlogs") | |
library(data.table) | |
library(cranlogs) | |
##caret/models/file | |
## grep "library =" * | sed 's/.*=//' | sed 's/c(//' | sed 's/),/,/' | grep -v NULL | sed 's/,.*$/,/' | sort | uniq | tr -d '\n' | |
caret_pkgs <- c("rpart", "C50", "CHAID", "Cubist", "FCNN4R", "HDclassif", "HiDimDA", "KRLS", "LiblineaR", |
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(data.table) | |
library(rpart) | |
d_train <- fread("https://s3.amazonaws.com/benchm-ml--main/train-0.1m.csv") | |
md <- rpart(ifelse(dep_delayed_15min=="Y",1,0) ~ ., d_train, | |
control = rpart.control(cp = 0.001)) | |
plotcp(md) | |
printcp(md) |
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
data.table vs SparkR | |
group-by aggregate on 100M records (1M groups) | |
data.table 6.5 sec (without key) / 1.3 sec (with key) - all 1 core | |
SparkR cached 200 sec (8 cores) | |
30x / 150x ( 240x / 1200x per core) |
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
## training a model | |
library(h2o) | |
h2o.init(nthreads = -1) | |
dx_train <- h2o.importFile("https://s3.amazonaws.com/benchm-ml--main/train-0.1m.csv") | |
md_rf <- h2o.randomForest(x = 1:(ncol(dx_train)-1), y = ncol(dx_train), training_frame = dx_train, | |
model_id = "h2o_RF", | |
ntrees = 100, max_depth = 10, nbins = 100) |
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(data.table) | |
library(ROCR) | |
library(lightgbm) | |
set.seed(123) | |
d_train <- fread("/var/data/bm-ml/train-0.1m.csv") | |
d_test <- fread("/var/data/bm-ml/test.csv") | |
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
## partial credit :) to @earino for the idea | |
library(lightgbm) | |
library(data.table) | |
library(ROCR) | |
d0_train <- fread("/var/data/bm-ml/train-10m.csv") | |
d0_test <- fread("/var/data/bm-ml/test.csv") | |
d0 <- rbind(d0_train, d0_test) |
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
# OpenML Benchmarking Suites and the OpenML100 | |
# https://arxiv.org/abs/1708.03731 | |
# https://www.openml.org/s/14/data | |
library(OpenML) | |
ids <- getOMLStudy('OpenML100')$data$data.id | |
dsall <- listOMLDataSets() | |
sum(dsall$data.id %in% ids) ## 96??? | |
ds <- dsall[dsall$data.id %in% ids,] |
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
## https://github.com/EpistasisLab/penn-ml-benchmarks | |
## pip install pmlb | |
import numpy as np | |
from pmlb import fetch_data | |
from pmlb import dataset_names | |
x = np.zeros(len(dataset_names)) | |
for i, dn in enumerate(dataset_names): |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define N 128 | |
#define B0 100 | |
#define R 1000000 | |
#define M 1000 | |
int cmpfunc (const void * a, const void * b) | |
{ |
NewerOlder