Add random state to MapieQuantileRegressor
constructor
#424
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Allow users to pass
random_state
inMapieQuantileRegressor
constructor.When calling
fit()
, the following logic is applied:random_state
was set for this instance, and no random_state is passed in the function call, use the random state set in the constructorrandom_state
is provided neither in fit nor constructor, norandom_state
is usedrandom_state
is provided in both fit, and constructor, therandom_state
from fit is usedMy reasoning is that the
random_state
provided infit
will overwrite the one previously provided. This doesn't feel super intuitive to me (maybe the random state should not be passable now duringfit
to not have random state mismatches?), but I think it is better compared to the alternativeFixes #405
Type of change
How Has This Been Tested?
fit()
, mimicking the desired behaviorChecklist
make lint
make type-check
make tests
make coverage
make doc