VClassifier: VClassifier

Usage Arguments Examples

View source: R/VClassifier.R

Usage

1

Arguments

Face

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (Face) 
{
    Dat <- data.matrix(Face)
    cat("Major Feature Description", "\n")
    cat(">>>>>>>>>>>>>>>> 20% finished >>>>>>>>>>>>>>>>>>", "\n")
    M_0 <- prcomp(Dat[, -1])
    Score_1 <- M_0$x[, 1]
    Score_2 <- M_0$x[, 2]
    dev.new()
    plot(Score_1 ~ Score_2, pch = 19, col = as.numeric(Dat[, 
        1] + 1))
    cat("Implement LDA and QDA", "\n")
    cat(">>>>>>>>>>>>>>>> 40% finished >>>>>>>>>>>>>>>>>>", "\n")
    M_1 <- lda(Target ~ ., data = as.data.frame(Dat), CV = TRUE)
    (table(M_1$class, Dat[, 1]))
    (sum(diag(table(M_1$class, Dat[, 1])))/sum(table(M_1$class, 
        Dat[, 1])))
  }

pingqingsheng/Robot0001 documentation built on May 5, 2019, 5:53 p.m.