fuzzyclust.extensions.make_collinear_segments#

fuzzyclust.extensions.make_collinear_segments(n_samples_per_segment=60, length=3.0, gap=3.0, noise=0.1, extra_line=True, random_state=None)[source]#

Two collinear segments separated by a gap, optionally with a third, oblique segment.

A line prototype has no extent, so pure fuzzy c-lines cannot tell two collinear segments apart: both lie on the same line. The fuzzy c-elliptotypes compromise, which adds a share of the point distance, separates them by their position. The optional third segment makes the problem a genuine three-cluster one.

Parameters:
n_samples_per_segmentint, default=60
lengthfloat, default=3.0

Length of each collinear segment (on the x-axis).

gapfloat, default=3.0

Gap between the two collinear segments.

noisefloat, default=0.1

Orthogonal scatter around the segments.

extra_linebool, default=True

Add an oblique segment above the gap (label 2).

random_stateint, RandomState instance or None
Returns:
Xndarray of shape (n_samples, 2)
yndarray of shape (n_samples,)

Examples using fuzzyclust.extensions.make_collinear_segments#

Fuzzy c-varieties: lines as prototypes, and the elliptotype compromise

Fuzzy c-varieties: lines as prototypes, and the elliptotype compromise