Declare classification_result only at the beginning of a cycle