fuzzyclust.large#
Fuzzy c-means for very large and streaming data.
Fuzzy c-means needs the whole data matrix and the \(N\times c\) partition in memory at every iteration. When \(N\) is in the millions, or when the data arrive as a stream, three schemes of Havens, Bezdek, Leckie, Hall and Palaniswami (2012) make FCM feasible while approximating its result:
WeightedFCM– weighted fuzzy c-means (wFCM), FCM with a weight per sample; the building block of the other two and of the histogram based image segmentation algorithms;RandomSampleFCM– random sample and extend (rseFCM): FCM on a random sample, one membership step for the rest;SinglePassFCM– single-pass FCM (spFCM): chunks are processed in sequence, the weighted prototypes of a chunk are carried into the next one;partial_fit()for streams;OnlineFCM– online FCM (oFCM): every chunk is clustered on its own, the weighted prototypes of all chunks are clustered at the end;extend_partition()– the extension step shared by all three;make_large_blobs(),make_drifting_stream()– data generators;plot_chunk_timeline(),plot_center_trajectories()– matplotlib helpers.
Weighted, random-sample-extension, single-pass and online FCM.
Classes#
|
Weighted fuzzy c-means (wFCM): fuzzy c-means with a weight per sample. |
|
Random sample and extend FCM (rseFCM) for very large data. |
|
Single-pass fuzzy c-means (spFCM) for very large and streaming data. |
|
Online fuzzy c-means (oFCM) for very large and streaming data. |
Functions#
|
Memberships of (many) samples in fixed prototypes (the extension step). |
|
Many samples from a few isotropic Gaussian clusters, in random order. |
|
A stream of chunks whose cluster centers drift from chunk to chunk. |
|
Prototype coordinate against the chunk index for a chunked model. |
|
Trajectories of the prototypes over the chunks on top of (a subsample of) the 2-D data. |