topsim | R Documentation |
Vector similarity search across a reference dataset.
topsim( v, x = mpm.us, f = "cosine", k = 5, p = 0.7, features = 2:15, check.data = TRUE, ... )
v |
An input vector of length equal to the number of columns of the reference data.frame (see below). |
x |
Reference data.frame. If no reference is specified,
the default simulated dataset (object |
f |
Similarity function. Available functions: "cosine", "jaccard", "euclidean", "pearson", "spearman", "kendall" (default = "cosine"). |
k |
Numeric value defining the number of top-k profiles to return after similarity ranking (default = 5). |
p |
Continuous value from 0 to 1 representing the minimum similarity value for an ultrasound profile to be included in the output (default = 0.7). |
features |
Indices of the features (columns) in |
check.data |
Logical value. If TRUE (default), the input data type is checked. |
... |
Currently ignored. |
A list of 4 objects:
"signature", metastatic risk signature (MRS);
"p", MRS-associated malignancy risk (evaluated as positive predictive value, according to Fragomeni et al. 2022);
"ci95", 95
"y.uss", naive guess of the outcome (0: non-malignant, 1: malignant), based on the MRS (this will be less accurate than the RFC-based prediction).
Fernando Palluzzi fernando.palluzzi@gmail.com
Leydesdorff L (2005). Similarity Measures, Author Cocitation Analysis,and Information Theory. In: JASIST 56(7), pp.769-772. <https://doi.org/10.48550/arXiv.0911.4292>
See us.predict
to launch all
morphonode modules at once.
See also ranksim
for ultrasound profile
similarity ranking.
# 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) # Top-similar profiles sim <- topsim(u$ultrasound) print(sim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.