Geoscience Reference
In-Depth Information
Fig. 12.6 Support vector machine classifier
features for each sample unit. Notice that for text labels a conversion to numerical
values is needed, as explained in Sect. 12.5.2 .
1 pksvm -t training_features.sqlite -i
2013_IEEE_GRSS_DF_Contest_FEATURES.tif -o
2013_IEEE_GRSS_DF_Contest_map.tif -ct ct.txt
The second example is taken from the case study inChap . 17 . The labels are defined
in the Spatialite vector file as integers: 1 (forest) and 2 (non-forest). The input raster
dataset is a Landsat 8 composite and the output is a forest cover map. We use an
extra mask image to indicate pixels that must not be considered by the classification
algorithm. These pixels will obtain a no-data value of 0. We set the parameters for
cost and gamma, which both have been optimized as 10 (see Sect. 12.5.4 ).
pksvm -t training_landsat.sqlite -i LC82070232013_composite.tif
-o LC82070232013_fmap.tif -m
LC82070232013_ndvi_masked.tif -msknodata 0 -nodata 0 -cc
10 -g 10
12.5.2 Class Labels
The class labels must be providedwith the training sample. The default attribute name
for the labels is “label”, but you can alter it with the option -label . The labels can
be integers (e.g. 1, 2, etc.) or strings (e.g. grass_healthy, grass_stressed). Because a
classified raster dataset can only be written as numerical values, the utility must
convert the string label attributes (class names) to numerical values (class num-
bers). You can provide the corresponding names and numbers via the option pairs
 
 
Search WWH ::




Custom Search