ShepardDensityScatter function

Shepard PDE scatter

Shepard PDE scatter

Draws ein Shepard Diagram (scatterplot of distances) with an two-dimensional PDE density estimation .

ShepardDensityScatter(InputDists, OutputDists, Plotter= "native", Type = "DDCAL", DensityEstimation="SDH", Marginals = FALSE, xlab='Input Distances', ylab='Output Distances',main='ProjectionMethod', sampleSize=500000)

Arguments

  • InputDists: [1:n,1:n] with n cases of data in d variables/features: Matrix containing the distances of the inputspace.
  • OutputDists: [1:n,1:n] with n cases of data in d dimensionalites of the projection method variables/features: Matrix containing the distances of the outputspace.
  • Plotter: Optional, either "native" or "plotly"
  • Type: Optional, either "DDCAL" which creates a special hard color transition sensitive to density-based structures or "Standard" which creates a standard continuous color transition which is proven to be not very sensitive for complex density-based structures.
  • DensityEstimation: Optional, use either "SDH" or "PDE" for data density estimation.
  • Marginals: Optional, either TRUE (draw Marginals) or FALSE (do not draw Marginals)
  • xlab: Label of the x axis in the resulting Plot.
  • ylab: Label of the y axis in the resulting Plot.
  • main: Title of the Shepard diagram
  • sampleSize: Optional, default(500000), reduces a.ount of data for density estimation, if too many distances given

Details

Introduced and described in [Thrun, 2018, p. 63] with examples in [Thrun, 2018, p. 71-72]

References

[Thrun, 2018] Thrun, M. C.: Projection Based Clustering through Self-Organization and Swarm Intelligence, doctoral dissertation 2017, Springer, ISBN: 978-3-658-20540-9, Heidelberg, 2018.

Author(s)

Michael Thrun

Examples

data("Lsun3D") Cls=Lsun3D$Cls Data=Lsun3D$Data InputDist=as.matrix(dist(Data)) res = stats::cmdscale(d = InputDist, k = 2, eig = TRUE, add = FALSE, x.ret = FALSE) ProjectedPoints = as.matrix(res$points) ShepardDensityScatter(InputDist,as.matrix(dist(ProjectedPoints)),main = 'MDS') ShepardDensityScatter(InputDist[1:100,1:100], as.matrix(dist(ProjectedPoints))[1:100,1:100],main = 'MDS')