Skip to main content
← Lab

gaussgrad

confirmedupstream bugPython · scikit-fuzzySystems & data structuresJuly 25, 2026

the question

Does scikit-fuzzy's partial_dmf return the correct gradient of its own gaussmf membership function?

what came out

scikit-fuzzy's partial_dmf differentiates exp(-(x-mean)^2/sigma^2) but gaussmf uses a 2*sigma^2 width, so the returned Gaussian gradient is wrong by a point-dependent ratio (1.36, 0.65, 1.41) that no rescaling fixes. The sibling sigmf branch matches its finite difference, isolating the fault.

method & receipts

  • Result: confirmed
  • Reproducible one script re-runs the whole thing from scratch.
  • Tested — a correctness/benchmark suite ships alongside the code.

→ read the code and re-run it

github.com/v-code01/gaussgrad