dkernel: Distance-based Kernel

Description Usage Arguments Details Value References See Also Examples

Description

This function defines a distance-based kernel function.

Usage

1
dkernel(x, y, rho)

Arguments

x

a numerical scalar or vector of metabolomic measurements.

y

a numerical scalar or vector of metabolomic measurements.

rho

a positve real number, determining the smoothness of the kernel function.

Details

This function calculates a distance-based kernel function dkernel between two metabolomic measurements x and y. It first calculates the distance between x and y (see function mdist for more details). Then the kernel function dkernel is calculated as

dkernel(x,y)=exp\{ \frac{-mdist(x,y)^2}{ρ}\}

Value

A positive real value.

References

Zhan, X., Patterson, A. D., & Ghosh, D. (2015). Kernel approaches for differential expression analysis of mass spectrometry-based metabolomics data. BMC Bioinformatics, 16(1), 77.

See Also

mdist

Examples

1
2
3
	x=rnorm(5)
	y=rnorm(5)
	dkernel(x,y,1)	

KMDA documentation built on May 2, 2019, 3:59 p.m.