s3faPlot: Plot the resulted S3FA hyperplane

Description Usage Arguments Examples

View source: R/s3faPlot.R

Description

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

Usage

1
2
3
s3faPlot(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 supervised training input

Z_t

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

p

parameters of a fitted S3FA

color

color of the hyperplane given by S3FA

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
46
47
params <- s3faFit(X_t_supervised = house[1:10,2,drop=FALSE],
                  Z_t_supervised = house[1:10,1,drop=FALSE],
                  X_t_unsupervised = house[11:20,2,drop=FALSE],
                  params=NULL,
                  type="fa",
                  lambdaRidge=0,
                  checkArgs=FALSE,
                  checkPositiveDefinite=FALSE,
                  epsilon=1e-10,
                  maxIterations=100,
                  stopType="objfn",
                  turboEmMethods=NULL)
s3faPlot(X_t=house[1:10,2,drop=FALSE],
         Z_t=house[1:10,1,drop=FALSE],
         p=params,
         color="red",
         add=FALSE,
         addPoints=TRUE,
         pointsColor="black",
         addLr=TRUE,
         lrColor="blue",
         checkArgs=TRUE,
         checkPositiveDefinite=FALSE)

params <- s3faFit(X_t_supervised = house[1:10,2:3,drop=FALSE],
                  Z_t_supervised = house[1:10,1,drop=FALSE],
                  X_t_unsupervised = house[11:20,2:3,drop=FALSE],
                  params=NULL,
                  type="fa",
                  lambdaRidge=0,
                  checkArgs=FALSE,
                  checkPositiveDefinite=FALSE,
                  epsilon=1e-10,
                  maxIterations=100,
                  stopType="objfn",
                  turboEmMethods=NULL)
s3faPlot(X_t=house[1:10,2:3,drop=FALSE],
         Z_t=house[1:10,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.