Some refactoring. New Machine Learning module. Logistic Regression NIF