Title: | Constructs Principal Surfaces |
---|---|
Description: | Construct a principal surface that are two-dimensional surfaces that pass through the middle of a p-dimensional data set. They minimise the distance from the data points, and provide a nonlinear summary of data. The surfaces are nonparametric and their shape is suggested by the data. The formation of a surface is found using an iterative procedure which starts with a linear summary, typically with a principal component plane. Each successive iteration is a local average of the p-dimensional points, where an average is based on a projection of a point onto the nonlinear surface of the previous iteration. For more information on principal surfaces, see Ganey, R. 2019, Biplots based on principal surfaces,Faculty of Science ,Department of Statistical Sciences, UCT. |
Authors: | Raeesa Ganey [aut, cre] |
Maintainer: | Raeesa Ganey <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0 |
Built: | 2025-03-13 08:01:33 UTC |
Source: | https://github.com/raeesaganey91/prinsurf |
A function to compute principal surfaces based on input data containing continuous variables.
principal.surface( X, max.iter = 10, alpha = 0.6, N = 50, print_iterations = FALSE )
principal.surface( X, max.iter = 10, alpha = 0.6, N = 50, print_iterations = FALSE )
X |
A data frame or matrix containing continuous variables. |
max.iter |
Integer. Maximum number of iterations for the principal surface algorithm. |
alpha |
Numeric. The span argument passed to the |
N |
Integer. The resolution for the interpolated grid surface, creating an |
print_iterations |
Logical. Should the iterations in the principal surface algorithm be printed? Defaults to |
A list with the following components:
fj.mat
A numeric matrix of the final principal surface fitted values.
lambda.j
A numeric representation of the samples in two dimensions.
## Not run: surface <- principal.surface(iris[,1:3],max.iter = 3) ## End(Not run) surface <- principal.surface(iris[1:50,1:3],max.iter = 3)
## Not run: surface <- principal.surface(iris[,1:3],max.iter = 3) ## End(Not run) surface <- principal.surface(iris[1:50,1:3],max.iter = 3)