protected function membership(array $sample) : array
    {
        $membership = $deltas = [];

        foreach ($this->centroids as $centroid) {
            $deltas[] = $this->kernel->compute($sample, $centroid);
        }

        foreach ($this->centroids as $cluster => $centroid) {
            $alpha = $this->kernel->compute($sample, $centroid);

            $sigma = 0.;

            foreach ($deltas as $delta) {
                $sigma += ($alpha / ($delta ?: EPSILON)) ** $this->lambda;
            }

            $membership[$cluster] = 1. / ($sigma ?: EPSILON);
        }

        return $membership;
    }