flashxio / FlashR-learn

The machine learning library on top of FlashR. All machine learning algorithms are implemented completely in R. Most of the implementations are ported from other R packages.
2 stars 1 forks source link

Port MASS LDA #7

Closed zheng-da closed 7 years ago

zheng-da commented 7 years ago

test code

library(FlashR)
source("/home/zhengda/FlashR-learn/R/lda.R")
x <- fm.runif.matrix(1000000, 200)
grouping <- fm.as.factor(fm.runif(1000000) * 10)
fm.set.test.na(FALSE)
object <- lda.default(x, grouping)
newdata <- fm.runif.matrix(100000, 200)
res <- predict.lda(object, newdata)