1 Environment and datasets

1.1 Setup environment

library(NNbenchmark)
library(kableExtra)
options(scipen = 999)
if(dir.exists("D:/GSoC2020/Results/2020run02/"))
{  
  odir <- "D:/GSoC2020/Results/2020run02/"
}else if(dir.exists("~/Documents/recherche-enseignement/code/R/NNbenchmark-project/NNtempresult/"))
{  
  odir <- "~/Documents/recherche-enseignement/code/R/NNbenchmark-project/NNtempresult/"
}else
  odir <- "~"

nrep <- 2
maxit2ndorder  <-    200
maxit1storderA <-   1000
maxit1storderB <-   5000
maxit1storderC <-  10000
maxit1storderD <- 100000

1.2 Datasets to test

NNdataSummary(NNdatasets)
##      Dataset n_rows n_inputs n_neurons n_parameters
## 1     mDette    500        3         5           26
## 2  mFriedman    500        5         5           36
## 3  mIshigami    500        3        10           51
## 4    mRef153    153        5         3           22
## 5     uDmod1     51        1         6           19
## 6     uDmod2     51        1         5           16
## 7  uDreyfus1     51        1         3           10
## 8  uDreyfus2     51        1         3           10
## 9    uGauss1    250        1         5           16
## 10   uGauss2    250        1         4           13
## 11   uGauss3    250        1         4           13
## 12 uNeuroOne     51        1         2            7

2 Dedicated functions by packages

2.1 TrafficBDE Train/predict Functions - arguments x,y

#library(TrafficBDE)
TrafficBDE.method <- "none"
hyperParams.TrafficBDE <- function(...) {
    return (list())
}
NNtrain.TrafficBDE <- function(x, y, dataxy, formula, neur, method, hyperParams, ...) {
  TrafficBDE::TrainCR(list(dataxy,dataxy),"y")
}
NNpredict.TrafficBDE <- function(object, x, ...)
    predict(object, x)
NNclose.TrafficBDE <- function()
  if("package:TrafficBDE" %in% search())
    detach("package:TrafficBDE", unload=TRUE)
TrafficBDE.prepareZZ <- list(xdmv = "d", ydmv = "v", zdm = "d", scale = TRUE)
if(FALSE)
res <- trainPredict_1data(1, TrafficBDE.method, "NNtrain.TrafficBDE", "hyperParams.TrafficBDE", "NNpredict.TrafficBDE", 
                               NNsummary, "NNclose.TrafficBDE", NA, TrafficBDE.prepareZZ, nrep=5, echo=TRUE, doplot=FALSE,
                               pkgname="TrafficBDE", pkgfun="TrafficBDE", csvfile=TRUE, rdafile=TRUE, odir=odir)

3 Launch the NN package

res <- trainPredict_1pkg(c(1:12), pkgname = "TrafficBDE", pkgfun = "TrainCR", TrafficBDE.method,
  prepareZZ.arg = TrafficBDE.prepareZZ, nrep = nrep, doplot = TRUE,
  csvfile = TRUE, rdafile = TRUE, odir = odir, echo = FALSE)

4 Results

#print(res)
kable(t(apply(res, c(1,4), min)))%>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"))
RMSE MSE MAE WAE time
mDette 8.1656 66.6770 6.5262 36.2385 1660.34
mFriedman 0.2348 0.0551 0.1880 0.6346 1889.70
mIshigami 3.6898 13.6148 2.9776 13.1137 1733.89
mRef153 2.7684 7.6642 1.9895 13.3846 46.79
uDmod1 0.0411 0.0017 0.0337 0.1048 26.95
uDmod2 0.0417 0.0017 0.0341 0.0892 25.37
uDreyfus1 0.0665 0.0044 0.0454 0.2140 2.80
uDreyfus2 0.1133 0.0128 0.0894 0.2709 2.74
uGauss1 2.2405 5.0200 1.7384 7.1531 66.58
uGauss2 2.3613 5.5756 1.8489 7.5216 38.28
uGauss3 2.3033 5.3051 1.8282 7.1485 34.05
uNeuroOne 0.2430 0.0591 0.1763 0.5887 4.50
kable(t(apply(res, c(1,4), median)))%>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"))
RMSE MSE MAE WAE time
mDette 8.1656 66.6770 6.5262 36.2385 1661.845
mFriedman 0.2348 0.0551 0.1880 0.6346 1889.810
mIshigami 3.6898 13.6148 2.9776 13.1137 1736.060
mRef153 2.7684 7.6642 1.9895 13.3846 46.810
uDmod1 0.0411 0.0017 0.0337 0.1048 26.950
uDmod2 0.0417 0.0017 0.0341 0.0892 25.510
uDreyfus1 0.0665 0.0044 0.0454 0.2140 2.850
uDreyfus2 0.1133 0.0128 0.0894 0.2709 2.760
uGauss1 2.2405 5.0200 1.7384 7.1531 66.685
uGauss2 2.3613 5.5756 1.8489 7.5216 38.310
uGauss3 2.3033 5.3051 1.8282 7.1485 34.505
uNeuroOne 0.2430 0.0591 0.1763 0.5887 4.555