simulated_annealing_Prochloro function

Perform simulated annealing algorithm for S and F matrices

Perform simulated annealing algorithm for S and F matrices

Perform simulated annealing algorithm for S and F matrices

Perform simulated annealing algorithm for samples with divinyl chlorophyll and prochlorococcus. Divinyl chlorophyll must be the final column of both S and F matrices, with chlorophyll a the 2nd to last column. See how the example Sp and Fp matrices are organised.

simulated_annealing_Prochloro( S, Fmat = NULL, user_defined_min_max = NULL, do_matrix_checks = TRUE, niter = 500, step = 0.009, weight.upper.bound = 30, verbose = TRUE ) simulated_annealing_Prochloro( S, Fmat = NULL, user_defined_min_max = NULL, do_matrix_checks = TRUE, niter = 500, step = 0.009, weight.upper.bound = 30, verbose = TRUE )

Arguments

  • S: Sample data matrix – a matrix of pigment samples
  • Fmat: Pigment to Chl a matrix
  • user_defined_min_max: data frame with some format as min_max built-in data
  • do_matrix_checks: 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
  • niter: Number of iterations (default is 500)
  • step: Step ratio used (default is 0.009)
  • weight.upper.bound: Upper limit of the weights applied (default value is 30).
  • verbose: Logical value. Output error and temperature at each iteration. Default value of TRUE

Returns

A list containing

  1. Fmat matrix
  2. RMSE (Root Mean Square Error)
  3. condition number
  4. Class abundances
  5. Figure (plot of results)
  6. MAE (Mean Absolute Error)
  7. Error

A list containing

  1. Fmat matrix
  2. RMSE (Root Mean Square Error)
  3. condition number
  4. Class abundances
  5. Figure (plot of results)
  6. MAE (Mean Absolute Error)
  7. Error

Examples

# Using the built-in matrices Sp and Fp set.seed(5326) sa.example <- simulated_annealing_Prochloro(Sp, Fp, niter = 5) sa.example$Figure # Using the built-in matrices Sp and Fp. set.seed(5326) sa.example <- simulated_annealing_Prochloro(Sp, Fp, niter = 1) sa.example$Figure # To use with non-defauæy values, see the 'simulated_annealing' example-
  • Maintainer: Alexander Hayward
  • License: MIT + file LICENSE
  • Last published: 2024-11-14