similarity_measures: Get premade similarity measure objects

View source: R/similarity_measures.R

similarity_measuresR Documentation

Get premade similarity measure objects

Description

This function allows retriving the ten ready-made similarity measure provided by this package. Custom similarity measures can also be made sim.measure-class.

Usage

similarity_measures(
  subset = c("pearson", "spearman", "kendall", "bray_curtis", "jaccard", "gen_jaccard",
    "mutual_information", "nc.score", "euclidean", "cosine")
)

Arguments

subset

The subset of the similarity measures to be returned. By default, all similarity measures are returned

Value

A list of the sim.measure objects defined by the function

See Also

sim.measure-class

Examples

library(micInt)
x <- rnorm(10,mean = 1, sd = 1)
y <- 0.5 * x + 0.5 * rnorm(10, mean =0,sd = sqrt(0.5))
sim_measures <- similarity_measures(subset = c("pearson","spearman"))
pearson_cor <- sim_measures[["pearson"]]
pearson_cor





AlmaasLab/micInt documentation built on April 1, 2022, 10:37 a.m.