Learn R Programming

KMDA (version 1.0)

dkernel: Distance-based Kernel

Description

This function defines a distance-based kernel function.

Usage

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.

Value

  • A positive real value.

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}{\rho}}$$

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

Run this code
x=rnorm(5)
	y=rnorm(5)
	dkernel(x,y,1)

Run the code above in your browser using DataLab