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

Removed incorrect parameter passed to pipeline classes in _add_baseline_pipelines #941

Merged
merged 7 commits into from
Jul 17, 2020

Conversation

angela97lin
Copy link
Contributor

Closes #935

@angela97lin angela97lin self-assigned this Jul 16, 2020
@codecov
Copy link

codecov bot commented Jul 16, 2020

Codecov Report

Merging #941 into main will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #941      +/-   ##
==========================================
+ Coverage   99.86%   99.87%   +0.01%     
==========================================
  Files         170      170              
  Lines        8645     8640       -5     
==========================================
- Hits         8633     8629       -4     
+ Misses         12       11       -1     
Impacted Files Coverage Δ
evalml/automl/automl_search.py 99.53% <100.00%> (+0.22%) ⬆️
evalml/tests/automl_tests/test_automl.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9db83f...c2100f2. Read the comment docs.

@angela97lin angela97lin added this to the July 2020 milestone Jul 17, 2020
@angela97lin angela97lin marked this pull request as ready for review July 17, 2020 15:45
Comment on lines 455 to 461
strategy_dict = {"strategy": "mode"}
baseline = ModeBaselineBinaryPipeline(parameters={"Baseline Classifier": strategy_dict})
elif self.problem_type == ProblemTypes.MULTICLASS:
strategy_dict = {"strategy": "random_weighted"}
strategy_dict = {"strategy": "mode"}
baseline = ModeBaselineMulticlassPipeline(parameters={"Baseline Classifier": strategy_dict})
elif self.problem_type == ProblemTypes.REGRESSION:
strategy_dict = {"strategy": "mean"}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to go with the classes we made and update the strategy dictionary. Alternative could be to create RandomWeightedBaselineBinaryPipeline etc 🤷

Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just update the ModeBaselineBinaryPipeline class definition with the right hyperparameters:

class ModeBaselineBinaryPipeline(BinaryClassificationPipeline):
    """Mode Baseline Pipeline for binary classification."""
    custom_name = "Mode Baseline Binary Classification Pipeline"
    component_graph = ["Baseline Classifier"]
    custom_hyperparameters = {
        "Baseline Classifier": {"strategy": ["mode"]}
        }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@freddyaboulton That's actually the definition of ModeBaselineBinaryPipeline right now! As to why we were using strategy_dict then... I'm going to have to refresh my memory 😂 . We could simply delete this and pass in no parameters, will circle back!

Copy link
Contributor

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

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

@angela97lin This looks good to me. I have one question on the implementation but it's minor/non-blocking!

Comment on lines 455 to 461
strategy_dict = {"strategy": "mode"}
baseline = ModeBaselineBinaryPipeline(parameters={"Baseline Classifier": strategy_dict})
elif self.problem_type == ProblemTypes.MULTICLASS:
strategy_dict = {"strategy": "random_weighted"}
strategy_dict = {"strategy": "mode"}
baseline = ModeBaselineMulticlassPipeline(parameters={"Baseline Classifier": strategy_dict})
elif self.problem_type == ProblemTypes.REGRESSION:
strategy_dict = {"strategy": "mean"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just update the ModeBaselineBinaryPipeline class definition with the right hyperparameters:

class ModeBaselineBinaryPipeline(BinaryClassificationPipeline):
    """Mode Baseline Pipeline for binary classification."""
    custom_name = "Mode Baseline Binary Classification Pipeline"
    component_graph = ["Baseline Classifier"]
    custom_hyperparameters = {
        "Baseline Classifier": {"strategy": ["mode"]}
        }

docs/source/release_notes.rst Outdated Show resolved Hide resolved
@angela97lin angela97lin changed the title Clean up pipelines made in _add_baseline_pipelines Removed incorrect parameter passed to pipeline classes in _add_baseline_pipelines Jul 17, 2020
Comment on lines -447 to -448
if num_pipelines == 0:
return True
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated changes, but since we added in baseline pipelines, this will never be true and is not covered by codecov, so removing to pass codecov!

@angela97lin angela97lin merged commit 8147aff into main Jul 17, 2020
@angela97lin angela97lin deleted the 935_rename branch July 17, 2020 19:21
@angela97lin angela97lin mentioned this pull request Jul 31, 2020
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.

Clean up pipelines made in _add_baseline_pipelines
2 participants