Skip to content

Commit

Permalink
Update r.fuzzy.set.html
Browse files Browse the repository at this point in the history
Adapted the description of the equations to match the equations as implemented in the code. Code for linear, s-shaped and j-shaped rescaling seems OK. Not sure about the g-shape, but assuming for now that the way the equation is implemented in the code is correct.
  • Loading branch information
ecodiv committed Sep 23, 2023
1 parent 9d96fa8 commit 8cf735a
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions src/raster/r.fuzzy.set/r.fuzzy.set.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h4>Calculation of boundary shape</h4>
Depending on type of the boundary different equation are used to determine its
shape:
<p>
<b>Linear:</b> the membership is calculated according following equation:<br>
<b>Linear:</b> the membership is calculated according following equation:
<pre><code>
value <= A -> x = 0
A < value > B -> x = (value-A)/(B-A)
Expand All @@ -87,33 +87,38 @@ <h4>Calculation of boundary shape</h4>
</code></pre>

<p>
<b>S-shaped:</b> it use following equation:
<b>S-shaped:</b> the membership is calculated according following equation:
<pre><code>
sin(x * Pi/2)^m (for positive shape parameter)
1-cos(x * Pi/2)^m (for negative shape parameter)

where x: membership, and
m = 2^exp(2,shape) (for positive shape parameter)
m = 2^(1+shape) (for negative shape parameter)
where m: shape parameter.
m = 2^exp(2 * |shape|)
For default shape=0, m = 2 (most common parameter for that equation).
</code></pre>

For default shape parameter = 0 m is = 2 which is most common parameter for
that equation.
<p>
<b>G-shaped:</b> the membership is calculated according following equation:
<pre><code>
tan(x * Pi/4)^1/m

where x: membership, and
m = 2^exp(-2 * shape) (for negative shape parameter)
m = 2^(1-shape) (for positive shape parameter)
For default shape=0, m = 2 (most common parameter for that equation).
</code></pre>

<p>
<b>G-shaped and J shaped:</b> it use following equations:
<b>J shaped:</b> it use following equations:
<pre><code>
tan(x * Pi/4)^m (for J-shaped)
tan(x * Pi/4)^1/m (for G-shaped)
tan(x * Pi/4)^m

where x: membership, and
m = 2^exp(2,shape) (for positive shape parameter)
m = 2^exp(2 * shape) (for positive shape parameter)
m = 2^(1+shape) (for negative shape parameter)
where m: shape parameter.
For default shape=0, m = 2 (most common parameter for that equation).
</code></pre>


<h2>SEE ALSO</h2>

<em>
Expand Down

0 comments on commit 8cf735a

Please sign in to comment.