Add weights in gamma and kappa
Add nuBar param
Allow test set in learnModel