Skip to content

Commit

Permalink
Fix make_archetypal_dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
aleixalcacer committed Nov 21, 2023
1 parent e533260 commit ecdfabd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion archetypes/datasets/make_archetypal_dataset.py
Expand Up @@ -67,7 +67,11 @@ def make_archetypal_dataset(
else:
alpha_i = [alpha] * A_i.shape[1]
alpha_i[l_i] = 1
A_i[i, :] = generator.dirichlet(alpha_i)
d_i = -1
while d_i != l_i:
d = generator.dirichlet(alpha_i)
d_i = np.argmax(d)
A_i[i, :] = d

X = einsum(A, archetypes)

Expand Down

0 comments on commit ecdfabd

Please sign in to comment.