computeElasticPrincipalGraph: Regularize data and construct a principal elastic graph

Description Usage Arguments Value Examples

Description

This allow to perform basic data regularization before constructing a principla elastic graph. The function also allows plotting the results.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
computeElasticPrincipalGraph(Data, NumNodes, NumEdges = Inf,
  InitNodePositions, AdjustVect, InitEdges, ElasticMatrix = NULL,
  Lambda = 0.01, Mu = 0.1, MaxNumberOfIterations = 100, eps = 0.01,
  TrimmingRadius = Inf, Do_PCA = TRUE, CenterData = TRUE,
  ComputeMSEP = TRUE, verbose = FALSE, ShowTimer = FALSE,
  ReduceDimension = NULL, drawAccuracyComplexity = TRUE,
  drawPCAView = TRUE, drawEnergy = TRUE, n.cores = 1, ClusType = "Sock",
  MinParOP = 20, Mode = 1, FinalEnergy = "Base", alpha = 0, beta = 0,
  gamma = 0, GrowGrammars = list(), ShrinkGrammars = list(),
  GrammarOptimization = FALSE, MaxSteps = Inf, GrammarOrder = c("Grow",
  "Shrink"), FastSolve = FALSE, AvoidSolitary = FALSE, EmbPointProb = 1,
  AdjustElasticMatrix = NULL, AdjustElasticMatrix.Initial = NULL,
  Lambda.Initial = NULL, Mu.Initial = NULL, ...)

Arguments

Data

numerical 2D matrix, the n-by-m matrix with the position of n m-dimensional points

NumNodes

integer, the number of nodes of the principal graph

NumEdges

integer, the maximum nulber of edges

InitNodePositions

numerical 2D matrix, the k-by-m matrix with k m-dimensional positions of the nodes in the initial step

AdjustVect

boolean vector keeping track of the nodes for which the elasticity parameters have been adjusted. When true for a node its elasticity parameters will not be adjusted.

InitEdges

numerical 2D matrix, the e-by-2 matrix with e end-points of the edges connecting the nodes

ElasticMatrix

numerical 2D matrix, the e-by-e matrix containing the elasticity parameters of the edges

Lambda

real, the lambda parameter used the compute the elastic energy

Mu

real, the lambda parameter used the compute the elastic energy

MaxNumberOfIterations

integer, maximum number of steps to embed the nodes in the data

eps

real, minimal relative change in the position of the nodes to stop embedment

TrimmingRadius

real, maximal distance of point from a node to affect its embedment

Do_PCA

boolean, should data and initial node positions be PCA trnasformed?

CenterData

boolean, should data and initial node positions be centered?

ComputeMSEP

boolean, should MSEP be computed when building the report?

verbose

boolean, should debugging information be reported?

ShowTimer

boolean, should the time to construct the graph be computed and reported for each step?

ReduceDimension

integer vector, vector of principal components to retain when performing dimensionality reduction. If NULL all the components will be used

drawAccuracyComplexity

boolean, should the accuracy VS complexity plot be reported?

drawPCAView

boolean, should a 2D plot of the points and pricipal curve be dranw for the final configuration?

drawEnergy

boolean, should changes of evergy VS the number of nodes be reported?

n.cores

either an integer (indicating the number of cores to used for the creation of a cluster) or cluster structure returned, e.g., by makeCluster. If a cluster structure is used, all the nodes must contains X (this is done using clusterExport)

ClusType

string, the type of cluster to use. It can gbe either "Sock" or "Fork". Currently fork clustering only works in Linux

MinParOP

integer, the minimum number of operations to use parallel computation

Mode

integer, the energy computation mode

FinalEnergy

string indicating the final elastic emergy associated with the configuration. Currently it can be "Base" or "Penalized"

alpha

positive numeric, the value of the alpha parameter of the penalized elastic energy

beta

positive numeric, the value of the beta parameter of the penalized elastic energy

gamma
GrowGrammars

list of strings, the grammar to be used in the growth step

ShrinkGrammars

list of strings, the grammar to be used in the shrink step

FastSolve

boolean, should FastSolve be used when fitting the points to the data?

AvoidSolitary

boolean, should configurations with "solitary nodes", i.e., nodes without associated points be discarded?

EmbPointProb

numeric between 0 and 1. If less than 1 point will be sampled at each iteration. EmbPointProb indicates the probability of using each points. This is an *experimental* feature, which may helps speeding up the computation if a large number of points is present.

AdjustElasticMatrix

a penalization function to adjust the elastic matrices after a configuration has been chosen (e.g., AdjustByConstant). If NULL (the default), no penalization will be used.

AdjustElasticMatrix.Initial

a penalization function to adjust the elastic matrices of the initial configuration (e.g., AdjustByConstant). If NULL (the default), no penalization will be used.

Lambda.Initial
Mu.Initial
...

optional parameter that will be passed to the AdjustHOS function

Value

a named list with a number of elements:

NodePositions

A numeric matrix containing the positions of the nodes

Edges

A numeric matrix containing the pairs of nodes connected by edges

ElasticMatrix

The elastic matrix of the graph

ReportTable

The report table for the graph construction

FinalReport

The report table associated with the final graph configuration

Lambda

The lambda parameter used during the graph construction

Mu

The mu parameter used during the graph construction

FastSolve

was FastSolve being used?

Examples

1
2
3
This is a low level function. See  \code{\link{computeElasticPrincipalCircle}},
\code{\link{computeElasticPrincipalCurve}}, or \code{\link{computeElasticPrincipalTree}}
for examples

Albluca/ElPiGraph.R documentation built on May 28, 2019, 11:02 a.m.