MCR-class {tofsims} | R Documentation

## Class MCR

### Description

Class `MCR` contains methods for 'Multivariate Curve Resolution by Alternate Least Squares'

opaMCR is a MCR-ALS function using the Orthogonal Projection Approach from

### Usage

    opaMCR(dataObject, opaComps, maxiter = 10)

### Arguments

`dataObject` | object of class MassImage
`opaComps` | numeric number of components for the opa method
`maxiter` | numeric how many iterations

### Details

Class `MCR` contains methods for 'Multivariate Curve Resolution by Alternate Least Squares'

opaMCR uses the function `alsace::opa()` (Orthogonal Projection Approach, Bioconductor package 'alsace') for start estimates of pure spectras and `ALS::als()` (CRAN package 'ALS') as MCR-ALS implementation. This method is doing fine with images up to 256x256 pixels. For larger images, memory usage becomes unreasonably high.

### Value

object of class MCR

### Slots

`RSS`

  numeric residual sum of squares

`resids`

  matrix with residuals

`iters`

  numeric number of iterations

### Author(s)

Lorenz Gerber <lorenz.gerber@slu.se>

### Examples

    testImage<-MassImage('dummy')
    testImage<-opaMCR(testImage, 2, 2)
    image(analysis(testImage,1), comp = 1)
    ## Not run:
    library(tofsimsData)
    data(tofsimsData)
    testImage<-MCR(testImage, 5, 5)
    image(analysis(testImage,1), comp = 1)

    ## End(Not run)

[Package tofsims version 1.20.0 Index]