predict.cpfa {cpfa} | R Documentation |
Deprecated - Predict Method for Classification with Parallel Factor Analysis
Description
Deprecated. Use function predict.tunecpfa
instead. See help file for predict.tunecpfa
.
Usage
## S3 method for class 'cpfa'
predict(object, newdata = NULL, method = NULL,
type = c("response", "prob", "classify.weights"),
threshold = NULL, ...)
Arguments
object |
A fit object of class 'cpfa' from function |
newdata |
An optional three-way or four-way data array used to predict Parafac or Parafac2 component weights using estimated Parafac or Parafac2 model component weights from inputted object. Dimensions must match dimensions of original data for all modes except the classification mode. If omitted, the original data are used. |
method |
Character vector indicating classification methods to use. Possible methods include penalized logistic regression (PLR); support vector machine (SVM); random forest (RF); feed-forward neural network (NN); and regularized discriminant analysis (RDA). If none selected, default is to use all methods. |
type |
Character vector indicating type of prediction to return. Possible values include: (1) |
threshold |
For binary classification, value indicating prediction threshold over which observations are classified as the positive class. If not provided, calculates threshold using class proportions in original data. For multiclass classification, |
... |
Currently ignored. Additional predict arguments. |
Details
See help file for predict.tunecpfa
.
Value
Returns one of the following, depending on the choice for argument type
:
type = "response" |
A data frame containing predicted class labels or probabilities (binary case) for each Parafac model and classification method selected (see argument |
type = "prob" |
A list containing predicted probabilities for each Parafac model and classification method selected (see argument |
type = "classify.weights" |
List containing predicted component weights for each Parafac or Parafac2 model. Length is equal to number of Parafac models that were fit. |
Author(s)
Matthew Snodgress <snodg031@umn.edu>