NMFStrategyFunction-class: Interface for Single Function NMF Strategies

Description Usage Arguments Slots Methods (by generic)

Description

This class implements the virtual interface NMFStrategy for NMF algorithms that are implemented by a single workhorse R function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'NMFStrategyFunction,matrix,NMFfit'
run(object, y, x, ...)

## S3 method for class 'NMFStrategyFunction'
nmfFormals(x, ...)

## S4 method for signature 'NMFStrategyFunction'
algorithm(object)

## S4 replacement method for signature 'NMFStrategyFunction,'function''
algorithm(object) <- value

Arguments

object

an object of class NMFStrategyFunction, which encapsulates the NMF algorithm to run, access or modify.

y

the target data that we want to approximate, passed as a matrix(-like) object.

x

an NMFfit object used as a starting point/seed by the algorithm.

...

other arguments directly passed to the algorithm function encapsulated in object.

value

a function that implements an NMF algorithm. See details of its specifications in the desccription of class slot algorithm.

Slots

algorithm

a function that implements an NMF algorithm. It must have signature (y='matrix', x='NMFfit'), where y is the target matrix to approximate and x is the NMF model assumed to be seeded with an appropriate initial value – as it is done internally by function nmf.

Note that argument names currently do not matter, but it is recommended to name them as specified above.

The function must return an object that is compatible with the fitted NMF problem. Dependning on the purpose of the algorithm, this can be:

  • an NMF object for an algorithm that fits estimates both the basis and mixture coefficient matrices

  • a matrix-like object that has the dimensions of either the basis or mixture coefficient matrix, for an algorithm that performs a partial fit.

Methods (by generic)


renozao/NMF documentation built on June 14, 2020, 9:35 p.m.