predict.nmfkc generates predictions from an object of class nmfkc,
either using the fitted covariates or a new covariate matrix.
Usage
# S3 method for class 'nmfkc'
predict(x, newA = NULL, type = "response")Arguments
- x
An object of class
nmfkc, i.e., the return value ofnmfkc.- newA
Optional. A new covariate matrix to be used for prediction. If
NULL(default), the fitted covariates are used.- type
Type of prediction to return. Options are:
"response"(default): Returns the reconstructed matrix \(X B\)."prob": Returns probabilities usingB.probinstead ofB."class": Returns the class label corresponding to the maximum in each column ofB.prob.