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

Skip to content

Commit 8734d2f

Browse files
manasimjglemaitre
andauthored
DOC add example to make_ spd_matrix (scikit-learn#28170)
Co-authored-by: Guillaume Lemaitre <[email protected]>
1 parent a94d382 commit 8734d2f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sklearn/datasets/_samples_generator.py

+7
Original file line numberDiff line numberDiff line change
@@ -1603,6 +1603,13 @@ def make_spd_matrix(n_dim, *, random_state=None):
16031603
See Also
16041604
--------
16051605
make_sparse_spd_matrix: Generate a sparse symmetric definite positive matrix.
1606+
1607+
Examples
1608+
--------
1609+
>>> from sklearn.datasets import make_spd_matrix
1610+
>>> make_spd_matrix(n_dim=2, random_state=42)
1611+
array([[2.09..., 0.34...],
1612+
[0.34..., 0.21...]])
16061613
"""
16071614
generator = check_random_state(random_state)
16081615

0 commit comments

Comments
 (0)