SegmentLoss: SegmentLoss

Description Usage Arguments Details Value

View source: R/loss_funs.R

Description

This closure returns a function which calculates the loss for the given segment of the data.

Usage

1
2
3
SegmentLoss(n_obs, lambda, penalize_diagonal = FALSE, standardize = TRUE,
  threshold = 1e-07, method = c("nodewise_regression", "summed_regression",
  "ratio_regression", "glasso"), ...)

Arguments

n_obs

Total number of observations

lambda

Positive numeric value. This is the regularization parameter in the single Lasso fits. This value is ignored if FUN is not NULL.

penalize_diagonal

Boolean, should the diagonal elements of the precision matrix be penalized by λ? This value is ignored if FUN is not NULL.

standardize

Boolean. If TRUE the penalty parameter λ will be adjusted for every dimension in the single Lasso fits according to the standard deviation in the data.

threshold

The threshold for halting the iteration in glasso or glmnet. In the former it controls the absolute change of single parameters in the latter it controls the total objective value. This value is ignored if FUN is not NULL.

method

Which estimator should be used? Possible choices are

  • nodewise_regression: Nodewise regression is based on a single node that needs to be specified with an additional parameter node pointing to the column index of the node of interest. Uses glmnet internally. See Kovács (2016) for details.

  • summed_regression: Summed nodewise regression sums up the residual variances of nodewise regression over all nodes. Uses glasso internally. See Kovács (2016) for details.

  • ratio_regression: Likelihood ratio based regression sums the pseudo-profile-likelihood over all nodes. Uses glasso internally. See Kovács (2016) for details.

  • glasso: The graphical Lasso uses the approach of Friedman et al (2007). In contrast to the other approaches the exact likelihood the whole graphical model is computed and used as loss.

This value is ignored if FUN is not NULL.

...

Further arguments supplied to the select method.

Details

Depending on the desired method and the tuning parameters a different loss function will be parametrized and returned. If method nodewise_regression is selected, the additional argument node must be supplied to determine on which node (dimension) it should be performed.

Value

A parametrized loss function


lorenzha/hdcd documentation built on Sept. 2, 2018, 8:20 p.m.