The performance and efficiency in classifying ECG, EEG and other types of biosignals can also be improved by generating a small set of optimal representative biosignal templates, which restrict the processing space for pattern matching and classification