Introduction

This funtion implements the methodology described in the paper

  • Lee, H. and Patrangenaru, V. (2020). Extrinsic Kernel Ridge Regression Classifier for Planar Kendall Shape Space [Arxiv] [Github]

Model

  • Class specific regression model : \[\Phi(\mathbf{u}) = \mathbf{\Phi_{(i)}} \mathbf{\beta}_{(i)} + \mathbf{\varepsilon}\]
  • Estimating \(\beta\) : \[\begin{align*} \hat{\beta}_{(i)} & = {\rm argmin}_{\beta_{(i)}} ||\Phi(\mathbf{u}) - \mathbf{\Phi}_{(i)}\mathbf{\beta}_{(i)}||^2_2 + \lambda || \mathbf{\beta}_{(i)}||^2_2 \\ & = \left( \mathbf{\Phi}_{(i)}^\top \mathbf{\Phi}_{(i)} + \lambda I\right)^{-1}\mathbf{\Phi}_{(i)}^\top\Phi(\mathbf{u})\\ & = \left(\mathbf{K}_{(i)} + \lambda I\right)^{-1}\mathbf{k}_{(i)} \end{align*}\]
  • Estimating the label : \[\begin{align*} \hat{\mathbf{y}}_{\mathbf{u}} & = {\rm argmin}_{i=\{1,\cdots,C\}} || \hat{\Phi}_{(i)}(\mathbf{u}) - \Phi(\mathbf{u}) ||_2^2\\ & = {\rm argmin}_{i=\{1,\cdots,C\}} \mathbf{k}_{(i)}(\mathbf{u})^\top \left( \mathbf{K}_{(i)} + \lambda I \right)^{-1} \left( -\mathbf{K}_{(i)} -2 \lambda I \right)\left( \mathbf{K}_{(i)} + \lambda I \right)^{-1}\mathbf{k}_{(i)}(\mathbf{u}) \end{align*}\]

Usage

KRRC_VWG is the primary function that implements the kernel ridge regression classifier equipped with the veronese whitney gaussian kernel :

\[\kappa([\mathbf{z}_i],[\mathbf{z}_j]) = \exp\left(-\frac{\rho_E^2\left([\mathbf{z}_i]-[\mathbf{z}_j]\right)}{\sigma^2} \right)\]

VWG <- KRRC_VWG(Sub_sample, Test, Test_Label,Sig,Lambda)
  • Inputs
    • Sub_sample : Data for building subspaces
    • Test : Test data (Embedded shpae : array)
    • Test_Label : Test label (vector)
    • Sig : Tuning parameter for kernel
    • Lambda : Tuning parameter for Ridge Reg term

Simulation

Data

The PassifloraLeaves data used in this simulation is collected by the following papers

  1. Chitwood, D. H. and Otoni, W. C. (2016). Morphometric analysis of passiflora leaves: therelationship between landmarks of the vasculature and elliptical fourier descriptors of theblade.GigaScience, 6:1-13.

  2. Chitwood, D. H. and Otoni, W. C. (2017). Divergent leaf shapes among passiflora speciesarise from a shared juvenile morphology.Plant Direct, 1:1-15.

The data is available from their github

The below is the graphical illustration of the dataset. The transparent and bold solid lines depicts the connected landmarks and extrinsic means, respectively.

main <- grid.arrange(grobs=myplots, ncol=4)

Competing methods

  1. VWG : KRRC with Veronese-Whitney Gaussian kernel
  2. SVM : Kernelized Support Vector Machine with Gaussian kernel implemented in the \(\texttt{e1071}\) package
  3. KFA : Kernel Fisher Discriminant Analysis implemented in the \(\texttt{kfda}\) package
  4. RIE : KRRC with Riemannian Gaussian kernel
  5. RRC : The usual Ridge Reg Classifier
  6. GLM : Multiclass Generalized Linear Model with ridge penalty implemented in the \(\texttt{glmnet}\) package

Results

  • The bolow plot illustrates the result of the simulation in terms of \(F_1\) measure.
ggplot(All_result1 , aes(x=Methods, y=F_1, fill=Methods))+ facet_grid(. ~ size, labeller = label_parsed) + 
geom_boxplot(lwd=0.2,position=position_dodge(1)) +ylab(expression(F[1]))

  • Results in terms of Precision, Recall, Average accuracy are given below.
ggplot(All_result1 , aes(x=N_sub, y=Value, color=Methods))+ 
#  facet_grid(. ~ size, labeller = label_parsed, sacles="free") + 
    geom_line(aes(linetype=Methods))+
    geom_point(aes(shape=Methods),size=1)+
    facet_wrap(~ facet, scales ="free",labeller = label_parsed)+
    ylab("")+
    xlab(expression(paste("Subspace size"~(n[i]))))+
    theme(
          legend.title = element_text(size = 20),
          legend.text = element_text(size = 20),
          legend.key.size = unit(5, "lines")
    )+
    theme_bw()+
    theme(panel.border = element_rect(size=0.01, colour = "black"),
          strip.background = element_rect(size=0.01))