S4 Interface for Octave-Matlab NMF Algorithms

Description

This class implements the virtual interface NMFStrategy-class for NMF algorithms that are implemented in Octave/Matlab, and provided as a set of .m files or as plain code.

Usage

S4 (NMFStrategyOctave)
`show`(object)

Arguments

object
Any R object

Details

The run method for this class runs the algorithms via the RcppOctave package.

Slots

  1. algorithmcharacter string that gives the name of the main Octave/Matlab function that implements the algorithm. The function must take at least two arguments: the target matrix and the initial NMF model, converted into an Octave list object, with elements corresponding to slots of the corresponding S4 class.

  2. mcodecharacter vector that contains a set of path to .m files. These files are (re-)sourced every time the strategy is called, and must be present at runtime in the current directory or in a directory from Octave path.

Methods

  1. algorithmsignature(object = "NMFStrategyOctave"): Returns the name of the Octave/Matlab function that implements the NMF algorithm -- as stored in slot algorithm.

  2. algorithm<-signature(object = "NMFStrategyOctave", value = "character"): Sets the name of the Octave/Matlab function that implements the NMF algorithm. It is stored in slot algorithm.

  3. runsignature(object = "NMFStrategyOctave", y = "matrix", x = "NMFfit"): Runs the NMF algorithms implemented by the Octave/Matlab function associated with the strategy -- and stored in slot 'algorithm' of object.

    This method is usually not called directly, but only via the function nmf, which takes care of many other details such as seeding the computation, handling RNG settings, or setting up parallel computations.