Could you change things to be consistent with Shogun style here?

memer variables have a m_ prefix and avoid these ugly underscores in the parameters of the methods.
m_method=method;
m_thresh=thresh; etc