Learn R Programming

fsr (version 1.0.0)

visitation: Visitation: An example of FSI model

Description

This function provides an example, without rules, of a fuzzy spatial inference (FSI) model.

Usage

visitation()

Arguments

Value

An example of an FSI model implemented without fuzzy rules set.

Details

The FSI model provided by this function represents an FSI model to estimate the visiting experience based on prices and overall ratings of accommodations as well as sanitary conditions of restaurants. The output of such a model infers a value between 0 and 100 that indicates how attractive it is to visit a specific location. For this, the experience can be classified as awful, average, and great.

The linguistic variables and their linguistic values of this FSI model are listed below:

  • accommodation price, with cut-rate, affordable, and expensive as linguistic values;

  • accommodation review with bad, good, and excellent as linguistic values;

  • food safety with low, medium, and high as linguistic values, which represent levels of sanitary conditions.

The usage of FSI models is subdivided into a preparation phase and an evaluation phase. The preparation phase is responsible for instantiating a new FSI model with the elements of the data source component of FIFUS. For this, the fsr package provides the following functions: fsi_create, fsi_add_fsa, and fsi_add_cs. These functions are employed by visitation so that users can add their own fuzzy set rules (by using fsi_add_rules) and perform the evaluation phase (by using the functions fsi_eval and/or fsi_qw_eval). In this sense, visitation performs the following internal actions to return an FSI model:

  1. specify the linguistic variables and their corresponding linguistic values, which are in turn represented by membership functions generated by the function genmf of the FuzzyR package. These items are specified according to the context of the running example.

  2. define small point datasets that represent each linguistic variable. Such datasets are tibble objects.

  3. build spatial plateau objects by using the function spa_creator on the datasets. As a result, we get spatial plateau objects that represent each linguistic value.

  4. create an FSI model with fsi_create function.

  5. add fuzzy spatial antecedents with the fsi_add_fsa function. Recall that the antecedents are spatial plateau objects previously built.

  6. define the linguistic variable and its linguistic values with membership functions for the consequent.

  7. add the consequent to the FSI model by using the function fsi_add_cs.

Examples

Run this code
# NOT RUN {
fsi <- visitation()

# }

Run the code above in your browser using DataLab