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

Skip to content

DOC Fix Matern kernel formula - #34283

Merged
thomasjpfan merged 2 commits into
scikit-learn:mainfrom
yuanx749:gp-doc
Jun 29, 2026
Merged

DOC Fix Matern kernel formula#34283
thomasjpfan merged 2 commits into
scikit-learn:mainfrom
yuanx749:gp-doc

Conversation

@yuanx749

@yuanx749 yuanx749 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

What does this implement/fix? Explain your changes.

Fixes a typo in the Matérn kernel formula for nu=5/2. The quadratic term was missing a square.

This matches the implementation:

elif self.nu == 2.5:
K = dists * math.sqrt(5)
K = (1.0 + K + K**2 / 3.0) * np.exp(-K)

where dists is computed after scaling by length_scale.

@thomasjpfan thomasjpfan 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.

Thank you for the PR @yuanx749 ! LGTM

@thomasjpfan
thomasjpfan merged commit 71616de into scikit-learn:main Jun 29, 2026
38 checks passed
@yuanx749
yuanx749 deleted the gp-doc branch June 29, 2026 15:39
prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
@jeremiedbb jeremiedbb mentioned this pull request Sep 8, 2026
14 tasks
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 9, 2026
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.

2 participants