rfc.predict: Random Forest Classifier-based prediction

View source: R/MPMcore.R

rfc.predictR Documentation

Random Forest Classifier-based prediction

Description

Core function of the random forest classifier for malignancy prediction (Morphonode-RFC module). Given an ultrasound vector generated by set.rfcdata, this function yields a prediction of malignancy (y = 1) or non-malignancy (y = 0).

Usage

rfc.predict(u, rfc, recover = TRUE, ...)

Arguments

u

An ultrasound vector generated by set.rfcdata.

rfc

Random forest classifier as an object of class randomForest. The default classifier mpm.rfc$rfc can be used (see details).

recover

Logical value. If TRUE (default) the predictors with least out-of-bag error get the highest priority, in case of a tie.

...

Currently ignored.

Details

The default classifier (rfc = mpm.rfc$rfc) is a set of 5 RFCs are used to predict subject's phenotype (0: non-malignant, 1: malignant). Each RFC is trained through a 5-fold nested cross-validation procedure over 10000 random trees, with 3/14 randomly chosen variables per tree branching. Each of the 5 RFCs achieves and independent prediction and the majority wins. The input is the default simulated dataset (object mpm.us), of 948 subjects (508 non-malignant and 440 malignant profiles) and 14 ultrasound features. The dataset includes also the expected phenotype (y), the related metastatic risk signature (signature), and the Brier score (E) calculated during the cross-validation procedure.

Value

A list of 3 objects:

  1. "y.hat", final prediction;

  2. "decisions", prediction of each single RFC;

  3. "oob.error", out-of-bag error of each classifier in the ensemble.

Author(s)

Fernando Palluzzi fernando.palluzzi@gmail.com

References

Fragomeni SM, Moro F, Palluzzi F, Mascilini F, Rufini V, Collarino A, Inzani F, Giacò L, Scambia G, Testa AC, Garganese G (2022). Evaluating the risk of inguinal lymph node metastases before surgery using the Morphonode Predictive Model: a prospective diagnostic study. Ultrasound xx Xxxxxxxxxx xxx Xxxxxxxxxx. 00(0):000-000. <https://doi.org/00.0000/00000000000000000000>

Liaw A, Wiener M. Classification and Regression by randomForest (2002). R News, 2(3):18-22. <https://doi.org/10.1023/A:1010933404324>

See Also

See us.predict to launch all morphonode modules at once. See also topsim for a simple similarity search.

Examples


# Prepare a simulated malignant ultrasound profile
x <- new.profile(us.simulate(y = 1))
u <- set.rfcdata(x, ref = mpm.us[, 2:15], levels = mpm.levels)
print(u)

# Predict subject's phenotype
P <- rfc.predict(u$ultrasound, rfc = mpm.rfc$rfc)
print(P)


Morphonodepredictivemodel/morphonode documentation built on Feb. 15, 2023, 4:51 a.m.