Correct some error in learning.cpp and add skeleton for the classification part