https://github.com/karatsang/rulesbased_logisticregression