fuzzyclust.collaborative.make_collaborative_sites#
- fuzzyclust.collaborative.make_collaborative_sites(n_clusters=3, n_samples_per_cluster=100, n_sites=2, n_features_per_site=2, spreads=(0.6, 1.3), box=8.0, swap_fraction=0.0, random_state=None)[source]#
The same objects described at several data sites by different features.
Every object belongs to one of
n_clustersgroups. Site \(p\) observes its ownn_features_per_siteGaussian features around site-specific group centers with a site-specific spread, so the same group structure is seen clearly at a site with a small spread and blurred at a site with a large one. Withswap_fraction > 0a share of the objects is moved to another group at the last site only, which gives the sites a genuine disagreement about those objects.- Parameters:
- n_clusters
int, default=3 - n_samples_per_cluster
int, default=100 - n_sites
int, default=2 - n_features_per_site
intor sequenceofint, default=2 - spreadssequence
offloat, default=(0.6, 1.3) Standard deviation of the groups at every site (cycled if shorter than
n_sites).- box
float, default=8.0 Side of the cube the group centers are drawn from (every site has its own centers).
- swap_fraction
float, default=0.0 Share of the objects whose group is changed at the last site.
- random_state
int,RandomStateinstanceorNone
- n_clusters
- Returns:
Examples
>>> from fuzzyclust.collaborative import make_collaborative_sites >>> Xs, y = make_collaborative_sites(n_sites=3, n_features_per_site=(2, 3, 2), random_state=0) >>> [X.shape for X in Xs] [(300, 2), (300, 3), (300, 2)]
Examples using fuzzyclust.collaborative.make_collaborative_sites#
Collaborative fuzzy clustering across three data sites