Cosine Similarity-Based Classifiers for Functional Data

  • Tianming Zhu
  • Jin-Ting ZhangEmail author


In many situations, functional observations in a class are also similar in shape. A variety of functional dissimilarity measures have been widely used in many pattern recognition applications. However, they do not take the shape similarity of functional data into account. Cosine similarity is a measure that assesses how related are two patterns by looking at the angle instead of magnitude. Thus, we generalize the concept of cosine similarity between two random vectors to the functional setting. Some of the main characteristics of the functional cosine similarity are shown. Based on it, we define a new semi-distance for functional data, namely, functional cosine distance. Combining it with the centroid and k-nearest neighbors (kNN) classifiers, we propose two cosine similarity-based classifiers. Some theoretical properties of the cosine similarity-based centroid classifier are also studied. The performance of the cosine similarity-based classifiers is compared with some existing centroid and kNN classifiers based on other dissimilarity measures. It turns out that the proposed classifiers for functional data perform well in our simulation study and a real-life data example.


  1. 1.
    Biau, G., Bunea, F., Wegkamp, M.H.: Functional classification in hilbert spaces. IEEE Trans. Inf. Theory 51(6), 2163–2172 (2005). Scholar
  2. 2.
    Delaigle, A., Hall, P.: Defining probability density for a distribution of random functions. Ann. Stat. 38(2), 1171–1193 (2010)MathSciNetCrossRefGoogle Scholar
  3. 3.
    Delaigle, A., Hall, P.: Achieving near perfect classification for functional data. J. R. Stat. Soc.: Ser. B (Statistical Methodology) 74(2), 267–286 (2012)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Epifanio, I.: Shape descriptors for classification of functional data. Technometrics 50(3), 284–294 (2008)MathSciNetCrossRefGoogle Scholar
  5. 5.
    Ferraty, F., Vieu, P.: Nonparametric Functional Data Analysis: Theory and Practice. Springer Series in Statistics. Springer, New York (2006)zbMATHGoogle Scholar
  6. 6.
    Fix, E., Hodges Jr, J.L.: Discriminatory analysis: nonparametric discrimination: consistency properties. US Air Force School of Aviation Medicine. Technical report, vol. 4(3), 477+ (1951)Google Scholar
  7. 7.
    Galeano, P., Joseph, E., Lillo, R.E.: The mahalanobis distance for functional data with applications to classification. Technometrics 57(2), 281–291 (2015)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Glendinning, R.H., Herbert, R.: Shape classification using smooth principal components. Pattern Recogn. Lett. 24(12), 2021–2030 (2003)CrossRefGoogle Scholar
  9. 9.
    Hall, P., Poskitt, D.S., Presnell, B.: A functional datałanalytic approach to signal discrimination. Technometrics 43(1), 1–9 (2001)MathSciNetCrossRefGoogle Scholar
  10. 10.
    Huang, D.S., Zheng, C.H.: Independent component analysis-based penalized discriminant method for tumor classification using gene expression data. Bioinformatics 22(15), 1855–1862 (2006)CrossRefGoogle Scholar
  11. 11.
    James, G.M., Hastie, T.J.: Functional linear discriminant analysis for irregularly sampled curves. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 63(3), 533–550 (2001)MathSciNetCrossRefGoogle Scholar
  12. 12.
    Lavery, B., Joung, G., Nicholls, N.: A historical rainfall data set for Australia. Australian Meteorol. Mag. 46 (1997)Google Scholar
  13. 13.
    Ramsay, J., Ramsay, J., Silverman, B.: Functional Data Analysis. Springer Series in Statistics. Springer, New York (2005)CrossRefGoogle Scholar
  14. 14.
    Ramsay, J.O., Silverman, B.W.: Applied Functional Data Analysis: Methods and Case Studies. Springer Series in Statistics. Springer, New York (2002)CrossRefGoogle Scholar
  15. 15.
    Rossi, F., Villa, N.: Support vector machine for functional data classification. Neurocomputing 69(7), 730–742 (2006)CrossRefGoogle Scholar
  16. 16.
    Sguera, C., Galeano, P., Lillo, R.: Spatial depth-based classification for functional data. Test 23(4), 725–750 (2014)MathSciNetCrossRefGoogle Scholar
  17. 17.
    Song, J.J., Deng, W., Lee, H.J., Kwon, D.: Optimal classification for time-course gene expression data using functional data analysis. Comput. Biol. Chem. 32(6), 426–432 (2008)MathSciNetCrossRefGoogle Scholar
  18. 18.
    Wahba, G.: Spline models for observational data. Soc. Ind. Appl. Math. 59 (1990)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  1. 1.Department of Statistics and Applied ProbabilityNational University of SingaporeSingaporeSingapore

Personalised recommendations