Skip to content

DOC Linked examples for LDA and QDA in their docstrings (#26927) - #28611

Merged
glemaitre merged 5 commits into
scikit-learn:mainfrom
jpienaar-tuks:examples-in-docstrings
Mar 14, 2024
Merged

glemaitre merged 5 commits into
scikit-learn:mainfrom
jpienaar-tuks:examples-in-docstrings

Conversation

@jpienaar-tuks

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Adds links to examples/classification mentioned in #26927

What does this implement/fix? Explain your changes.

Adds links to auto-generated examples for classes LinearDiscriminantAnalysis and QuadraticDiscriminantAnalysis

Any other comments?

Examples linked:

  • examples/classification
    • plot_lda.py
    • plot_lda_qda.py
  • examples/decomposition
    • plot_pca_vs_lda.py

@github-actions

github-actions Bot commented Mar 11, 2024 •

Copy link
Copy Markdown

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: c7888c9. Link to the linter CI: here

Comment thread sklearn/discriminant_analysis.py Outdated
This should be left to None if `covariance_estimator` is used.
Note that shrinkage works only with 'lsqr' and 'eigen' solvers.

For an example usage, see

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
For an example usage, see
For a usage example, see

I'd rewrite this like this

Comment thread sklearn/discriminant_analysis.py Outdated
min(n_classes - 1, n_features). This parameter only affects the
`transform` method.

For an example usage for dimensionality reduction, see

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
For an example usage for dimensionality reduction, see
For a usage example, see

I'd rewrite this like this

@betatim betatim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for helping make the examples easier to find!

Looks good to me, besides the two suggestions I made.

@jpienaar-tuks

Copy link
Copy Markdown
Contributor Author

Thank you for the feedback. I've made the updates.

@glemaitre
glemaitre self-requested a review March 14, 2024 17:40
@glemaitre
glemaitre enabled auto-merge (squash) March 14, 2024 18:07
@glemaitre
glemaitre merged commit 082b588 into scikit-learn:main Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants