npdrDiff: npdrDiff

View source: R/nearestNeighbors.R

npdrDiffR Documentation

npdrDiff

Description

A diff is a function that computes the difference of values for an attribute between two instances. It is used for attribute selection for attribute diffs and phenotype diffs. This function is vectorized: input a and b can be two vectors of values for one attribute.

Usage

npdrDiff(
  a,
  b,
  diff.type = c("manhattan", "numeric-abs", "numeric-sqr", "allele-sharing",
    "match-mismatch", "correlation-data"),
  norm.fac = 1
)

Arguments

a

value of attribute for first instance. Vector for correlation-data.

b

value of attribute for second instance. Vector for correlation-data.

diff.type

Metric for the difference computation.

norm.fac

Normalization factor.

Value

Value or vector of differences between two vectors element-wise.


insilico/npdr documentation built on July 6, 2023, 1:14 p.m.