powered by
Compute best pattern-based fitness for a single Simplivariate Component
fitnessForOneComponent(mat, dfMean, patternFunctions, penalty)
Numeric fitness value (higher is better)
A numeric matrix (the component)
Overall mean of the full data matrix
Named list of functions for structure types
Named numeric vector of penalties per pattern type
m <- matrix(rnorm(100, mean = 10), nrow = 10) f <- fitnessForOneComponent(m, mean(m), defaultPatternFunctions(), c(constant = 0, additive = 1.0, multiplicative = 0))
Run the code above in your browser using DataLab