Skip to content

Conversation

@jer2ig
Copy link
Member

@jer2ig jer2ig commented Oct 27, 2025

Addition of logistic partially linear model.

Created PR to check for merging and review changes. Unit tests in work.

@SvenKlaassen SvenKlaassen added the new feature new feature label Nov 11, 2025
@SvenKlaassen SvenKlaassen added this to the Release 0.11.0 milestone Nov 11, 2025
@SvenKlaassen SvenKlaassen linked an issue Nov 11, 2025 that may be closed by this pull request
Copy link
Member

@SvenKlaassen SvenKlaassen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looks already quite great.
Can you further add two test files test_model_defaults.py and test_return_types.py to the plm submodule similar to (https://github.com/DoubleML/doubleml-for-py/blob/main/doubleml/did/tests/test_return_types.py and https://github.com/DoubleML/doubleml-for-py/blob/main/doubleml/did/tests/test_model_defaults.py).

Only add the corresponding tests for DoubleMLLPLR and I can move the tests from the other classes from the tests directory later.

"""
return self._learner

@property
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a good idea to include a more obvious property for the name, but this should be identical to params_names right?
Especially how it is handled in evaluate_learners(). So do we need a extra list?


# nuisance m
if m_external:
m_hat = {"preds": external_predictions["ml_m"], "targets": None, "models": None}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the elements where it is possible can you add the targets to the external predicitons (as in

"targets": _cond_targets(y, cond_sample=(treated == 1)),
). This way one could still use evaluate_learners() with external predicitons (available for all new methods).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added except for ml_t, which is fold specific

def _nuisance_tuning(
self, smpls, param_grids, scoring_methods, n_folds_tune, n_jobs_cv, search_mode, n_iter_randomized_search
):
if self._i_rep is None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Especially since we would like to remove fold-specific hyperparameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Implement Logistic PLR Model

4 participants