Description Usage Arguments Details Slots Methods (by generic)
This class implements the virtual interface NMFStrategy
for NMF algorithms that are implemented in Octave/Matlab, and provided as
a set of .m files or as plain code.
1 2 3 4 5 6 7 8 9 10 11 | ## S4 method for signature 'NMFStrategyOctave,matrix,NMFfit'
run(object, y, x, ...)
## S4 method for signature 'NMFStrategyOctave'
algorithm(object, load = FALSE)
## S4 replacement method for signature 'NMFStrategyOctave,character'
algorithm(object) <- value
## S4 method for signature 'NMFStrategyOctave'
show(object)
|
object |
an object of class |
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 passed as parameters to the algorithm's Octave implementation. |
load |
logical that indicates if the algorithm should be loaded as an R function. |
value |
a single character string that speficies the name of a defined Octave function
that implements the |
The run
method for this class runs the algorithms via the
RcppOctave
package.
algorithm
character 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, whose named element correspond to the slots of the R object's S4 class.
mcode
character 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.
run(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.
algorithm(object = NMFStrategyOctave)
: Returns the name of the Octave/Matlab function that implements the NMF algorithm – as stored in
slot algorithm
.
algorithm<-(object = NMFStrategyOctave,value = character)
: Sets the name of the Octave/Matlab function that implements the NMF algorithm.
It is stored in slot algorithm
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.