Description Usage Arguments Author(s) Examples
Trains a m-class classifer from dataset trainingdata
uses a trained classifier to predict classes
uses a trained classifier to predict classes and displayes random images with predictions on screeen with a delay
| 1 2 3 4 5 | 
| trainingdata | numeric matrix with training data | 
| y | classes corresponding to the rows of trainingdata | 
| lambda | regularization coefficient | 
| Data | numeric matrix with data to classify | 
| Theta | a previously trained classifier | 
| Data | numeric matrix with data to classify | 
| Theta | a previously trained classifier | 
| maxit | maximum number of random displayes | 
| y | True classes used in training | 
Marco D. Visser
Marco D. Visser
Marco D. Visser
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(digits)
X<-digits[[1]]
y<-digits[[2]]
trained<-mClass(X,y)
data(digits)
X<-digits[[1]]
y<-digits[[2]]
trained<-mClass(X,y)
pred<-mPred(X,trained)
image1200<-t(as.array(X[1200,]))
pred1200<-mPred(image1200,trained)
## force correct rotation of matrix image
f <- function(m) t(m)[,nrow(m):1]
image(f(matrix(X[1200,]),ncol=20,nrow=20),main=pred1200)
data(digits)
X<-digits[[1]]
y<-digits[[2]]
trained<-mClass(X,y)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.