Source

Fuzzy C Means#

A distance-based soft clustering algorithm that allows samples to belong to multiple clusters if they fall within a fuzzy region controlled by the fuzz parameter. Like K Means, Fuzzy C Means minimizes the inertia cost function. However, unlike K Means, which trains using mini batches of data, FCM uses a batch solver that requires the entire dataset at each iteration.

Interfaces: Estimator, Learner, Probabilistic, Verbose, Persistable

Data Type Compatibility: Continuous

Parameters#

# Param Default Type Description
1 c int The number of target clusters.
2 fuzz 2.0 float Determines the bandwidth of the fuzzy area.
3 epochs 300 int The maximum number of training rounds to execute.
4 min change 10. float The minimum change in the inertia for the algorithm to continue training.
5 kernel Euclidean object The distance kernel used to compute the distance between sample points.
6 seeder PlusPlus object The seeder used to initialize the cluster centroids.

Additional Methods#

Return the c computed centroids of the training set:

public centroids() : array

Returns the inertia at each epoch from the last round of training:

public steps() : array

Example#

use Rubix\ML\Clusterers\FuzzyCMeans;
use Rubix\ML\Kernels\Distance\Euclidean;
use Rubix\ML\Clusterers\Seeders\Random;

$estimator = new FuzzyCMeans(5, 1.2, 400, 1., new Euclidean(), new Random());

References#

  • J. C. Bezdek et al. (1984). FCM: The Fuzzy C-Means Clustering Algorithm.