s2faPlot: Plot the resulted S2FA hyperplane

Description Usage Arguments Examples

View source: R/s2faPlot.R

Description

Works only if input is 1- or 2-dimensional and output is 1-dimensional.

Usage

1
2
3
s2faPlot(X_t, Z_t, p, color = "red", add = FALSE, addPoints = FALSE,
  pointsColor = "black", addLr = FALSE, lrColor = "blue",
  checkArgs = TRUE, checkPositiveDefinite = FALSE)

Arguments

X_t

a matrix representing the input points to be plotted (if addPoints is TRUE); usually, the training input

Z_t

a matrix representing the output = values of function in input points; usually, the training output

p

parameters of a fitted FA

color

color of the hyperplane given by FA

add

add this plot to an already existing plot?

addPoints

whether to plot the points X_t, Z_t

pointsColor

color of points

addLr

fit and add a linear regression model on plot?

lrColor

color of linear regression hyperplane

checkArgs

whether to check the arguments are valid; it takes more time to execute

checkPositiveDefinite

whether to check the covariance matrices are valid; it takes more time to execute

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
params <- s2faFit(X_t=house[,2,drop=FALSE],
                  Z_t=house[,1,drop=FALSE],
                  type = "fa",
                  lambdaRidge=0,
                  checkArgs=FALSE)
s2faPlot(X_t=house[,2,drop=FALSE],
         Z_t=house[,1,drop=FALSE],
         p=params,
         color="red",
         add=FALSE,
         addPoints=TRUE,
         pointsColor="black",
         addLr=TRUE,
         lrColor="blue",
         checkArgs=TRUE,
         checkPositiveDefinite=FALSE)

params <- s2faFit(X_t=house[,2:3,drop=FALSE],
                  Z_t=house[,1,drop=FALSE],
                  type = "fa",
                  lambdaRidge=0,
                  checkArgs=FALSE)
s2faPlot(X_t=house[,2:3,drop=FALSE],
         Z_t=house[,1,drop=FALSE],
         p=params,
         color="red",
         add=FALSE,
         addPoints=TRUE,
         pointsColor="black",
         addLr=TRUE,
         lrColor="blue",
         checkArgs=TRUE,
         checkPositiveDefinite=FALSE)

aciobanusebi/s2fa documentation built on Aug. 7, 2021, 6:38 a.m.