Setting the regularization parameter optimally

Open
#254 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python, scikit-learn

Research direction

Start with the SparseLinearDMLCateEstimator configuration shown in the issue, using LassoCV and MultiTaskLassoCV with custom folds and max_iter=100000. Reproduce the alpha convergence warning, then compare the behavior with automatic versus custom cross-validation. Done means the warning has a reproducible diagnosis and the expected configuration or resolution is clearly identified.

Written by the indexing model from the issue text.

Description

Hi and thank you for the improvements!

I am facing the following error, though setting the number of splits optimally according to issue #94. In particular, the warning appearing about alpha is:

Objective did not converge. You might want to increase the number of iterations. Fitting data with very small alpha may cause precision problems. As a consequence of the error, I tried to increase the maximum number of iterations as follows:

from econml.dml import SparseLinearDMLCateEstimator est = SparseLinearDMLCateEstimator(model_y = LassoCV(cv=[(fold00, fold11), (fold11, fold00)]), model_t = MultiTaskLassoCV(cv=[(fold00, fold11), (fold11, fold00)]), n_splits = [(fold0, fold1), (fold1, fold0)], linear_first_stages=False, featurizer=PolynomialFeatures(degree=4, include_bias=False), max_iter=100000)

But still the issue remains. Maybe the cross-validation in first and final stages should be left automatic?

Thank you,

Federico

Dominant language
Jupyter Notebook
Stars
4.8k
Forks
827
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from py-why/EconML

All issues in py-why/EconML

Similar issues

More Machine Learning issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.