fitNetwork: Fit a Signalgraph model

Description Usage Arguments Value

Description

fitNetwork initializes a graph into a signalgraph then fits the model with penalized least squares. fit_initialized_sg fits an network already initialized by initializeGraph. fit_initialized_sg is called by fitNetwork.

Usage

1
2
3
4
5
fitNetwork(g, data, fixed = NULL, graph_attr = list(L2_pen = 0.04),
  min.iter = 2, max.iter = 5, epsilon = 1e-04, verbose = FALSE)

fit_initialized_sg(g, min.iter = 2, max.iter = 5, epsilon = 1e-04,
  verbose = FALSE)

Arguments

g

igraph object. The vertices must be named.

data

a data frame. All of the names in the data from must match a vertex name.

fixed

names of fixed variables in the vertices

graph_attr

list of graph attributes. Graph attributes include:

  • L1_pen: penalized least squares error L1 penalty parameter value

  • L2_pen: penalized least squares error L2 penalty parameter value. The default L2 penalty parameter is .04.

  • activation: the activation function (this actually is an R function), defaults to logistic.

  • activation.prime: The derivative fo the activation function, used in gradient calculation. Defaults to NULL

  • min.max.constraints: 2 element numeric containing the acceptable range for each rate.

min.iter

minimum number of iterations

max.iter

maximum number of iterations

epsilon

after the minimum number of iterations, when change in means squared error between iterations falls below epsilon, cease optimizing and return current estimates

verbose

if set to true, prints messages of details of optimization.

Value

A fitted signalgraph object.


robertness/signalgraph documentation built on May 27, 2019, 10:33 a.m.