Runs the algorithm specified in the argument implementation
and
returns the estimated adjacency matrix. This function is not using stability.
GraphicalAlgo(
xdata,
pk = NULL,
Lambda,
Sequential_template = NULL,
scale = TRUE,
implementation = PenalisedGraphical,
start = "cold",
...
)
An array with binary and symmetric adjacency matrices along the third dimension.
matrix with observations as rows and variables as columns.
optional vector encoding the grouping structure. Only used for
multi-block stability selection where pk
indicates the number of
variables in each group. If pk=NULL
, single-block stability
selection is performed.
matrix of parameters controlling the level of sparsity in the
underlying feature selection algorithm specified in implementation
.
If Lambda=NULL
and implementation=PenalisedGraphical
,
LambdaGridGraphical
is used to define a relevant grid.
Lambda
can be provided as a vector or a matrix with
length(pk)
columns.
logical matrix encoding the type of procedure to
use for data with multiple blocks in stability selection graphical
modelling. For multi-block estimation, the stability selection model is
constructed as the union of block-specific stable edges estimated while the
others are weakly penalised (TRUE
only for the block currently being
calibrated and FALSE
for other blocks). Other approaches with joint
calibration of the blocks are allowed (all entries are set to TRUE
).
logical indicating if the correlation (scale=TRUE
) or
covariance (scale=FALSE
) matrix should be used as input of
glassoFast
if
implementation=PenalisedGraphical
. Otherwise, this argument must be
used in the function provided in implementation
.
function to use for graphical modelling. If
implementation=PenalisedGraphical
, the algorithm implemented in
glassoFast
is used for regularised estimation of
a conditional independence graph. Alternatively, a user-defined function
can be provided.
character string indicating if the algorithm should be
initialised at the estimated (inverse) covariance with previous penalty
parameters (start="warm"
) or not (start="cold"
). Using
start="warm"
can speed-up the computations, but could lead to
convergence issues (in particular with small Lambda_cardinal
). Only
used for implementation=PenalisedGraphical
(see argument
"start"
in glassoFast
).
additional parameters passed to the function provided in
implementation
.
The use of the procedure from Equation (4) or (5) is controlled by the argument "Sequential_template".
GraphicalModel
, PenalisedGraphical
Other wrapping functions:
SelectionAlgo()
# Data simulation
set.seed(1)
simul <- SimulateGraphical()
# Running graphical LASSO
myglasso <- GraphicalAlgo(
xdata = simul$data,
Lambda = cbind(c(0.1, 0.2))
)
Run the code above in your browser using DataLab