Description Usage Arguments Value
This function is a wrapper to the computeElasticPrincipalGraph function that construct the appropriate initial graph and apply the required grammar operations. Note that this is a generic function that is is called by the topology specific functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | computeElasticPrincipalGraphWithGrammars(X, NumNodes, NumEdges = Inf,
InitNodes = 2, Lambda = 0.01, Mu = 0.1, GrowGrammars, ShrinkGrammars,
GrammarOptimization = FALSE, MaxSteps = Inf, GrammarOrder = c("Grow",
"Shrink"), MaxNumberOfIterations = 10, TrimmingRadius = Inf, eps = 0.01,
Do_PCA = TRUE, InitNodePositions = NULL, AdjustVect = NULL,
ElasticMatrix = NULL, InitEdges = NULL, CenterData = TRUE,
ComputeMSEP = TRUE, verbose = FALSE, ShowTimer = FALSE,
ReduceDimension = NULL, drawAccuracyComplexity = TRUE,
drawPCAView = TRUE, drawEnergy = TRUE, n.cores = 1, ClusType = "Sock",
MinParOP = MinParOP, nReps = 1, ParallelRep = FALSE, Subsets = list(),
ProbPoint = 1, Mode = 1, FinalEnergy = "Base", alpha = 0, beta = 0,
gamma = 0, FastSolve = FALSE, Configuration = NULL,
DensityRadius = NULL, AvoidSolitary = FALSE, EmbPointProb = 1,
SampleIC = TRUE, AvoidResampling = TRUE, AdjustElasticMatrix = NULL,
AdjustElasticMatrix.Initial = NULL, Lambda.Initial = NULL,
Mu.Initial = NULL, ...)
|
X |
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 |
InitNodes |
integer, number of points to include in the initial graph |
Lambda |
real, the lambda parameter used the compute the elastic energy |
Mu |
real, the lambda parameter used the compute the elastic energy |
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 |
GrammarOptimization |
boolean, should grammar optimization be perfomred? If true grammar operations that do not increase the number of nodes will be allowed |
MaxSteps |
integer, max number of applications of the grammar. This value need to be less than infinity if GrammarOptimization is set to true |
GrammarOrder |
character vector, the order of application of the grammars. It can be any combination of "Grow" and "Shrink" |
MaxNumberOfIterations |
integer, maximum number of steps to embed the nodes in the data |
TrimmingRadius |
real, maximal distance of point from a node to affect its embedment |
eps |
real, minimal relative change in the position of the nodes to stop embedment |
Do_PCA |
boolean, should data and initial node positions be PCA trnasformed? |
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. |
ElasticMatrix |
numerical 2D matrix, the k-by-k elastic matrix |
InitEdges |
numerical 2D matrix, the e-by-2 matrix with e end-points of the edges connecting the nodes |
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 |
nReps |
integer, number of replica of the construction |
ParallelRep |
boolean, should parallel execution be performed on the sampling instead of the the grammar evaluations? |
Subsets |
list of column names (or column number). When specified a principal tree will be computed for each of the subsets specified. |
ProbPoint |
real between 0 and 1, probability of inclusing of a single point for each 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 |
|
FastSolve |
boolean, should FastSolve be used when fitting the points to the data? |
Configuration |
string, initial configuration type. |
DensityRadius |
numeric, the radius used to estimate local density. This need to be set when ICOver is equal to "Density" |
AvoidSolitary |
boolean, should configurations with "solitary nodes", i.e., nodes without associted 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. |
SampleIC |
boolean, should the initial configuration be considered on the sampled points when applicable? |
AvoidResampling |
booleand, should the sampling of initial conditions avoid reselecting the same points (or points neighbors if DensityRadius is specified)? |
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 |
real, the lambda parameter used the construct the elastic matrix associted with ther initial configuration if needed. If NULL, the value of Lambda will be used. |
Mu.Initial |
real, the mu parameter used the construct the elastic matrix associted with ther initial configuration if needed. If NULL, the value of Mu will be used. |
... |
optional parameter that will be passed to the AdjustHOS function |
A list of principal graph strucutures containing the trees constructed during the different replica of the algorithm. If the number of replicas is larger than 1. The the final element of the list is the "average tree", which is constructed by fitting the coordinates of the nodes of the reconstructed trees
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.