Automatic classification of functional data with extremal information