Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@souravsingh
Copy link
Contributor

Reference Issues/PRs

Fixes #14258

What does this implement/fix? Explain your changes.

Adds return_X_y parameter to the 20_newsgroups method

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Please add a test in sklearn/datasets/tests/test_20news.py using check_return_X_y.

@qinhanmin2014
Copy link
Member

please either leave the issue open or add this option to fetch_olivetti_faces.

souravsingh and others added 3 commits July 9, 2019 15:46
@thomasjpfan thomasjpfan changed the title Add return_X_y to 20_newsgroups Add return_X_y to 20_newsgroups and olivetti_faces Jul 9, 2019
Copy link
Member

@jnothman jnothman left a comment

Choose a reason for hiding this comment

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

Please add simple test cases to ensure line coverage. If there are examples that use these fetch findings and only use data and target from them, please consider using this parameter in those examines. Thanks

Copy link
Member

@qinhanmin2014 qinhanmin2014 left a comment

Choose a reason for hiding this comment

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

you also need to update the Returns section
please add some tests

@glemaitre glemaitre self-assigned this Jul 19, 2019
@glemaitre
Copy link
Member

I pushed a couple of changes needed. We need to check the rendering of the documentation before merging.

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

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

Thanks! Fetchers in the following files could also be changes,

  • examples/model_selection/grid_search_text_feature_extraction.py
  • examples/text/plot_document_clustering.py
  • examples/text/plot_document_classification_20newsgroups.py
  • examples/text/plot_hashing_vs_dict_vectorizer.py
  • examples/bicluster/plot_bicluster_newsgroups.py
  • examples/linear_model/plot_sparse_logistic_regression_20newsgroups.py
  • examples/applications/plot_model_complexity_influence.py
  • examples/plot_johnson_lindenstrauss_bound.py
  • examples/ensemble/plot_forest_importances_faces.py
  • examples/cluster/plot_dict_face_patches.py
    (but as you want, I'm fine with the current version as well)

@glemaitre
Copy link
Member

Thanks! Fetchers in the following files could also be changes,

I checked them and we are using target_names or other keys from the bunch and therefore we shall let the example as they are.

@glemaitre
Copy link
Member

Thought I might have forgotten some. I will double-check.

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

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

I checked them and we are using target_names or other keys from the bunch and therefore we shall let the example as they are.

Fair enough. I don't think it's very critical anyway, having some examples using Bunch is also useful.

@glemaitre
Copy link
Member

I pushed the 2 missing occurrences

@glemaitre
Copy link
Member

codecov is failing because we are not downloading the dataset on the CI. However, the tests are passing locally.

@glemaitre
Copy link
Member

and the example are built

@glemaitre
Copy link
Member

I just fixed the documentation rendering. It is good to be merged.

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Minor nits

Copy link
Member

@qinhanmin2014 qinhanmin2014 left a comment

Choose a reason for hiding this comment

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

Whats new missing

@qinhanmin2014 qinhanmin2014 merged commit f8e4cc4 into scikit-learn:master Jul 20, 2019
@qinhanmin2014
Copy link
Member

thanks @souravsingh

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.

return_X_y should be available on fetch_20newsgroups and fetch_olivetti_faces

6 participants