s2net (version 1.0)

predict_Rcpp_s2net: Predict method for s2net C++ class.

Description

This function provides an interface in R for the method predict in C++ class s2net.

Usage


predict_Rcpp_s2net(object, newX, type = "default")

Arguments

object

An object of class Rcpp_s2net.

newX

Data to make predictions. Could be a s2Data object (field xL is used) or a matrix (in the same space as the original data where the model was fitted).

type

Type of predictions. One of "default": let the method figure it out; "response": the linear predictor; "probs": fitted probabilities; class: fitted class.

Value

Returns a column matrix with the same number of rows/observations as newX.

Details

This method is included as a high-level wrapper of object$predict().

See Also

Rcpp_s2net