active2All: Active to all

View source: R/mapParameters.R

active2AllR Documentation

Active to all

Description

Recreates the full set of parameters from the subset of active ones.

Usage

active2All(x, a, model)

Arguments

x

subset of parameters

a

names of the active parameters

model

model (char)

Value

y full parameters

Examples

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)



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