LVIclust | R Documentation |
This function clusters local variables importance (LVI) output with different methods, including: Gaussian Mixture Modelling (mclust), Kohonen's Self-Organizing Maps (kohonen), or hierarchical clustering (hclust)
LVIclust(
input_LVI,
remove_columns = NA,
method_clustering = "ward.D2",
ncluster = 2,
plots = T,
output_folder
)
input_LVI |
string or Spatial-class. Input shapefile of GWRFC LVI output. It can be the filename of the shapefile or an object of class SpatialPolygonsDataFrame or SpatialPointsDataFrame. |
remove_columns |
string. Remove specific variables from input_LVI. Variables are identified by column name. NA ignores column remove. By default, column "ID_row" is removed. |
method_clustering |
string. A method to use for clustering. It can be:"ward.D","ward.D2","single","complete","average","mcquitty","median", "centroid", "mclust" or "SOM". The latter, is calculated with the kohonen library. |
ncluster |
numeric. Number of clusters to apply. Should be more than 2. |
plots |
logical. If TRUE, plots from clustering libraries are generated and stored at output_folder (except for mclust). |
output_folder |
string. Output folder where LVIclust outputs will be stored. |
The output of this function is a shapefile with the resulting clusters and its plot if it was specified.
#based in the example showed with the execution of GWRFC
LVIclust(input_LVI = "E:/demo/deforestation/GWRFC_ADP_400_EX_LVI.shp", #filename of the GWRFC LVI output
remove_columns=NA,
method_clustering="mclust", #hierarchical clustering is applied here.
ncluster = 2, #number of clusters.
plots=T, #available only for all hierarchical clustering methods and kohonen.
output_folder = "E:/demo/deforestation") #check this folder for outputs generated by the function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.