NMFfitX1-class | R Documentation |
This class is used to return the result from a multiple
run of a single NMF algorithm performed with function
nmf
with the – default – option
keep.all=FALSE
(cf. nmf
).
It extends both classes NMFfitX
and
NMFfit
, and stores a the result of
the best fit in its NMFfit
structure.
Beside the best fit, this class allows to hold data about the computation of the multiple runs, such as the number of runs, the CPU time used to perform all the runs, as well as the consensus matrix.
Due to the inheritance from class NMFfit
, objects
of class NMFfitX1
can be handled exactly as the
results of single NMF run – as if only the best run had
been performed.
object of class matrix
used to
store the consensus matrix based on all the runs.
an integer
that contains the number of
runs performed to compute the object.
an object that contains RNG settings used for
the first run. See getRNG1
.
signature(object = "NMFfitX1")
:
The result is the matrix stored in slot
‘consensus’. This method returns NULL
if
the consensus matrix is empty.
signature(object = "NMFfitX1")
: Returns
the model object associated with the best fit, amongst
all the runs performed when fitting object
.
Since NMFfitX1
objects only hold the best fit,
this method simply returns the NMF model fitted by
object
– that is stored in slot ‘fit’.
signature(object = "NMFfitX1")
:
Returns the RNG settings used to compute the first of all
NMF runs, amongst which object
was selected as the
best fit.
signature(object = "NMFfitX1")
:
Returns the fit object associated with the best fit,
amongst all the runs performed when fitting
object
.
Since NMFfitX1
objects only hold the best fit,
this method simply returns object
coerced into an
NMFfit
object.
signature(x = "NMFfitX1", y =
"NMFfitX1")
: Compares the NMF models fitted by multiple
runs, that only kept the best fits.
signature(object = "NMFfitX1")
:
Returns the number of NMF runs performed, amongst which
object
was selected as the best fit.
signature(object = "NMFfitX1")
: Show
method for objects of class NMFfitX1
Other multipleNMF: NMFfitX-class
,
NMFfitXn-class
# generate a synthetic dataset with known classes
n <- 15; counts <- c(5, 2, 3);
V <- syntheticNMF(n, counts, factors = TRUE)
# get the class factor
groups <- V$pData$Group
# perform multiple runs of one algorithm, keeping only the best fit (default)
#i.e.: the implicit nmf options are .options=list(keep.all=FALSE) or .options='-k'
res <- nmf(V[[1]], 3, nrun=2)
res
# compute summary measures
summary(res)
# get more info
summary(res, target=V[[1]], class=groups)
# show computational time
runtime.all(res)
# plot the consensus matrix, as stored (pre-computed) in the object
## Not run: consensusmap(res, annCol=groups)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.