us.predict: Morhonode Predictive Model (MPM) launcher

View source: R/MPMcore.R

us.predictR Documentation

Morhonode Predictive Model (MPM) launcher

Description

The us.predict function launches the 4 MPM modules: (i) malignancy prediction (Morphonode-RFC), (ii) malignancy risk estimation (Morphonode-RBM), (iii) malignancy risk signature detection (Morphonode-DT), and (iv) similarity profiling (Morphonode-SP). The MPM structure is described in Fragomeni et al. (2022). See also the details section.

Usage

us.predict(
  x,
  f = "cosine",
  levels = NULL,
  ref = NULL,
  rfc = NULL,
  rbm = NULL,
  k = 5,
  features = 2:15,
  orderbyDistance = FALSE,
  uncertainty = "loss",
  b0 = c(0, 0.028, 0.013),
  b = 0.055,
  rho = 0.9,
  wmax = 1,
  verbose = TRUE,
  ...
)

Arguments

x

Ultrasound profile generated by the function new.profile).

f

Similarity profiling core function: one between "cosine" (default) and "jaccard". The former directly compares ultrasound profiles, while the latter uses dichotomized versions of them (see also dichotomize).

levels

A list of length 14, corresponding to the levels of each ultrasound variable. Needed for categorical variables (factors); for continuous variables, it should assume the nominal value of 0. If NULL (default), the internal mpm.levels variable will be used.

ref

Reference ultrasound features dataset as a (n, 14) data.frame, with n being the number of subjects (rows). If NULL (default), the internal mpm.us variable will be used.

rfc

Random forest classifier as an object of class randomForest. If NULL (default), the internal mpm.rfc variable will be used.

rbm

Robust binomial model as a fitted model object of class glm. If NULL (default), the internal mpm.rbm variable will be used.

k

Numeric value defining the number of top-k profiles to return after similarity ranking (default = 5).

features

Indices of the features to be used for the similarity profiling (default = 2:15).

orderbyDistance

Logical value enabling sorting by increasing euclidean distance of the top-similar ultrasound profiles (default = FALSE).

uncertainty

Function used to compute the RFC prediction error. It can be one among "loss" (default) and "similarity". The former estimates the error on a new prediction based on a parametric linear relationship between the loss function and the observed (reference dataset) error. The latter estimates the error as the average of the observed errors of the top-3 similar profiles from the reference dataset (non-parametric).

b0

Baseline uncertainty. A vector of three values representing the intercept parameter when uncertainty = "loss". This value depends on the metastatic risk signature and it is fixed to 0 for the LMR one. The b0 values for MMR, HMR, and MET signatures are the first, second, and third element of the b0 argument, respectively (default = c(0, 0.028, 0.013)).

b

Uncertainty coefficient. A numeric value indicating the linear coefficient for the loss-to-error conversion equation.

rho

Numeric value between 0 and 1 denoting the minimum required similarity coefficient to make a naive estimation of the true outcome y = 0, 1. This guess is needed as a reference value for uncertainty calculation (default = 0.9).

wmax

Nominal value for the self-correlation coefficient (for visualization purposes only; default = 1).

verbose

If TRUE (default), a user-frienly summary of the prediction and estimation results is printed to screen.

...

Currently ignored.

Details

The MPM classifier (Morphonode-RFC module) is based on an ensemble of 5 RFCs. Each RFC is trained over 10000 random trees, with 3/14 randomly chosen variables per tree branching. The 5 RFCs yield independent predictions and the majority wins. This module provides a dichotomous phenotype classification in malignant (y = 1) and non-malignant (y = 0), and an estimation of the prediction error (E). Similarly, the Morphonode-RBM module provides a continuous estimate of malignancy (i.e., p = malignancy risk), through a binomial model with robust bootstrap standard error estimation (5000 bootstrap iterations). Optimal cutpoint estimations define two thresholds for p (three risk intervals): low risk (p < 0.23), moderate risk (0.23 <= p <= 0.29), and high risk (p > 0.29). In addition, Morphonode-DT model defines four metastatic risk signatures, strongly associated with the metastasis rate in the corresponding subjects. LMR (low metastatic risk) and MMR (moderate metastatic risk) signatures are associated with none-to-low metastasis rates. Conversely, HMR (high metastatic risk) and MET (metastatic) signatures are associated with a high risk of single and multiple metastatic events (lymph nodes), respectively. Finally, the Morphonode-SP module ranks ultrasound profiles from the reference dataset (by default, the internal simulated dataset) by similarity with respect to the input profile. This provides a supplementary support to the classification process, having only a secondary role compared to the other three modules. Generally, the majority of similar profiles should have the same outcome (y) as the input one.

Value

A list of 5 objects:

  1. "prediction" (Morphonode-RFC module), a list including:

    • y.hat: the final malignancy prediction,

    • decisions: the predictions of each RFC in the ensemble,

    • oob.err: out-of-bag errors of each RFC in the ensemble;

  2. "E", estimated overall prediction error (Morphonode-RFC module);

  3. "p", estimated malignancy risk(Morphonode-RBM module);

  4. "signature", metastatic risk signature (Morphonode-DT module);

  5. "profiles", data.frame containing the top-k similar profiles sorted by similarity (Morphonode-SP module). This data.frame includes:

    • ID: numeric value identifying a subject,

    • the 14 ultrasound features characterizing each subject,

    • y: the observed outcome,

    • E: subject-level estimated prediction error (Brier score),

    • R: similarity coefficient with the input profile,

    • D: euclidean distance from the input profile.

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 new.profile to create a new ultrasound profile. See also us.simulate for ultrasound data simulation.

Examples

# Create a simulated malignant ultrasound profile
x <- new.profile(us.simulate(y = 1))

# Lauch the Morhonode Predictive Model
u <- us.predict(x)


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