Am working on a binary classification with 1000 rows and 28 columns.

I would wish to use an Auto-ML solution to try out different combinations of hyperparameters etc but the algo should only be logistic regression.

I don't wish to use other algorithms for the lack of interpretability.

So, I would like my auto-ML solution to stick to logistic regression and try out different values for hyperparameters. Of course, I might use fixed estimators like Decision trees, random forests etc as well

Is there any auto-ML solution that can use fixed estimator?

I read about Tpot, Evalml, AutoML etc but they all try multiple algorithms and finally output the best one (which may not be logistic regression). How can I restrict my auto-ML solution to only use logistic regression?

  • 1
    $\begingroup$ With logistic regression, I believe you will find much better model performance changes with feature engineering rather than hyperparameter searching based on things like penalty. Transforming features, finding interactions, etc. $\endgroup$
    – Craig
    Jan 31, 2022 at 18:14

2 Answers 2


You do not need an automatic machine learning (Auto-ML) solution to find the best hyperparameters for logistic regression. You can use grid search or random search.

  • $\begingroup$ thanks for the help. upvoted $\endgroup$
    – The Great
    Feb 1, 2022 at 5:29

I found that we can do this using Tpot's config_dict and pass this as input to the classifier function like as shown below

tpot_config = {
    'sklearn.linear_model.LogisticRegression': {
        'penalty': ["l1", "l2"],
        'C': [1e-4, 1e-3, 1e-2, 1e-1, 0.5, 1., 5., 10., 15., 20., 25.],
        'dual': [True, False]

tpot = TPOTClassifier(max_time_mins=10,verbosity=2,
tpot.fit(ord_train_t, y_train)

This will ensure that TPOT searches best pipeline based on the configs provided by the config_dict.

However, if there are any other ML tool, I am interested to know from others here as well


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.