@thi.ng/fuzzy
Version:
Fuzzy logic operators & configurable rule inferencing engine
29 lines • 1.46 kB
TypeScript
import type { LVarSet, Rule } from "./api.js";
/**
* Takes an object of input {@link variable}s, an object of output variable,
* rule array and an object of input values. Evaluates relevant terms of input
* variables in all matching rules, then combines and defuzzes them using given
* optional strategy (by default {@link centroidStrategy} w/ its own default
* options). Returns object of computed output variable values.
*
* @remarks
* The `imply` T-norm (default: {@link tnormMin} is used to transform each
* rule's output set(s) using each rule's computed/aggregated truth value, as
* well as each rule's weight. Different T-norms might produce different fuzzy
* set shapes and different results, even if the defuzz strategy remains
* constant.
*
* The `combine` S-norm (default: {@link snormMax}) is used to combine the
* relevant output sets of all rules for integration/analysis by the given
* defuzz `strategy` actually producing the crisp result.
*
* @param ins -
* @param outs -
* @param rules -
* @param vals -
* @param strategy -
* @param imply -
* @param combine -
*/
export declare const defuzz: <I extends LVarSet<string>, O extends LVarSet<string>>(ins: I, outs: O, rules: Rule<I, O>[], vals: Partial<Record<keyof I, number>>, strategy?: import("./api.js").DefuzzStrategy, imply?: import("@thi.ng/api").FnN2, combine?: import("@thi.ng/api").FnN2) => Partial<Record<keyof O, number>>;
//# sourceMappingURL=defuzz.d.ts.map