Performs the steepest descent algorithm for a set number of iterations to optimize the F matrix of pigment ratios.
Source:R/Steepest_Descent.R
Steepest_Descent.RdPerforms the steepest descent algorithm for a set number of iterations to optimize the F matrix of pigment ratios.
Value
A list containing:
1: The optimized F matrix
2: Final RMSE value
3: The C matrix (class abundances for each group)
Examples
Fmat <- as.matrix(phytoclass::Fm)
S <- as.matrix(phytoclass::Sm)
S_weights <- as.numeric(phytoclass:::Bounded_weights(S))
place <- which(Fmat[, seq(ncol(Fmat) - 2)] > 0)
num.loops <- 2
# Run Steepest_Descent
result <- phytoclass:::Steepest_Descent(Fmat, place, S, S_weights, num.loops)