def test_logistic_regression(): """Ensure that the TPOT logistic regression classifier outputs the same as the sklearn LogisticRegression""" tpot_obj = TPOT() result = tpot_obj._logistic_regression(training_testing_data, 5., 0, True) result = result[result['group'] == 'testing'] lrc = LogisticRegression(C=5., penalty='l1', dual=False, random_state=42) lrc.fit(training_features, training_classes) assert np.array_equal(result['guess'].values, lrc.predict(testing_features))