Flex.Variable (FLex v0.2.2)
View SourceAn interface to create Fuzzy Variables.
Summary
Functions
Turns an antecedent fuzzy variable (input) from a crisp value to a fuzzy value.
Creates a Fuzzy Variable.
Updates a consequent Fuzzy Variable (ANFIS).
Updates an antecedent Fuzzy Variable (ANFIS).
Types
@type t() :: %Flex.Variable{ fuzzy_sets: [Flex.Set.t(), ...], mf_values: %{}, range: any(), rule_output: term(), tag: String.t(), type: :antecedent | :consequent }
Fuzzy Variable struct.
:tag- (string) Defines the linguistic name of the fuzzy variable (e.g., "error").:fuzzy_sets- (list) Defines which all the fuzzy sets related to the variable.:mf_values- (map) The current values of each of the membership functions of the fuzzy sets.:range- (range) The range in which the variable exists.:type- (atom) :antecedent if the variable is an input or consequent for outputs.
Functions
Turns an antecedent fuzzy variable (input) from a crisp value to a fuzzy value.
Creates a Fuzzy Variable.
The following options are require:
:tag- (string) Defines the linguistic name of the fuzzy variable (e.g., "error"),:fuzzy_sets- (list) Defines which type of membership function use the set (e.g., "triangle").:type- (atom) Defines the type of variable (e.g., :antecedent or :consequent),:range- (range) The range in which the variable exists.
Updates a consequent Fuzzy Variable (ANFIS).
Updates an antecedent Fuzzy Variable (ANFIS).