partition_tdv_grasp {diffval} | R Documentation |
Obtain a partition using a GRASP algorithm
Description
This function obtains a partition of the columns of a given phytosociological matrix, aiming at high values of the Total Differential Value (TDV) using a GRASP algorithm.
Usage
partition_tdv_grasp(m_bin, k, thr = 0.95, verify = TRUE)
Arguments
m_bin |
A matrix. A phytosociological table of 0s (absences) and 1s (presences), where rows correspond to taxa and columns correspond to relevés. |
k |
A numeric giving the number of desired groups. |
thr |
A numeric giving a threshold value (from 0 to 1 ) with the
probability used to compute the sample quantile, in order to get the best
|
verify |
A logical. If |
Details
This function uses a Greedy Randomized Adaptive Search Procedure
(GRASP) to obtain a partition of m_bin
.
Given a phytosociological table (m_bin
, with rows corresponding to taxa
and columns corresponding to relevés) this function searches for a
k
-partition (k
, defined by the user) aiming at high values of the TDV.
See tdv()
for an explanation on the TDV of a phytosociological table.
With thr = 1
, the algorithm corresponds to the Greedy algorithm.
Value
A numeric vector, which length is the same as the number of columns
of m_bin
, with numbers from 1 to k
, representing the group to which the
respective column was ascribed.
Author(s)
Jorge Orestes Cerdeira and Tiago Monteiro-Henriques. E-mail: tmh.dev@icloud.com.
Examples
# Getting the Taxus baccata forests data set
data(taxus_bin)
# Obtaining a partition based on the GRASP algorithm
partition_tdv_grasp(taxus_bin, 3)