rfc.predict | R Documentation |
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).
rfc.predict(u, rfc, recover = TRUE, ...)
u |
An ultrasound vector generated by
|
rfc |
Random forest classifier as an object of class
|
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. |
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.
A list of 3 objects:
"y.hat", final prediction;
"decisions", prediction of each single RFC;
"oob.error", out-of-bag error of each classifier in the ensemble.
Fernando Palluzzi fernando.palluzzi@gmail.com
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 us.predict
to launch all
morphonode modules at once.
See also topsim
for a simple similarity
search.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.