GetProjectionUncertainty: Compute projection-associted uncertainty

Description Usage Arguments Value Examples

Description

Compute projection-associted uncertainty

Usage

1
GetProjectionUncertainty(X, BootPG, Mode = "MedianDistPW", TargetPG = NULL)

Arguments

X

numeric matrix containing the points to be projected

BootPG

a list of ElPiGraph structures. The nodes dimensionality must be compatible with the dimensioanlity of the data

Mode

string, the mode used to compute points uncertainty. Currently the following options are supported

"MedianDistPW"

All the paiwise distances between the projections of the same point across the different ElPiGraphs are calculated and the median (per points) is returned

"MedianDistPW"

All the paiwise distances between the projections of the same point across the different ElPiGraphs are calculated and the mean (per points) is returned

"MeanDistCentroid"

The centroid of the projections of the same point across the different ElPiGraphs are calculated and the mean (per point) distance of the original points from the centroid is returned

"MeanDistCentroid"

The centroid of the projections of the same point across the different ElPiGraphs are calculated and the mean (per point) distance of the original points from the centroid is returned

TargetPG

an optional parameter describing the target ElPiGraph. Currently unused.

Value

a numeric vector with the same length as the number of rows of X. Higher values indicate larger uncertainty.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  nRep <- 50
  
  
  TreeEPG <- computeElasticPrincipalTree(X = tree_data, NumNodes = 70,
      drawAccuracyComplexity = FALSE, drawEnergy = FALSE,
      drawPCAView = FALSE,
      nReps = nRep, ProbPoint = .9,
      TrimmingRadius = Inf,
      ICOver = "DensityProb", DensityRadius = .2)
  
  PtUnc_1 <- GetProjectionUncertainty(X = tree_data, BootPG = TreeEPG[1:nRep], Mode = "MedianDistPW")
  PtUnc_2 <- GetProjectionUncertainty(X = tree_data, BootPG = TreeEPG[1:nRep], Mode = "MedianDistCentroid")
  PtUnc_3 <- GetProjectionUncertainty(X = tree_data, BootPG = TreeEPG[1:nRep], Mode = "MeanDistPW")
  PtUnc_4 <- GetProjectionUncertainty(X = tree_data, BootPG = TreeEPG[1:nRep], Mode = "MeanDistCentroid")
  
  pairs(cbind(PtUnc_1, PtUnc_2, PtUnc_3, PtUnc_4))
  
  PlotPG(X = tree_data, TargetPG = TreeEPG[[nRep+1]], BootPG = TreeEPG[1:nRep], GroupsLab = PtUnc_1)
  PlotPG(X = tree_data, TargetPG = TreeEPG[[nRep+1]],  GroupsLab = PtUnc_1, p.alpha = .9)

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