Skip to content
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

fixed issue where the "return_train_score" parameter is not passed #3840

Merged
merged 3 commits into from Dec 9, 2023

Conversation

Nelsaur
Copy link

@Nelsaur Nelsaur commented Dec 5, 2023

Related Issue or bug

The "return_train_score" parameter is not passed correctly

Closes #3839

Describe the changes you've made

I added the return_train_score parameter to a few function calls

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

I've ran the following:

import pycaret
from pycaret.datasets import get_data
from pycaret.regression import *
from pycaret.regression import RegressionExperiment
from pycaret.regression import tune_model

data = get_data('insurance')
s = setup(data, target = 'charges', session_id = 123)
exp = RegressionExperiment()
exp.setup(data, target = 'charges', session_id = 123, use_gpu=True)
new_model = create_model('gbr', return_train_score=True)
tuned_model, all_params = tune_model(estimator=new_model, return_train_score=True, verbose=True, tuner_verbose=True, return_tuner=True)

assert "split0_train_score" in all_params.cv_results_

Describe if there is any unusual behaviour of your code(Write NA if there isn't)

NA

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

Screenshots

Original Updated
image image

@Yard1 Yard1 merged commit a7cc37d into pycaret:master Dec 9, 2023
@Yard1
Copy link
Member

Yard1 commented Dec 9, 2023

Thanks!

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.

[BUG]: return_train_score not passed correctly
2 participants