Skip to content

Commit

Permalink
style: Fix trailing whitespaces and end of file (#1130)
Browse files Browse the repository at this point in the history
* style: Fix trailing whitespace

* style: Fix end of file
  • Loading branch information
echoix authored Jun 24, 2024
1 parent 62e7974 commit 8939a98
Show file tree
Hide file tree
Showing 19 changed files with 734 additions and 738 deletions.
2 changes: 1 addition & 1 deletion src/imagery/i.spec.sam/i.spec.sam.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h2>DESCRIPTION</h2>
row2: 28.26 34.82 38.27 40.1 38.27 23.7
row3: 10.54 16.35 23.7 38.98 40.1 38.98


<h2>EXAMPLES</h2>

<div class="code"><pre>
Expand Down
12 changes: 6 additions & 6 deletions src/raster/r.boxplot/r.boxplot.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ <h2>DESCRIPTION</h2>
represent the median and interquartile range (IQR) of the input layer. Note
that all values of the input raster (within the region's extent)
are used to compute the median and IQR. If the zones of the zonal map
cover only part of the region, the user can mask out the non-covered
cover only part of the region, the user can mask out the non-covered
parts of the input map first by means of <em>r.mask</em>. That will result in
an IQR and median representing the values that fall within the zones of
the zonal map only. Otherwise, the computational region can be changed to
the zonal map only. Otherwise, the computational region can be changed to
fit the extent of the zonal map with <em>g.region</em>

<p>
Expand All @@ -25,7 +25,7 @@ <h2>DESCRIPTION</h2>

<p>
The whiskers extend to the most extreme data point, which is no
more than <b>range</b> &#10005; the IQR from the box.
more than <b>range</b> &#10005; the IQR from the box.
By default, a <b>range</b> of 1.5 is used, but the user can change
this. Note that range values need to be larger than 0.

Expand Down Expand Up @@ -64,11 +64,11 @@ <h2>NOTE</h2>
with the error message, 'The zonal raster must be of type CELL (integer)'.

<p>
If the <b>c</b> flag is used, the <b>bxp_color</b> and <b>median_color</b>
If the <b>c</b> flag is used, the <b>bxp_color</b> and <b>median_color</b>
are ignored, even if set by the user. The option to color boxploxs using the colors
of the zonal raster categories (<b>c</b> flag) only works if the zonal
map contains a color table. If it does not, the function exits with the
error message that 'The zonal map does not have a color table'. If the user
error message that 'The zonal map does not have a color table'. If the user
thinks there is a color table, run <em>r.colors.out</em> and check if the
categories are integers. If not, that is the problem. If they are all
integers, you probably have caught a bug.
Expand All @@ -83,7 +83,7 @@ <h2>EXAMPLE</h2>
<h3>Example 1</h3>
Draw a boxplot of the values of the <i>elevation</i> layer from the
<a href="https://grass.osgeo.org/download/data/">NC sample
dataset</a>. Set the <b>h</b> flag to print the boxplot horizontally.
dataset</a>. Set the <b>h</b> flag to print the boxplot horizontally.
Set the plot dimensions to 7 inch wide, 1 inch high.

<div class="code"><pre>
Expand Down
4 changes: 2 additions & 2 deletions src/raster/r.catchment/r.catchment.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h3>Options and flags:</h3>
the catchment configuration. The optional value <b>name_column</b>
is to be used in conjunction with the <b>-i</b> flag (see below).
There are three native flags for <em>r.catchment</em>. <b>-c</b>
allows you to keep the interim cost surface maps made. <b>-l</b> allows
allows you to keep the interim cost surface maps made. <b>-l</b> allows
you to show a list of the costv alues in that cost map, along with
the size of the catchments they delineate. <b>-i</b> enable "iterative"
mode. Here, the module will loop through all the points in the input
Expand All @@ -72,7 +72,7 @@ <h2>NOTES</h2>
determine the catchment.

The input <b>start_points</b> map should be a vector points map.
If the file contains other types of features (areas, lines, centroids),
If the file contains other types of features (areas, lines, centroids),
these will be ignored. If you desire, a start points map could be
manually digitized (with <em>v.digit</em>) over topographic or
cultural features, or could be created as a series of random points
Expand Down
126 changes: 63 additions & 63 deletions src/raster/r.edm.eval/r.edm.eval.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<h2>DESCRIPTION</h2>

The <em>r.edm.eval</em> addon returns a few evaluation statistics,
including the area under the curve (AUC), the maximum true skill
statistic (TSS), and the maximum kappa. For all three statistics, the
corresponding probability threshold values are also given. Optionally,
The <em>r.edm.eval</em> addon returns a few evaluation statistics,
including the area under the curve (AUC), the maximum true skill
statistic (TSS), and the maximum kappa. For all three statistics, the
corresponding probability threshold values are also given. Optionally,
it draws the receiver operating characteristic (ROC) curve.

<p>
The addon takes as input a raster layer with
observations(<em>observations</em>) and one or more
<em>predictions</em> layers. The <em>observations</em> layer
should be encoded with 1 (presence/cases) and 0 (absences/controls).
The (<em>predictions</em> layer gives the predicted values (e.g., the
outcome of a model). This typically are probability or suitability
scores between 0 and 1, but it will work on other scales too. With two
or more <em>predictions</em> layers, statistics are calculated for each
prediction layer separately. This allows one to compare predictions of
The addon takes as input a raster layer with
observations(<em>observations</em>) and one or more
<em>predictions</em> layers. The <em>observations</em> layer
should be encoded with 1 (presence/cases) and 0 (absences/controls).
The (<em>predictions</em> layer gives the predicted values (e.g., the
outcome of a model). This typically are probability or suitability
scores between 0 and 1, but it will work on other scales too. With two
or more <em>predictions</em> layers, statistics are calculated for each
prediction layer separately. This allows one to compare predictions of
different models.

<p>
By default, the prediction layer is divided in 200 bins (the user can
change this number). For each bin, the module computes the cumulative
true and false positives (TP, FP), true and false negatives (TN, FN), the
true and false positive rate (TPR, FPR), the true negative rate (TNR),
Cohen's kappa and the true skill statistic.
By default, the prediction layer is divided in 200 bins (the user can
change this number). For each bin, the module computes the cumulative
true and false positives (TP, FP), true and false negatives (TN, FN), the
true and false positive rate (TPR, FPR), the true negative rate (TNR),
Cohen's kappa and the true skill statistic.

<div class="code"><pre>
TPR = TP / (TP + FN)
Expand All @@ -42,49 +42,49 @@ <h2>DESCRIPTION</h2>
</pre></div>

<p>
These values can be saved to a CSV file, together with the
corresponding upper and lower boundaries of the bins values. These can
These values can be saved to a CSV file, together with the
corresponding upper and lower boundaries of the bins values. These can
be used to calculate additional statistics.

<p>
With the <em>-b</em> flag, the module will use the fraction of
points that is predicted to be presence/true instead of the false
positive rate to create the ROC curve and calculate the AUC. Use this
when the predictions are created using a model that works with
With the <em>-b</em> flag, the module will use the fraction of
points that is predicted to be presence/true instead of the false
positive rate to create the ROC curve and calculate the AUC. Use this
when the predictions are created using a model that works with
background points instead of (pseudo-)absence points (like Maxent).

<p>
A problem with the AUC is that it varies with the spatial extent used
to select background points (Lobo et al. 2008, Jiménez-Valverde 2012).
Generally, the larger that extent, the higher the AUC value. Therefore,
AUC values are generally biased and cannot be directly compared. An
admittedly simple way to evaluate this issue of changing AUC values
with changing extents is to only use (pseudo-)absence or background
points within certain distances of the presence points (raster cells).
To do so, the user can use the <em>buffer</em> parameter to limit the
absence/background points that are used to calculate the various
statistics to those within a certain distance from the presence
locations/areas.
A problem with the AUC is that it varies with the spatial extent used
to select background points (Lobo et al. 2008, Jiménez-Valverde 2012).
Generally, the larger that extent, the higher the AUC value. Therefore,
AUC values are generally biased and cannot be directly compared. An
admittedly simple way to evaluate this issue of changing AUC values
with changing extents is to only use (pseudo-)absence or background
points within certain distances of the presence points (raster cells).
To do so, the user can use the <em>buffer</em> parameter to limit the
absence/background points that are used to calculate the various
statistics to those within a certain distance from the presence
locations/areas.

<p>
The user can set the required ratio of presence and total points to be
used in the evaluation (<em>preval</em>; value between 0 an 1). This
allows the user to test how sensitive the evaluation statistics are for
the prevalence of presence points.
The user can set the required ratio of presence and total points to be
used in the evaluation (<em>preval</em>; value between 0 an 1). This
allows the user to test how sensitive the evaluation statistics are for
the prevalence of presence points.

<h2>NOTES</h2>

The module expects an <em>reference</em> raster layer, encoded with 1
(presence/cases) and 0 (absences/controls). Optionally, the user can
define other values using the <em>absence</em> and <em>presence</em>
parameters. If the layer contains more than 2 unique values, or if the
layer is not of the type CELL (integer), the module will terminate with
The module expects an <em>reference</em> raster layer, encoded with 1
(presence/cases) and 0 (absences/controls). Optionally, the user can
define other values using the <em>absence</em> and <em>presence</em>
parameters. If the layer contains more than 2 unique values, or if the
layer is not of the type CELL (integer), the module will terminate with
a warning.

<p>
The selection of the best evaluation statistic depends on your data and
what you want to test. This module provides a few only, but the user can
calculate his/her own using the table in the CSV file. See the
The selection of the best evaluation statistic depends on your data and
what you want to test. This module provides a few only, but the user can
calculate his/her own using the table in the CSV file. See the
References list for a few useful references in that respect.

<p>
Expand All @@ -93,9 +93,9 @@ <h2>NOTES</h2>

<h2>EXAMPLES</h2>

Run this example in the "landsat" mapset of the North Carolina sample
data set location. First, create a binary map with herbaceous land cover
(1) and other (0). Next, create a raster layer with training pixels
Run this example in the "landsat" mapset of the North Carolina sample
data set location. First, create a binary map with herbaceous land cover
(1) and other (0). Next, create a raster layer with training pixels
using <em>r.learn.train</em> and <em>r.learn.predict</em> from the
<a href="r.learn.ml2.html">r.learn.ml2</a> addon.
Note, <em>r.learn.train</em> can compute its own accuracy
Expand All @@ -108,22 +108,22 @@ <h2>EXAMPLES</h2>
</pre></div>

<p>
Then we can use these training pixels to perform a classification on
Then we can use these training pixels to perform a classification on
the more recently obtained landsat 7 image using <em>r.learn.train</em>.

<div class="code"><pre>
# train a random forest regression model using r.learn.train
r.learn.train group=lsat7_2000 training_map=training_pixels \
model_name=RandomForestRegressor n_estimators=500 \
save_model=rf_model.gz cv=2

# perform prediction using r.learn.predict
r.learn.predict group=lsat7_2000 load_model=rf_model.gz \
output=rf_regressor
</pre></div>

<p>
Now we can see how well the model performed using the
Now we can see how well the model performed using the
<em>r.edm.eval</em>.

<div class="code"><pre>
Expand Down Expand Up @@ -154,14 +154,14 @@ <h2>EXAMPLES</h2>
</div>

<p>
Let's try how well a logistic regression performs, and compare this
Let's try how well a logistic regression performs, and compare this
with the previous results.

<div class="code"><pre>
# train a logistic regression model using r.learn.train
r.learn.train group=lsat7_2000 training_map=training_pixels \
model_name=LogisticRegression save_model=lr_model.gz cv=2

# perform prediction using r.learn.predict -p
r.learn.predict group=lsat7_2000 load_model=lr_model.gz \
output=lr_regressor
Expand Down Expand Up @@ -191,7 +191,7 @@ <h2>EXAMPLES</h2>
treshold minimum distance to (0,1) = 0.0848
</pre></div>

And the accompanying ROC curve is shown below (the figure can optionally be saved to file).
And the accompanying ROC curve is shown below (the figure can optionally be saved to file).

<p>
<div align="center" style="margin: 10px">
Expand All @@ -204,29 +204,29 @@ <h2>EXAMPLES</h2>
<h2>REFERENCES</h2>

Jiménez-Valverde, A. 2012. Insights into the area under the receiver
operating characteristic curve (AUC) as a discrimination measure in
species distribution modelling. Global Ecology and Biogeography 21:
operating characteristic curve (AUC) as a discrimination measure in
species distribution modelling. Global Ecology and Biogeography 21:
498-507

<p>
Lobo, J. M., Jim&eacute;nez-Valverde, A., &amp; Real, R. 2008. AUC: a
misleading measure of the performance of predictive distribution
misleading measure of the performance of predictive distribution
models. Global Ecology and Biogeography 17: 145-151.

<p>
Hijmans, R. J. 2012. Cross-validation of species distribution models:
removing spatial sorting bias and calibration with a null model.
removing spatial sorting bias and calibration with a null model.
Ecology 93: 679-688.

<p>
Allouche, O., Tsoar, A., &amp; Kadmon, R. 2006. Assessing the accuracy of
species distribution models: prevalence, kappa and the true skill
species distribution models: prevalence, kappa and the true skill
statistic (TSS). Journal of Applied Ecology 43: 1223-1232.

<p>
McPherson, J. M., Jetz, W., &amp; Rogers, D. J. 2004. The effects of
species' range sizes on the accuracy of distribution models: ecological
phenomenon or statistical artefact? Journal of Applied Ecology 41:
species' range sizes on the accuracy of distribution models: ecological
phenomenon or statistical artefact? Journal of Applied Ecology 41:
811-823.

<h2>SEE ALSO</h2>
Expand Down
20 changes: 10 additions & 10 deletions src/raster/r.fusion/r.fusion.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<h2>DESCRIPTION</h2>

<em>r.fusion</em> enhances the resolution of a raster map by using spatial
detail of a high-resolution map. The actual values in the resultant output map
correspond to the input map while the spatial detail corresponds to the
high-resolution map. The effect is similar to pan-sharpening, but the method
can be applied more generally, not only to imagery but also to climatological
<em>r.fusion</em> enhances the resolution of a raster map by using spatial
detail of a high-resolution map. The actual values in the resultant output map
correspond to the input map while the spatial detail corresponds to the
high-resolution map. The effect is similar to pan-sharpening, but the method
can be applied more generally, not only to imagery but also to climatological
data such as temperature or precipitation.

<h2>NOTES</h2>

Two different methods are available with the <b>method</b> option:
Two different methods are available with the <b>method</b> option:
<em>difference</em> and <em>proportion</em>.

<p>
Expand All @@ -21,11 +21,11 @@ <h2>NOTES</h2>
<p>
highres(A<sub>lowres</sub> - B<sub>lowres</sub>) + B<sub>highres</sub> = A<sub>highres</sub>
<p>
where <em>highres()</em> is a function to interpolate the differences. Here,
where <em>highres()</em> is a function to interpolate the differences. Here,
<em>r.resamp.filter</em> is used for interpolation.

<p>
The <em>proportion</em> method is suitable for e.g. precipitation where zero
The <em>proportion</em> method is suitable for e.g. precipitation where zero
precipition must stay zero precipition, and uses the formula
<p>
A / B * B = A
Expand All @@ -35,8 +35,8 @@ <h2>NOTES</h2>
highres(A<sub>lowres</sub> / B<sub>lowres</sub>) * B<sub>highres</sub> = A<sub>highres</sub>
<p>

Again, <em>highres()</em> is a function to interpolate the proportions, and
<em>r.resamp.filter</em> is used for interpolation. For the <em>proportion</em>
Again, <em>highres()</em> is a function to interpolate the proportions, and
<em>r.resamp.filter</em> is used for interpolation. For the <em>proportion</em>
method, all values in the high-resolution B map must be &gt; 0.


Expand Down
2 changes: 1 addition & 1 deletion src/raster/r.fuzzy.set/r.fuzzy.set.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h4>Calculation of boundary shape</h4>
1-cos(x * Pi/2)^m (for negative shape parameter)

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

Expand Down
Loading

0 comments on commit 8939a98

Please sign in to comment.