resolving bugs in LogisticRegression class