predict.ossvm: Predict New Observations with Observation Specific Support...

Description Usage Arguments Details Value See Also

Description

Classify multivariate observations in conjunction with ossvm.

Usage

1
2
predict.ossvm(object, newdata, decision.values = FALSE, probability = FALSE,
  ..., na.action = na.omit)

Arguments

object

Object of class "ossvm".

newdata

An object containing the new input data: either a matrix or a sparse matrix (object of class Matrix provided by the Matrix package, or of class matrix.csr provided by the SparseM package, or of class simple_triplet_matrix provided by the slam package). A vector will be transformed to a (n x 1) matrix.

decision.values

Logical controlling whether the decision values of all binary classifiers computed in multiclass classification shall be computed and returned.

probability

Logical indicating whether class probabilities should be computed and returned.

na.action

A function to specify the action to be taken if 'NA's are found. The default action is na.omit, which leads to rejection of cases with missing values on any required variable. An alternative is na.fail, which causes an error if NA cases are found. (NOTE: If given, this argument must be named.)

...

Further arguments.

Details

This function is a method for the generic function predict() for class "ossvm". It can be invoked by calling predict(x) for an object x of the appropriate class, or directly by calling predict.ossvm(x) regardless of the class of the object.

Value

A vector of predicted values (for classification: a vector of labels, for density estimation: a logical vector). If decision.value is TRUE, the vector gets a "decision.values" attribute containing a n * c matrix (n number of predicted values, c number of classifiers) of all c binary classifiers' decision values. There are k * (k - 1) / 2 classifiers (k number of classes). The colnames of the matrix indicate the labels of the two classes. If probability is TRUE, the vector gets a "probabilities" attribute containing a n * k matrix of the class probabilities.

See Also

ossvm.

Other observation_specific svm: ossvm


schiffner/locClass documentation built on May 29, 2019, 3:39 p.m.