C# Класс CanvasCommon.DensityClusteringModel

This class implements Density Clustering algorithm introduced in Rodriguez, Alex, and Alessandro Laio. "Clustering by fast search and find of density peaks." Science 344.6191 (2014): 1492-1496. The principle class members are Centroids (Delta in paper) and Rho that are defined as follows: fiven distance matric d[i,j] and distanceThreshold, for each data point i compure Rho(i) = total number of data points within distanceThreshold Centroids(i) = distance of the closes data point of higher density (min(d[i,j] for all j:=Rho(j)>Rho(i)))
Показать файл Открыть проект

Открытые методы

Метод Описание
DensityClusteringModel ( List segments, double coverageWeightingFactor, double knearestNeighbourCutoff, double centroidsCutoff ) : System
EstimateDc ( double neighborRateLow = NeighborRateLow, double neighborRateHigh = NeighborRateHigh ) : double

neighborRate = average of number of elements of comb per row that are less than dc minus 1 divided by size

EstimateDistance ( ) : void

Compute lower triangle of the distance matrix stored by columns in a vector. If n is the number of observations, then for i < j <= n, the dissimilarity between (column) i and (row) j is retrieved from index [n*i - i*(i+1)/2 + j-i+1]. The length of the distance vector is n*(n-1)/2.

FindCentroids ( ) : void

Estimate Centroids value as Centroids(i) = distance of the closes data point of higher density (min(d[i,j] for all j:=Rho(j)>Rho(i)))

FindClusters ( double rhoCutoff = RhoCutoff ) : int
GaussianLocalDensity ( double distanceThreshold ) : void
GetCentroidsCoverage ( ) : List
GetCentroidsMAF ( ) : List
GetSegmentsForClustering ( List segments ) : int

Only use segments with non-null MAF values

NonGaussianLocalDensity ( double distanceThreshold ) : void

Приватные методы

Метод Описание
GetDistance ( int segmentsLength, int tmpIndex, int runOrderIndex ) : double?

Helper method for FindClusters

GetEuclideanDistance ( double coverage, double coverage2, double maf, double maf2 ) : double

Return the squared euclidean distance between (coverage, maf) and (coverage2, maf2) in scaled coverage/MAF space. https://en.wikipedia.org/wiki/Euclidean_distance

Описание методов

DensityClusteringModel() публичный Метод

public DensityClusteringModel ( List segments, double coverageWeightingFactor, double knearestNeighbourCutoff, double centroidsCutoff ) : System
segments List
coverageWeightingFactor double
knearestNeighbourCutoff double
centroidsCutoff double
Результат System

EstimateDc() публичный Метод

neighborRate = average of number of elements of comb per row that are less than dc minus 1 divided by size
public EstimateDc ( double neighborRateLow = NeighborRateLow, double neighborRateHigh = NeighborRateHigh ) : double
neighborRateLow double
neighborRateHigh double
Результат double

EstimateDistance() публичный Метод

Compute lower triangle of the distance matrix stored by columns in a vector. If n is the number of observations, then for i < j <= n, the dissimilarity between (column) i and (row) j is retrieved from index [n*i - i*(i+1)/2 + j-i+1]. The length of the distance vector is n*(n-1)/2.
public EstimateDistance ( ) : void
Результат void

FindCentroids() публичный Метод

Estimate Centroids value as Centroids(i) = distance of the closes data point of higher density (min(d[i,j] for all j:=Rho(j)>Rho(i)))
public FindCentroids ( ) : void
Результат void

FindClusters() публичный Метод

public FindClusters ( double rhoCutoff = RhoCutoff ) : int
rhoCutoff double
Результат int

GaussianLocalDensity() публичный Метод

public GaussianLocalDensity ( double distanceThreshold ) : void
distanceThreshold double
Результат void

GetCentroidsCoverage() публичный Метод

public GetCentroidsCoverage ( ) : List
Результат List

GetCentroidsMAF() публичный Метод

public GetCentroidsMAF ( ) : List
Результат List

GetSegmentsForClustering() публичный Метод

Only use segments with non-null MAF values
public GetSegmentsForClustering ( List segments ) : int
segments List
Результат int

NonGaussianLocalDensity() публичный Метод

public NonGaussianLocalDensity ( double distanceThreshold ) : void
distanceThreshold double
Результат void