This is the main phytoclass algorithm. It performs simulated annealing algorithm for S and F matrices. See the examples (Fm, Sm) for how to set up matrices, and the vignette for more detailed instructions. Different pigments and phytoplankton groups may be used.
simulated_annealing(
S,
Fmat = NULL,
user_defined_min_max = NULL,
do_matrix_checks = TRUE,
niter = 500,
step = 0.009,
weight.upper.bound = 30,
verbose = TRUE,
seed = NULL,
check_converge = 100,
alt_pro_name = NULL
)A list containing
Fmat matrix
RMSE (Root Mean Square Error)
condition number
Class abundances
Figure (plot of results)
MAE (Mean Absolute Error)
Error
F_mat_iter
converge_plot
Sample data matrix – a matrix of pigment samples
Pigment to Chl a matrix
data frame with some format as min_max built-in data
This should only be set to TRUE when using the default values. This will remove pigment columns that have column sums of 0. Set to FALSE if using customised names for pigments and phytoplankton groups
Number of iterations (default is 500)
Step ratio used (default is 0.009)
Upper limit of the weights applied (default value is 30).
Logical value. Output error and temperature at each iteration. Default value of TRUE
Set number to reproduce the same results
TRUE/FALSE/integer; set the number of F matrices to for convergence checking
Optional: additional alternate versions of divinyl-chlorophyll-a spellings used to detect prochlorococcus (Default: "dvchl", "dvchla", "dv_chla")
# Using the built-in matrices Sm and Fm
set.seed(5326)
sa.example <- simulated_annealing(Sm, Fm, niter = 5)
sa.example$Figure
Run the code above in your browser using DataLab