NMF (version 0.16.1)

NMF-class: Generic Interface for Nonnegative Matrix Factorisation Models

Description

The class NMF is a virtual class that defines a common interface to handle Nonnegative Matrix Factorization models (NMF models) in a generic way. Provided a minimum set of generic methods is implemented by concrete model classes, these benefit from a whole set of functions and utilities to perform common computations and tasks in the context of Nonnegative Matrix Factorization.

The function misc provides access to miscellaneous data members stored in slot misc (as a list), which allow extensions of NMF models to be implemented, without defining a new S4 class.

Usage

misc(object, ...)

## S3 method for class 'NMF': $(x, name)

## S3 method for class 'NMF': $(x, name) <- value

## S3 method for class 'NMF': .DollarNames(x, pattern = "")

Arguments

object
an object that inherit from class NMF
...
extra arguments (not used)
x
object from which to extract element(s) or in which to replace element(s).
name
A literal character string or a name (possibly backtick quoted). For extraction, this is normally (see under Environments) partially matched to the
value
typically an array-like Robject of a similar class as x.
pattern
A regular expression. Only matching names are returned.

Creating NMF objects

Strictly speaking, because class NMF is virtual, no object of class NMF can be instantiated, only objects from its sub-classes. However, those objects are sometimes shortly referred in the documentation and vignettes as "NMF objects" instead of "objects that inherits from class NMF".

For built-in models or for models that inherit from the standard model class NMFstd, the factory method nmfModel enables to easily create valid NMF objects in a variety of common situations. See documentation for the the factory method nmfModel for more details.

Details

Class NMF makes it easy to develop new models that integrate well into the general framework implemented by the NMF package.

Following a few simple guidelines, new types of NMF models benefit from all the functionalities available for the built-in NMF models -- that derive themselves from class NMF. See section Implementing NMF models below.

See NMFstd, and references and links therein for details on the built-in implementations of the standard NMF model and its extensions.

References

Definition of Nonnegative Matrix Factorization in its modern formulation: Lee et al. (1999)

Historical first definition and algorithms: Paatero et al. (1994)

Lee DD and Seung HS (1999). "Learning the parts of objects by non-negative matrix factorization." _Nature_, *401*(6755), pp. 788-91. ISSN 0028-0836, , .

Paatero P and Tapper U (1994). "Positive matrix factorization: A non-negative factor model with optimal utilization of error estimates of data values." _Environmetrics_, *5*(2), pp. 111-126. , .

See Also

Main interface to perform NMF in nmf-methods.

Built-in NMF models and factory method in nmfModel.

Method seed to set NMF objects with values suitable to start algorithms with.

Other NMF-interface: basis, .basis, .basis<-, basis<-, coef, .coef, .coef<-, coef<-, coefficients, loadings,NMF-method, nmfModel, nmfModels, rnmf, scoef

Examples

Run this code
# show all the NMF models available (i.e. the classes that inherit from class NMF)
nmfModels()
# show all the built-in NMF models available
nmfModels(builtin.only=TRUE)

# class NMF is a virtual class so cannot be instantiated:
try( new('NMF') )

# To instantiate an NMF model, use the factory method nmfModel. see ?nmfModel
nmfModel()
nmfModel(3)
nmfModel(3, model='NMFns')

Run the code above in your browser using DataCamp Workspace