make_nodes: Constructs a listenv of nodes according to the specified...

Description Usage Arguments Value

View source: R/make_nodes.R

Description

Constructs a listenv of nodes according to the specified model in connection_matrix

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
make_nodes(
  blocked_data,
  connection_matrix,
  block_names,
  estimators,
  initializers,
  local_preprocessors,
  global_preprocessors,
  node_class_types
)

Arguments

blocked_data

A list of matrices containing the data that corresponds to each node/block. The ordering of the outer list should be the same as that of the connection_matrix.

connection_matrix

A lower triangular matrix where the non zero elements what connections exist. The rows indicate the node where the edge is going to, and the columns indicates the node where the edge is coming from.

block_names

An ordered list containing the names that should be assigned to each block. The ordering of the list should be the same as that of the connection_matrix. When the argument is not set, names are extracted from data, or set to dummy names based on ordering when data contains no names.

estimators

A list of functions indicating which estimator should be used for which node. The ordering of the list should be the same as that of the connection_matrix.

initializers

A list of functions indicating which initializer should be used for which node. The ordering of the list should be the same as that of the connection_matrix.

local_preprocessors

A list of preprocessing functions when unique_node_preprocessing is FALSE, a list of lists of preprocessing functions when unique_node_preprocessing is TRUE. The ordering of the outer list should be the same as that of the connection_matrix. The order of the inner list is only important when the function results differ when their order of application is changed. The funtions will be applied from beginning to end. The supplied function is assumed to be influenced by subsampling, and therefore can be applied on subsets when (cross-)validating. User-implemented functions must take a Matrix as input, and return the preprocessed matrix. Implemented functions are: (block_scale, standardize, and mean_center)

global_preprocessors

A list of preprocessing functions when unique_node_preprocessing is FALSE, a list of lists of preprocessing functions when unique_node_preprocessing is TRUE. The ordering of the outer list should be the same as that of the connection_matrix. The order of the inner list is only important when the function results differ when their order of application is changed. The funtions will be applied from beginning to end. The supplied function must be invariant to subsampling. User-implemented functions must take a Matrix as input, and return the preprocessed matrix.

node_class_types

A list of node class types. The ordering of the outer list should be the same as that of the connection_matrix.

Value

A listenv of uninitialized and connected nodes.


GeertPostma/pathmodelr documentation built on Oct. 5, 2021, 4:17 p.m.