## Type-1 Fuzzy Variable

##### March 8, 2020
type2_fuzzy type2_fuzzy_library fuzzy python

The Type1FuzzyVariable class in the library is a way to define and use linguistic variables.

By a linguistic variable we mean a variable whose values are words or sentences in a natural or artificial language. For example, Age is a linguistic variable if its values are linguistic rather than numerical, i.e.,young, not young, very young, quite young, old, not very old and not very young, etc., rather than 20, 21,22, 23 (Zadeh, Lotfi Asker. “The concept of a linguistic variable and its application to approximate reasoning.” Learning systems and intelligent robots. Springer, Boston, MA, 1974. 1-10.)

This concept can be expressed programmatically using the following:

from type2fuzzy import Type1FuzzyVariable

# adding an age linguistic variable
var = Type1FuzzyVariable(0, 100, 100)

# visualize sets
var.plot_variable()


The above code snippet will create the variable and sets and will produce the following image: It is also very useful to have the ability to generate a number of fuzzy sets automatically in a linguistic variable, as this technique is sometimes used in ML applications. The function generate_sets takes a parameter n so that

$number_of_sets = (2\times n) + 1$


The following code shows how the generation function can be used to generate 7 sets:

from type2fuzzy import Type1FuzzyVariable

# adding an age linguistic variable
var = Type1FuzzyVariable(0, 100, 100)

# generate (2*3)+1 = 7 sets
var.generate_sets(3)

var.plot_variable()


The following is obtained: #### Type2Fuzzy Library Implementation: Mendel, Jerry M., and RI Bob John. 'Type-2 fuzzy sets made simple.'

##### October 27, 2021
type2_fuzzy type2_fuzzy_library fuzzy python

#### Introduction to type-2 fuzzy sets

##### October 15, 2021
type_2_fuzzy fuzzy set

#### Simple Python implementation of the Weiszfeld algorithm

##### March 14, 2021
machine_learning python weiszfeld_algorithm