Skip to content

[MRG] Add checks for bounds argument #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

wdevazelhes
Copy link
Member

Fixes #161

This PR checks that when filling the bounds argument in ITML, we use any array-like of two elements
And it adds to the doc that the subsequent bounds_ attribute will be a numpy.ndarray

Question: do we want to ensure that it's actually a 1D array ? For now I only check that is has size 2...

@@ -192,7 +196,7 @@ def fit(self, pairs, y, bounds=None, calibration_params=None):
calibration_params = (calibration_params if calibration_params is not
None else dict())
self._validate_calibration_params(**calibration_params)
self._fit(pairs, y)
self._fit(pairs, y, bounds=bounds)
Copy link
Member Author

Choose a reason for hiding this comment

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

This was missing before, but the new tests in this PR made it pop up that it's needed to transmit the bounds argument, otherwise no matter what it will be default (None)

Copy link
Contributor

@perimosocordiae perimosocordiae left a comment

Choose a reason for hiding this comment

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

Good catch on the bug!

@wdevazelhes wdevazelhes requested a review from bellet May 22, 2019 13:29
Copy link
Member

@bellet bellet left a comment

Choose a reason for hiding this comment

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

LGTM, let's merge

@bellet bellet merged commit f407bac into scikit-learn-contrib:master May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve bounds argument and bounds_ attribute in ITML
3 participants