Fixed unsupervised learning
Added command line parameters