staRdom (version 1.0.8)

eem_parafac: Runs a PARAFAC analysis on EEM data

Description

One or more PARAFAC models can be calculated depending on the number of components. The idea is to compare the different models to get the most suitable. B-mode is emmission wavelengths, C-mode is excitation wavelengths and, A-mode is the loadings of the samples. The calculation is done with parafac, please see details there.

Usage

eem_parafac(eem_list, comps, maxit = 500, normalise = TRUE,
  const = c("nonneg", "nonneg", "nonneg"), nstart = 10, ctol = 10^-4,
  cores = parallel::detectCores()/2, verbose = FALSE, ...)

Arguments

eem_list

object of class eem

comps

vector containing the desired numbers of components. For each of these numbers one model is calculated

maxit

maximum iterations for PARAFAC algorithm

normalise

state whether EEM data should be normalised in advance

const

constraints of PARAFAC analysis. Default is non-negative ("nonneg"), alternatively smooth and non-negative ("smonon") might be interesting for an EEM analysis.

nstart

number of random starts

ctol

Convergence tolerance (R^2 change)

cores

number of parallel calculations (e.g. number of physical cores in CPU)

verbose

print infos

...

additional parameters that are passed on to parafac

Value

object of class parafac

See Also

parafac

Examples

Run this code
# NOT RUN {
data(eem_list)

dim_min <- 3 # minimum number of components
dim_max <- 7 # maximum number of components
nstart <- 10 # random starts for PARAFAC analysis, models built simulanuously, best selected
cores <- parallel::detectCores()/2 # use all cores but do not use all threads
maxit = 500
ctol <- 10^-4 # tolerance for parafac

pfres_comps <- eem_parafac(eem_list,comps=seq(dim_min,dim_max),
    normalise = TRUE,maxit=10000,nstart=nstart,ctol=ctol,cores=cores)
# }

Run the code above in your browser using DataCamp Workspace