fuzzyclust.semisupervised.make_partially_labeled_pair#
- fuzzyclust.semisupervised.make_partially_labeled_pair(n_samples=300, length=8.0, gap=3.0, width=0.3, label_fraction=0.1, random_state=None)[source]#
Two long parallel groups whose natural split disagrees with the classes.
Each class is a Gaussian stretched along the first axis (standard deviation
length/4) and narrow along the second (width); the two classes aregapapart along the second axis. With two clusters and \(m=2\), FCM does not separate the two bars: the variance along the bars is so dominant that the optimum is a tilted boundary that cuts both bars, a compromise between a left/right and a top/bottom split. Labeled samples rotate the partition toward the classes – the more labels, the further – which makes the data set a sensitive probe of partial supervision.- Parameters:
- n_samples
int, default=300 - length
float, default=8.0 Extent of the groups along the first axis (four standard deviations).
- gap
float, default=3.0 Distance between the group centers along the second axis.
- width
float, default=0.3 Standard deviation across the groups.
- label_fraction
float, default=0.1 Share of samples that keep their label in
y_partial.- random_state
int,RandomStateinstanceorNone
- n_samples
- Returns:
Examples using fuzzyclust.semisupervised.make_partially_labeled_pair#
Fuzzy c-means with partial supervision: label fraction and weight
Pairwise constraints: must-link, cannot-link and competitive agglomeration