Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mahal.dist

Calculate mahalanobis distances


Description

Calculates mahalanobis distances

Usage

mahal.dist(data, train, labels = NULL)

Arguments

data

A matrix of numerical data points.

train

A gaussian model as returned by the train function.

labels

A vector of labels..

Details

The train function finds the centroids and covariance matrices for a set of data and corresponding labels: one per unique label. This function can be used to find the mahalanobis distance of every data point in a dataset to each of the class centroids. The columns of the resulting matrix are marked with the label of the centroid to which they refer. The function mahal should be used if you want to find the closest centroid to each data point.

Value

A matrix of distances with one column for every class (label) in the gaussian model.

See Also

train, mahal, bayes.lab, bayes.dist


emuR

Main Package of the EMU Speech Database Management System

v2.2.0
GPL (>= 2)
Authors
Raphael Winkelmann [aut, cre], Klaus Jaensch [aut, ctb], Steve Cassidy [aut, ctb], Jonathan Harrington [aut, ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.