predict.nnmf: Methods for nnmf object returned by 'nnmf'

Description Usage Arguments Value See Also Examples

Description

Methods for nnmf object returned by nnmf

Usage

1
2
3
4
5
6
## S3 method for class 'nnmf'
predict(object, newdata, which = c("A", "W", "H"),
  method = object$options$method, loss = object$options$loss, ...)

## S3 method for class 'nnmf'
print(x, ...)

Arguments

object

An NNMF object returned by nnmf

newdata

A new matrix of x. No required when which == 'A'

which

Either 'A' (default), 'W' or 'H'

method

Either 'scd' or 'lee'. Default to object$options$method

loss

Either 'mse' or 'mkl'. Default to object$options$loss

...

Further arguments passed to 'nnlm' or 'print'

x

An NNMF object returned by nnmf

Value

'A' or a class of 'nnlm' for 'predict.nnmf' and no return for 'print'.

See Also

nnmf, nnlm

Examples

1
2
3
4
5
x <- matrix(runif(50*20), 50, 20)
r <- nnmf(x, 2)
r
newx <- matrix(runif(50*30), 50, 30)
pred <- predict(r, newx, 'H')

NNLM documentation built on July 3, 2019, 1:03 a.m.