overloaded end statement to support more flexible indexing
support for pattern info decoding, permutation and bootstrapping on runs
function for crossvalidating discriminants, permutation testing, bootstrapping