Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ All notable changes to this project are documented here. The format follows

## [Unreleased]

### Fixed

- `SLearnerTuner` is now importable from `multilift.uplift`, matching `TLearnerTuner`.

## [0.1.0] - Unreleased

Initial open-source release.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Open a GitHub issue with:
This project uses [Poetry](https://python-poetry.org/).

```shell
git clone https://github.com/<org>/multilift.git
git clone https://github.com/intuit/multilift.git
cd multilift
make setup # poetry lock && poetry install --all-groups
poetry run pre-commit install # optional, runs the linters on commit
Expand Down
2 changes: 1 addition & 1 deletion docs/api/uplift.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ TLearnerTuner
SLearnerTuner
-------------

.. autoclass:: multilift.uplift.tuner.SLearnerTuner
.. autoclass:: multilift.uplift.SLearnerTuner
:members:
:show-inheritance:

Expand Down
3 changes: 2 additions & 1 deletion multilift/uplift/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
from multilift.uplift.classifier import UpliftClassifierPipeline
from multilift.uplift.eval import compute_best_uplift, compute_qini, compute_qini_auc
from multilift.uplift.regressor import UpliftRegressorPipeline
from multilift.uplift.tuner import TLearnerTuner, TunerResult
from multilift.uplift.tuner import SLearnerTuner, TLearnerTuner, TunerResult

__all__ = [
"SLearnerTuner",
"TLearnerTuner",
"TunerResult",
"UpliftClassifierPipeline",
Expand Down
9 changes: 9 additions & 0 deletions tests/uplift/test_uplift_tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,3 +1060,12 @@ def test_top_decile_scorer_returns_float(self, sample_data):
)

assert isinstance(score, float)


class TestPublicExports:
@pytest.mark.parametrize("tuner_cls", [SLearnerTuner, TLearnerTuner, TunerResult])
def test_tuner_classes_exported_from_uplift(self, tuner_cls):
import multilift.uplift

assert getattr(multilift.uplift, tuner_cls.__name__) is tuner_cls
assert tuner_cls.__name__ in multilift.uplift.__all__
Loading