faPlot: Plot the resulted FA hyperplane

Description Usage Arguments Examples

View source: R/faPlot.R

Description

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

Usage

1
2
3
faPlot(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
34
35
36
37
38
39
40
41
42
43
44
45
params <- faFit(X_t_unsupervised = house[,2:3,drop=FALSE],
                paramsNULL_nDimZ = 1,
                params=NULL,
                type="fa",
                lambdaRidge=0,
                checkArgs=FALSE,
                checkPositiveDefinite=FALSE,
                epsilon=1e-10,
                maxIterations=100,
                stopType="parameter",
                turboEmMethods=c("em","pem"))
faPlot(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)

params <- faFit(X_t_unsupervised = house[,2,drop=FALSE],
                paramsNULL_nDimZ = 1,
                params=NULL,
                type="fa",
                lambdaRidge=0,
                checkArgs=FALSE,
                checkPositiveDefinite=FALSE,
                epsilon=1e-10,
                maxIterations=100,
                stopType="parameter",
                turboEmMethods=c("em","pem"))
faPlot(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)

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