Skip to contents

fsi_create() builds a fuzzy spatial inference (FSI) model without elements of the data source component (i.e., spatial plateau objects, fuzzy rules set, and fuzzy sets).

Usage

fsi_create(name, and_method = "min", or_method = "max",
           imp_method = "min", agg_method = "max", 
           defuzz_method = "centroid", default_conseq = NULL)

Arguments

name

A character value that specifies the name of the FSI model.

and_method

A character value that defines the operator for the logical connective AND. Default value is "min".

or_method

A character value that defines the operator for the logical connective OR. Default value is "max".

imp_method

A character value that defines the implication operator. Default value is "min".

agg_method

A character value that defines the aggregation operator. Default value is "max".

defuzz_method

A character value that determines the defuzzification technique. Default value is the centroid technique.

default_conseq

A function object that corresponds to a membership function of the consequent.

Value

An empty named FSI model that is ready to be populated with data source component (i.e., spatial plateau objects, fuzzy rules set, and fuzzy sets).

Details

The fsi_create() function creates an empty FSI model and its default parameter values will implement a model using Mamdani's method.

The possible values for the parameters and_method and imp_method are: "min", "prod". The name of a user-defined t-norm function can also be informed here. The possible value for the parameters or_method and agg_method is: "max". The name of a user-defined t-conorm function can also be informed here. The possible values for the parameter defuzz_method are "centroid" (default value), "bisector", "mom", "som", and "lom". The parameter default_conseq defines the default behavior of the FSI model when there is no fuzzy rule with a degree of fulfillment greater than 0 returned by the FSI model.

After creating an empty FSI model, you have to call the functions fsi_add_fsa(), fsi_add_cs(), and fsi_add_rules() to fulfill the FSI model with the needed information before performing inferences.

Examples

trim_mf <- function(a, b, c) {
  function(x) {
    pmax(pmin((x - a)/(b - a), (c - x)/(c - b), na.rm = TRUE), 0)
  }
}

# Creating the FSI model
fsi <- fsi_create("To visit or not to visit, that is the question", 
                  default_conseq = trim_mf(10, 30, 60))