noisify: Noisify

View source: R/similarity_measures.R

noisifyR Documentation

Noisify

Description

Creates similarity measure functions which adds random noise at certain magnitude to the data before calculating the similarity score

Usage

noisify(
  sim.scores = mean_scale(),
  magnitude = 1e-05,
  noise = c("none", "uniform", "normal")
)

Arguments

sim.scores

The list of objects of class sim.measure to nosify

magnitude

The magnitude of the noise to add. This is: The standard deviation for normal noise and the radius for the interval for uniform noise

noise

The type of noise to add. 'none' just returns the similarity measure without doing anything. 'uniform' adds uniformly distributed noise 'normal' adds normaly distributed noise Any combination of the options can be passes as a character vector. In this case, sim.score functions are returned for the selected types of noise.

Value

A list of sim.measure objects corresponding to the input where noise have been added

Examples

library(micInt)
sim_measures <- similarity_measures(subset = c("pearson","spearman","jaccard"))
noised_sim_measures <- noisify(sim_measures,magnitude = 1e-3,noise = c("normal"))
noised_sim_measures
# Notice that jaccard_normal is missing

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