Department of Mathematical Sciences Multinomial functional regression with application to lameness detection for horses Helle Sørensen (helle@math.ku.dk) Joint with Seyed Nourollah Mousavi user! 2015, Ålborg
Background and aim for case study Data collected by veterinarian Maj Halling Thomsen and her colleaugues at University of Copenhagen. Problem: Difficult to detect lameness and identify the injured limb, especially for low-degree lameness Visual inspection and clinical examination is highly subjective Large variability in assessments from different veterinarians, and also between repeated assessments from the same vet Aim: Develop an objective method for lameness detection Slide 2/16
Detection of lameness: The movie Slide 3/16
85 data signals (after preprocessing) Acceleration 1 0 1 2 LF 1 0 1 2 RF 1 0 1 2 NO Acceleration 1 0 1 2 LH 1 0 1 2 RH 1 0 1 2 LF LH NO RF RH Each curve: Average vertical acceleration for one gait cycle First half: Stance on right-fore/left-hind diagonal Slide 4/16
Problem and approach Classification for functional data: Given a data signal, which group does it belong to? Our approach: Functional multinomial regression using wavelets and LASSO Idea: wavelets offer precise approximations with sparse representations; use LASSO to induce sparseness Extension of the work by Zhao, Ogden, Reiss (2012) Slide 5/16
Multinomial functional regression (MFR) Data: Covariate functions x i (t), categorical outcomes y i M Regression model Linear predictor for group m: η m (x) = α m + β m (t)x(t)dt Conditional probabilities: eη m(x) p m (x) = P(Y = m X = x) = l M e η l (x) Unknowns: Intercepts α m and coefficient functions β m (t) Classification of new curve, x 0 : Compute ˆη m (x 0 ) and ˆp m (x 0 ) for all groups, and assign x 0 to group with largest probability Slide 6/16
Estimation and computations Estimation approach Expand functions x i in a wavelet basis Use wavelet coefficients as covariates in ordinary multinomial regression with LASSO penalization Translate estimated regression coef s to coef. functions ˆβ m Tuning parameters are selected with cross validation: resolution level j 0 in wavelet basis and penalty parameter λ Computations fda package for preprocessing wavethresh package for wavelet computations glmnet package for penalized multinomial regression Slide 7/16
Cross validation results Mean cross validated deviance Left fore CVM 1.0 1.2 1.4 1.6 1.8 2.0 2.2 2.4 j 0 =0 j 0 =1 j 0 =2 j 0 =3 j 0 =4 j 0 =5 j 0 =6 j 0 =7 0.5 0.0 0.5 j 0 =0 j 0 =1 j 0 =2 j 0 =3 j 0 =4 8 7 6 5 4 3 log(lambda) 0.0 0.2 0.4 Tim Slide 8/16
Estimated coefficient functions: ˆβ m ˆβ no Left fore normal Right fore normal 0.5 0.0 0.5 1.0 0.5 0.0 0.5 1.0 Left hind normal Right hind normal 0.5 0.0 0.5 1.0 0.5 0.0 0.5 1.0 Slide 9/16
... and 100 bootstrap samples Left fore normal Right fore normal 0.5 0.0 0.5 1.0 0.5 0.0 0.5 1.0 Left hind normal Right hind normal 0.5 0.0 0.5 1.0 0.5 0.0 0.5 1.0 Slide 10/16
Classification results Leave-one-out classification: Predicted group True group LF LH NO RF RH LF 13 0 2 0 1 LH 1 12 2 1 0 NO 1 1 19 1 1 RF 0 2 1 13 0 RH 1 0 2 0 11 68 curves classified to correct group (80%); five more curves to correct diagonal; only one curve to wrong diagonal PC-LDA and method by Ferraty+Vieu (2003): 65% correct Simulation study with similar data: 89% correct classifications Slide 11/16
Discussion Estimated ˆβ m s satisfy, to some extend, natural symmetry restrictions. Possible to build in those restrictions explicitly. MFR performs at least as well as the other methods we have tested also in application from speech recognition Many possible variations which we didn t pursue Data come from only eight horses! Calls for random effect of horse at least for inference about coefficient functions. Thank you for your attention Questions and comments are most welcome: helle@math.ku.dk Slide 12/16
References Mousavi, S. N., and Sørensen, H. (2015). Multinomial functional regression with wavelets and LASSO penalization. Submitted. Zhao, Y., Ogden, R. T., and Reiss, P. T. (2012). Wavelet-based LASSO in functional linear regression. Journal of Computational and Graphical Statistics, 21:600 617. Friedman, J., Hastie, T., and Tibshirani, R. (2010). Regularization paths for generalized linear models via coordinate descent. Journal of statistical software, 33(1):1. Ferraty, F. and Vieu, P. (2003). Curves discrimination: a nonparametric functional approach. Computational Statistics & Data Analysis, 44:161 173. Slide 13/16
Simulation results Color Legend Test Data Twins Test Data 60 n=(20,20,20,20,20) n=(40,40,40,40,40) Misclassificaton rate(%) 40 20 0 Dense Dense+Small noise Dense+Large noise Sparse Sparse+Small noise Sparse+Large noise Dense Dense+Small noise Dense+Large noise Sparse Sparse+Small noise Sparse+Large noise Slide 14/16
Probabilities for classification Correct group Correct diagonal, wrong group Remaining True status LF LH NO RF RH 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Maximum probability Slide 15/16
Estimated coefficient functions with symmetry restrictions Estimated deviation from NO group Estimated deviation from NO group 0.6 0.4 0.2 0.0 0.2 0.4 0.6 0.8 LF LH RF RH 0.6 0.4 0.2 0.0 0.2 0.4 0.6 0.8 LF LH RF RH Slide 16/16