refactorize EM and FP algorithms for rvm classification