# Ways of finding the ideal number of clusters in a corpus

**URL:** <https://discourse.flucoma.org/t/ways-of-finding-the-ideal-number-of-clusters-in-a-corpus/2703>\
**Category:** Getting Started and Wayfinding\
**Created:** [December 14, 2025, 10:19am UTC](https://discourse.flucoma.org/t/ways-of-finding-the-ideal-number-of-clusters-in-a-corpus/2703 "2025-12-14T10:19:34Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)\
**Post date:** [December 21, 2025, 10:47am UTC](https://discourse.flucoma.org/t/ways-of-finding-the-ideal-number-of-clusters-in-a-corpus/2703/8 "2025-12-21T10:47:42Z")

</div>

> [@yogi](#):
>
> Cheers, this sounds like a good way to explore, I wouldn’t have thought of that.

Let me know how that works. Sadly, computing the mean of a cluster its a lot more awkward than it seems. I’m sure this is not the optimal approach, but I remember struggling with this over in this thread, [writing my process here](https://discourse.flucoma.org/t/class-interpolation-distance-to-classes/1903/10).

> [@yogi](#):
>
> I watched most of our videos while learning about Flucoma, great source of inspiration. Also I’m using Pure Data not Max,on linux, each time I want to learn about use with percussive material I look into your sp-tools for pd! Very instructive, I wish you implemented all sp/dk tools in Pd, I have a tiny laptop with Windows on it so I can check Max patches, on a tiny screen though.

I plan on adapting more, I just struggle when it comes to some of the sound generating things (e.g. polyphonic sample playback) in pd.

For `dk.corpusclustermatch` it’s fairly straightforward. The only fussy bits of the patch is the sorting of the clusters by different criteria. Independent of that, it’s just vanilla clustering from FluComa stuff, then selecting a random item from each cluster.

---

_[View the full topic](https://discourse.flucoma.org/t/ways-of-finding-the-ideal-number-of-clusters-in-a-corpus/2703)._
