Skip to content

Worked scenarios

Start with installation and the temperature quick start. Then choose the question that matches your application:

  1. Temperature comfort: define a physical universe and read every grade.
  2. Severity labels and abstention: decline a weak classification.
  3. Two sensor criteria: combine grades from different measurements.
  4. Maintenance warning zones: compose sets on the same universe.
  5. Quality alpha cuts: distinguish exact discrete results from samples.
  6. Centroids and numerical accuracy: verify area moments independently.
  7. Scale audit: reveal ties, gaps, and unbalanced partitions.
  8. Custom quality model: use a typed callable and normalize discrete data.
  9. Historical Universal Fuzzy Scale: preserve the five original levels and reconstruct them with the modern API.

Every scenario defines its units or score range, shows intermediate values, and asserts an expected result. Parameters are illustrative expert choices, except for the explicitly frozen historical preset. These examples demonstrate fuzzy calculations, not a validated controller, trained statistical model, or complete rule-based inference engine.

Read the mathematics consistently

For a fuzzy set \(A\), the membership function maps a coordinate to a grade:

\[ \mu_A: U \longrightarrow [0,1]. \]

The universe \(U\) declares allowed coordinates. The positive support contains coordinates with strictly positive membership; it may be much smaller than the universe. Its closure includes limit points. The core has grade one. None of these terms means a probability distribution.

For two grades \(a,b\), a T-norm expresses conjunction and an S-norm expresses disjunction. Minimum/maximum and algebraic policies have different numerical meaning. Choose them deliberately and record that choice with the model.

A weak alpha cut includes grades equal to the threshold. Exact discrete operations inspect every declared coordinate. Continuous sampling reports observations on a stated grid; it cannot prove what happens between points.

The continuous centroid is a ratio of area moments over an explicit finite integration domain. Analytical formulas and adaptive integration have different evidence and failure modes. A centroid is a representative coordinate, not an expected value of a probability distribution unless a separate probabilistic model justifies that interpretation.

See the API reference for signatures, supported families, validation rules, errors, and immutable result fields; the membership gallery for all eight curve families; and figure provenance for rendering and numerical limitations.

Follow the computation paths to choose classification or centroid integration. Compare operator policies, inspect and reconstruct result records, handle errors, or maintain historical integrations. The public example index links every inventoried symbol to executed usage. Open a linked SVG at full size on narrow screens.

The foundational set interpretation follows L. A. Zadeh, “Fuzzy sets” (1965), DOI 10.1016/S0019-9958(65)90241-X. The examples and policy choices here are specific to FuzzyRoutines.