Skip to content

Instantly share code, notes, and snippets.

View StuartGordonReid's full-sized avatar

Stuart Gordon Reid StuartGordonReid

View GitHub Profile
@tomaskrehlik
tomaskrehlik / jordan_caret.R
Created November 19, 2013 17:23
A cusom function to use jordan recurrent neural network from RSNNS package with caret.
grid <- expand.grid(.size=5:10)
modelFunc <- function(data, parameter, levels, last, ...)
{
library(RSNNS)
list(fit = jordan(data[,setdiff(names(data),".outcome")], data$.outcome, size = parameter$.size, initFuncParams = c(1,-1, 0.3, 1, 0.5)))
}
predFunc <- function(object, newdata)
{
library(RSNNS)