Fuzzy aggregation

Instructions for use

Settings window

L’attribut alt de cette image est vide, son nom de fichier est fzyaggr_window-1024x967.jpg.

“Layer 1” and “Layer 2” fields

The “layers” fields display the list of loaded layers, limited to geopackage tables. The current version only takes into account data stored in geopackage files (gpkg).

“Fuzzy field 1” and “Fuzzy field 2” fields

Once the input layers have been selected, these drop-down menus display all the fields suffixed with _fuzzy for each layer.

Spatial operation type

This option allows you to manage the spatial extent of the resulting layer.

L’attribut alt de cette image est vide, son nom de fichier est fzyaggr_spatial_op-1024x967.jpg.

The intersection option keeps in the result layer the extent corresponding to the overlap of the two input layers. For each intersection, the result attribute is calculated using the function defined below. However, this means that if a layer has no data for an area, that area is ignored in the result layer. In a process involving several aggregations of different extents, the result layer will be significantly reduced. Furthermore, the absence of data for an area will prevent it from being “caught up” in subsequent aggregations.

The union option keeps the extent corresponding to the two input layers in the result layer. For each overlapping area, the result attribute is calculated using the function defined below. For areas where one of the two layers has no data, the result attribute is calculated using the function defined below, considering that the value of the missing layer is “very bad.” In a process involving several aggregations of different extents, the resulting layer will not be truncated at all. Furthermore, the absence of data in an area will not prevent it from being “caught up” in subsequent aggregations.

Name of the result layer

You can name the aggregated layer freely, but it will have the suffix “_agg”.

Transformation history

Each time a transformation or aggregation is performed by the plugin, a line is added to a history management table, metafuzzy, which is created and maintained within the data geopackage.

L’attribut alt de cette image est vide, son nom de fichier est fzyattr_history-1024x388.jpg.

In the case of fuzzy aggregations, the fields filled in are:

  • field: the name of the aggregated field
  • function: the type of spatial operation and the selected function with a numerical code representing the answer to each of the three questions (1=very good, 5=very bad)
  • params: details of the numerical parameters used to generate unlisted functions
  • source1: the name of source layer 1 and its attribute
  • source2: the name of source layer 2 and its attribute

Define the aggregation function

L’attribut alt de cette image est vide, son nom de fichier est fzyaggr_fonction-1024x399.jpg.

You must select an answer for each of the three questions.

If you consider that reversing the two criteria changes your answers (asymmetry of criteria), check the Verify symmetry box. A fourth question will allow you to enter your answer.

L’attribut alt de cette image est vide, son nom de fichier est fzyaggr_fonction_assym-1024x545.jpg.


Procedure for determining the aggregation operation.

When aggregating two objectives, there is a simple procedure for determining the type of operation to be performed. It consists of presenting the decision-maker with three typical situations and asking them to evaluate them. Based on the three responses given, a catalog of functions is searched to find the one that best matches the decision-maker’s wishes.

The three typical situations (S1, S2, S3) are chosen according to two criteria (C1, C2) so that:

  • – S1 is incompatible (grade E or 0) with C1, but fully compatible (grade A or 1) with C2;
  • – S2 is moderately compatible (grade C or 0.5) with both objectives C1 and C2;
  • – S3 is moderately compatible (grade C or 0.5) with C1 and fully compatible (grade A or 1) with C2.

This gives us three answers (R1, R2, R3), from which we seek the aggregation operation.

The three types of functions implemented

Two situations are to be studied:

  • a) two criteria of equal importance;
  • b) two criteria of unequal importance

Criteria of equal importance (symmetrical)

Two criteria are of equal importance if the aggregation function is symmetrical, i.e. if the answer to the three evaluation questions is the same when the order of the criteria is reversed.

In this case, based on the three answers (A1, A2, A3), the aggregation operation is sought in the following table:


Adjustment method for asymmetric criteria

When a user defines a fuzzy aggregation function based on non-symmetrical responses (e.g., certain criteria deemed more important than others, or combinations deemed atypical), the plugin uses an approximation method to automatically generate a custom aggregation function.

The generate_asymmetric_function(code) function:

  1. Key points defined by the user

    • The user chooses four aggregation values corresponding to reference situations:

      • (1, 0): criterion A completely true, criterion B completely false->vA1B0
      • (0.5, 0.5): both criteria average->vA05B05
      • (0.5, 1): criterion A average, criterion B completely true->vA05B1
      • (0, 1): criterion A completely false, criterion B completely true->vA0B1

    • These values are encoded as a 4-digit code (each digit from 0 to 4 corresponds to a degree of satisfaction between 1.0 and 0.0).

  2. Construction of the fuzzy function

    • For the four key points, the values are assigned directly.
    • For all other combinations (x, y), the value is calculated by weighted bilinear interpolation, using the formula:

      • vA05B05⋅x⋅y+vA05B1⋅x⋅∣x−y∣+vA0B1⋅(1−x)⋅y

    • This formula produces a continuous surface that remains consistent with the defined key points.

  3. Result

    • The returned function can be applied to any pair (x, y) of fuzzy values.
    • A parameter dictionary is also returned, documenting the type, code, points


Adjustment method for unusual symmetrical criteria

The triplets presented in the function table above comply with the following constraints:

1) R3 >= max( R1,R2), the evaluation of a situation that completely satisfies criterion 2 and moderately satisfies criterion 1 must be at least equal to the best evaluation of the other two situations (R1 and R2), one of which does not satisfy the first criterion at all and the other of which only moderately satisfies both criteria;

2) R3 >= grade C or 0.5, full satisfaction of the second criterion cannot cause the overall satisfaction to fall below the level of satisfaction of the first criterion.

However, although this logic is used in most applications, it may not be appropriate in very specific situations. In this case, the plugin uses the generate_fuzzy_function(code) function to automatically generate a suitable aggregation function.

A warning message indicates that an unusual combination of responses has been encountered.

  1. Key points defined by the user

    • The user defines three reference situations, coded with three digits (from 0 to 4) representing a degree of aggregation between 1.0 and 0.0:

      • (1, 0) or (0, 1): one criterion is completely true, the other completely false->v1
      • (0.5, 0.5): both criteria are average ->v2
      • (0.5, 1) or (1, 0.5): one criterion is average, the other is completely true->v3

  2. Construction of the symmetric fuzzy function

    • The values of the three key points are assigned directly according to the code provided.
    • For all other pairs (x, y), the value is estimated by continuous interpolation using the formula:

      • v2⋅x⋅y+v3⋅∣x−y∣

    • Symmetry is respected because the formula and key points are identical if x and y are swapped.

  3. Result

    • The returned function can be applied to any pair (x, y) of fuzzy values.
    • A parameter dictionary is also returned, documenting the type, code, key points, and approximation formula.