cit.distToCentroids

Description

calculate distance between individuals and centroids; used in cit.centroids()

Usage

1
2
3
4
5
6
7
8
9
cit.distToCentroids(d,
centroids,
dist.meth=c("spearman","euclidian","maximum","manhattan",
"canberra","binary","minkowski","pearson","dlda","dqda"),
maxDist=0.5,
d.isPretreated=FALSE,
sdifftop=NULL,
sdisttocent=NULL,
verbose=FALSE)

Arguments

d

a data.frame of numeric data

centroids

object obtained via a call to cit.centroids() (see slot 'centroids')

dist.meth

distance method used to calculate distance between individuals (columns in d) and centroids

maxDist

individuals for which nearest centroid is above this threshold are discarted (used only if dis.meth = "pearson" or "spearman")

d.isPretreated

indicate wether d is pretreated (row aggregation, row centering)...for internal use

sdifftop

cut-off on the diffences between distances to centroids. If the distance is inferior to this cut-off for n centroids the sample is assigned to the n groups in the output variable predmixed. If NULL, the cut-off is defined as the 1st decile of the difference between the top 2 closest centroids on data used to compute centroids.

sdisttocent

cut-off on the mad (median absolute deviation) of distances to the centroid to define a sample as outlier. If the distance to the centroid of the assigned group is superior to sdisttocent*mad(distances of centroids samples to this centroid)

verbose

boolean if output should be displayed

Value

a list giving the distance between individuals and centroids and the predicted class for each individuals

Note

This is a contribution from the Tumor Identity Cards (CIT) program founded by the 'Ligue Nationale Contre le Cancer' (France): http://cit.ligue-cancer.net. For any question please contact CITR@ligue-cancer.net

Author(s)

Aurelien de Reynies, Laetitia Marisa