principal.surface {prinsurf}R Documentation

Principal Surface

Description

A function to compute principal surfaces based on input data containing continuous variables.

Usage

principal.surface(
  X,
  max.iter = 10,
  alpha = 0.6,
  N = 50,
  print_iterations = FALSE
)

Arguments

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 loess() function.

N

Integer. The resolution for the interpolated grid surface, creating an N^2 \times p matrix.

print_iterations

Logical. Should the iterations in the principal surface algorithm be printed? Defaults to FALSE.

Value

A list with the following components:

fj.mat

A numeric n \times p matrix of the final principal surface fitted values.

lambda.j

A numeric representation of the samples in two dimensions.

Examples


surface <- principal.surface(iris[,1:3],max.iter = 3)
surface <- principal.surface(iris[1:50,1:3],max.iter = 3)

[Package prinsurf version 1.0 Index]