fuzzyclust.models.membership_1d#

fuzzyclust.models.membership_1d(x, centers, sigmas, shape='trapezoid')[source]#

Evaluate the fuzzy sets of one feature at the values x.

The sets are parameterized by a center \(v\) and a width \(\sigma\) (the parameters of a Gaussian cluster); the shapes are

  • "gaussian": \(A(x)=\exp(-\tfrac12 (x-v)^2/\sigma^2)\);

  • "trapezoid": the trapezoid with corner points \(a=v-3\sigma,\ b=v-0.5\sigma,\ c=v+0.5\sigma,\ d=v+3\sigma\) (Abonyi 2010);

  • "triangle": the triangle with corners \(v-3\sigma,\ v,\ v+3\sigma\).

Returns:
Andarray of shape (len(x), n_sets)