Skip to content

Commit

Permalink
update: clustering/MoVM docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
huangziwei committed Feb 7, 2025
1 parent 3a8c5ca commit 48f08c9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pycircstat2/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ class MoVM:
Responsibility matrix (posterior probabilities of clusters for each data point).
labels : np.ndarray
The most probable cluster assignment for each data point.
Examples
--------
import numpy as np
from pycircstat2.clustering import MoVM
np.random.seed(42)
x1 = np.random.vonmises(mu=0, kappa=5, size=100)
x2 = np.random.vonmises(mu=np.pi, kappa=10, size=100)
x = np.concatenate([x1, x2])
np.random.shuffle(x)
movm = MoVM(n_clusters=2, n_iters=200, unit="radian", random_seed=42)
movm.fit(x, verbose=False)
"""

def __init__(
Expand Down

0 comments on commit 48f08c9

Please sign in to comment.