predDlCensus: Predict deep learning models on Census data

View source: R/funKerasCensus.R

predDlCensusR Documentation

Predict deep learning models on Census data

Description

Predict deep learning models on Census data

Usage

predDlCensus(
  x = NULL,
  target = "age",
  task.type = "classif",
  nobs = 10000,
  nfactors = "high",
  nnumericals = "high",
  cardinality = "high",
  cachedir = "oml.cache",
  k = 1,
  prop = 2/3,
  batch_size = 32,
  verbosity = 0
)

Arguments

x

matrix with untransformed hyperparameters, e.g., result from spot. Hyperparameters will be transformed in predDlCensus with transformX and transformations defined in getModelConf.

target

target

task.type

class/reg

nobs

number of obsvervations, max: 229,285

nfactors

(character) number of factor variables

nnumericals

(character) number of numerical variables

cardinality

(character) cardinality

cachedir

cache directory

k

number of repeats

prop

vector. proportion between train / test and train/val. Default: 2/3. If one value is given, the same proportion will be used for both splits. Otherwise, the first entry is used for the test/training split and the second value for the training/validation split. If the second value is 1, the validation set is empty. Given prop = (p1,p2), the data will be partitioned as shown in the following two steps:

Step 1:

train1 = p1*data and test = )(1-p1)*data

Step 2:

train2 = p2*train1 = p2*p1*data and val = )(1-p2)*train1 = (1-p2)*p1*data

Note: If p2=1, no validation data will be generated.

batch_size

batch_size. Default: 32.

verbosity

verbosity. Default: 0

Value

list of matrices with true and predicted values.

trueY

true values

hatY

predicted values

Examples


### These examples require an activated Python environment as described in
### Bartz-Beielstein, T., Rehbach, F., Sen, A., and Zaefferer, M.:
### Surrogate Model Based Hyperparameter Tuning for Deep Learning with SPOT,
### June 2021. http://arxiv.org/abs/2105.14625.
PYTHON_RETICULATE <- FALSE
if(PYTHON_RETICULATE){
cfg <- getModelConf(list(model="dl"))
x <- matrix(cfg$defaults, nrow=1)
res <- predDlCensus(x=x, k=2)
}


SPOTMisc documentation built on Sept. 5, 2022, 5:06 p.m.