Modified the string 'training' to 'testing' on all functions to be consistent with the manuscript