airoldilab / sgd

An R package for large scale estimation with stochastic gradient descent
62 stars 18 forks source link

add color to run_exp plots and change x-axis to label based on number of passes #66

Closed dustinvtran closed 9 years ago

dustinvtran commented 9 years ago
source("script/load_mnist.R")
source("script/multilogit.R")
source("script/plot.R")

library(sgd)
library(bigmemory)

dat <- load_mnist()
X <- dat$train$x
y <- dat$train$y
X_test <- dat$test$x
y_test <- dat$test$y

methods <- list("sgd", "ai-sgd", "implicit")
lrs <- list("adagrad", "one-dim", "one-dim")
np <- list(3, 3, 3)
names <- methods

run_exp(methods, names, lrs, np, X, y, X_test, y_test)

screen shot 2015-05-29 at 7 17 55 pm

lantian2012 commented 9 years ago

Do you think it makes sense that ai-sgd has worse error? Or is it caused by small training set size?

dustinvtran commented 9 years ago

Both yes. I believe in practice the standard recommendation is to start averaging after a single pass (what Bottou does).

dustinvtran commented 9 years ago

screen shot 2015-05-30 at 4 25 22 pm it's looking quite nice :)

dustinvtran commented 9 years ago

Added npasses in 6dbd981b8b6b60dea2fbd698b28e66011500fb34