classify_com: Functional data classifier via concentration inequalities

Description Usage Arguments Details Value Author(s) References Examples

Description

classif.com trains a covariance operator based functional data classifier that makes use of concentration inequalities. predict.classif.com uses the previously trained classifier to classify new observations.

Usage

1
2
3
4
5
classif.com(datGrp, dat)

## S3 method for class 'classif.com'
predict(object, dat, SOFT = FALSE, LOADING = FALSE,
  ...)

Arguments

datGrp

A vector of group labels.

dat

(n X m) data matrix of n samples of m long vectors.

object

A concentration-of-measure classifier object of class inheriting from classif.com.

SOFT

Boolean flag, which if TRUE, returns soft classification for each observation.

LOADING

Boolean flag, which if TRUE, prints a loading bar.

...

additional arguments affecting the predictions produced.

Details

These functions are used to train a functional data classifier and to predict the labels for a new set of observations. This method classifies based on the distances between each groups' sample covariance operator. A simplified version of Talagrand's concentration inequality is used to achieve this.

If the flag SOFT is set to TRUE, then soft classification occurs. In this case, given k different labels, a k-long probability vector is returned for each observation whose entries correspond to the probabilities that the observed function belongs to each specific label.

Value

classif.com returns a functional data classifier object. predict.classif.com returns a vector of n labels ( or an array of n probability vectors if SOFT=TRUE )

Author(s)

Adam B Kashlak kashlak@ualberta.ca

References

Kashlak, Adam B, John AD Aston, and Richard Nickl (2016). "Inference on covariance operators via concentration inequalities: k-sample tests, classification, and clustering via Rademacher complexities", (in review)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
 library(fds);
 # Setup training data
 dat1 = rbind( 
   t(aa$y[,1:100]), t(ao$y[,1:100]), t(dcl$y[,1:100]), 
   t(iy$y[,1:100]), t(sh$y[,1:100]) 
 );
 # Setup testing data
 dat2 = rbind( 
   t(aa$y[,101:400]), t(ao$y[,101:400]), t(dcl$y[,101:400]), 
   t(iy$y[,101:400]), t(sh$y[,101:400]) 
 );
 
 datgrp = gl(5,100);
 clCom = classif.com( datgrp, dat1 );
 grp = predict( clCom, dat2, LOADING=TRUE );
 acc = c(
   sum( grp[1:300]==1 ), sum( grp[301:600]==2 ), sum( grp[601:900]==3 ), 
   sum( grp[901:1200]==4 ), sum( grp[1201:1500]==5 )
 )/300;
 print(rbind(gl(5,1),signif(acc,3)));

## End(Not run)

fdcov documentation built on May 2, 2019, 4:05 p.m.