View source: R/mapParameters.R
active2All | R Documentation |
Recreates the full set of parameters from the subset of active ones.
active2All(x, a, model)
x |
subset of parameters |
a |
names of the active parameters |
model |
model (char) |
y full parameters
model <- "dl" # indices of active variables i <- c(1,3) # names of active variables a <- getVarNames(model=model,i=i) x <- getModelConf(model=model)$defaults # now matrix x has only active variables 1 and 3: x <- x[1, getIndices(model=model, a=a), drop=FALSE] # reconstruct the full set of parameters active2All(x, a, model) # 2nd example: new values to x (dropout=0.1, units=11): x <- matrix(c(0.1,11), nrow=1) a <- c("dropout", "units") # reconstruct the full set of parameters active2All(x, a, model) # matrix x <- rbind(x,2*x) active2All(x, a, model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.