predictions {GTbasedIM} | R Documentation |
This function trains three different classifiers—Random Forest (RF), Support Vector Machine (SVM), and Logistic Regression (LR)—on the input dataset and returns their predictions.
predictions(Xdata, Ydata)
Xdata |
Matrix. A dataset where rows represent observations and columns represent features. |
Ydata |
Vector. The actual response variable associated with each row in |
The function utilizes the RWeka package to build three different classifiers: Random Forest (RF), Support Vector Machine (SVM), and Logistic Regression (LR). It then predicts the response variable for the input data using each of these models.
A list containing predictions from the three models:
predictionRF
Predictions from the Random Forest (RF) model.
predictionSVM
Predictions from the Support Vector Machine (SVM) model.
predictionLR
Predictions from the Logistic Regression (LR) model.
Davila-Pena, L., Saavedra-Nieves, A., & Casas-Méndez, B. (2024). On the influence of dependent features in classification problems: a game-theoretic perspective. arXiv preprint. doi:10.48550/arXiv.2408.02481.
# Example usage:
X <- matrix(rnorm(100), ncol=5)
Y <- sample(0:1, 20, replace=TRUE)
predictions(X, Y)