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.

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.

@jer2ig jer2ig marked this pull request as ready for review November 14, 2025 03:58
@jer2ig
Copy link
Member Author

jer2ig commented Nov 14, 2025

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.

I've added them. I had to change the check function a little bit.

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. I added skips for the docstring tests and evaluate_learners() to the tests (this needed some update to skip evaluation if targets are not available (for ml_t).

Could you add in comments in the _nuisance_tuning if some approximations are done to allow simple on fold tuning?
Else i only had one other single comment.

res["preds"][smpls_single_split[1]] += model.predict_proba(x[smpls_single_split[1]])[:, 1]
else:
res["preds"][smpls_single_split[1]] += model.predict(x[smpls_single_split[1]])
res["preds"] /= len(smpls)
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this ?

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