IterativeClustering Module

Types

Type Description

CentroidsFactory<'a>

KClusteringResult<'a>

Result of a kmeans clustering

ToCentroid<'a>

Functions and values

Function or value Description

Dispersion dist lCentroids dataset

Full Usage: Dispersion dist lCentroids dataset

Parameters:
    dist : Distance<'a> -
    lCentroids : 'a list -
    dataset : seq<'a> -

Returns: float

Calculates the average squared distance from the data points
to the cluster centroid (also refered to as error)

dist : Distance<'a>

lCentroids : 'a list

dataset : seq<'a>

Returns: float

Example

DispersionOfClusterResult kmeansResult

Full Usage: DispersionOfClusterResult kmeansResult

Parameters:
Returns: float

Calculates the average squared distance from the data points
to the cluster centroid (also refered to as error)

kmeansResult : KClusteringResult<'a>

Returns: float

Example

avgCentroid current sample

Full Usage: avgCentroid current sample

Parameters:
    current : float[]
    sample : float[] array

Returns: float[]
current : float[]
sample : float[] array
Returns: float[]

compute dist factory aggregator dataset k

Full Usage: compute dist factory aggregator dataset k

Parameters:
Returns: KClusteringResult<'a>
dist : Distance<'a>
factory : CentroidsFactory<'a>
aggregator : ToCentroid<'a>
dataset : 'a array
k : int
Returns: KClusteringResult<'a>

createKClusteringResult centroids classifier closestDistances distanceMetric

Full Usage: createKClusteringResult centroids classifier closestDistances distanceMetric

Parameters:
    centroids : (int * 'a) array -
    classifier : 'a -> int * 'a -
    closestDistances : (int * float) array -
    distanceMetric : Distance<'a> -

Returns: KClusteringResult<'a>

Creates a k-clustering result

centroids : (int * 'a) array

classifier : 'a -> int * 'a

closestDistances : (int * float) array

distanceMetric : Distance<'a>

Returns: KClusteringResult<'a>

Example

initCVMAX sampleRows k

Full Usage: initCVMAX sampleRows k

Parameters:
    sampleRows : float[][]
    k : int

Returns: float[][]
sampleRows : float[][]
k : int
Returns: float[][]

kmeans dist factory dataset k

Full Usage: kmeans dist factory dataset k

Parameters:
Returns: KClusteringResult<float[]>
dist : Distance<float[]>
factory : CentroidsFactory<float[]>
dataset : float[] array
k : int
Returns: KClusteringResult<float[]>

nearest dist lCentroids datapoint

Full Usage: nearest dist lCentroids datapoint

Parameters:
    dist : Distance<'a>
    lCentroids : 'a array
    datapoint : 'a

Returns: int * 'a
dist : Distance<'a>
lCentroids : 'a array
datapoint : 'a
Returns: int * 'a

nearestDistance dist lCentroids datapoint

Full Usage: nearestDistance dist lCentroids datapoint

Parameters:
    dist : Distance<'a> -
    lCentroids : 'a array -
    datapoint : 'a -

Returns: float

Calculates the distance from the data point to the centroid

dist : Distance<'a>

lCentroids : 'a array

datapoint : 'a

Returns: float

Example

randomCentroids rng sample k

Full Usage: randomCentroids rng sample k

Parameters:
    rng : Random
    sample : 'a array
    k : int

Returns: 'a[]
rng : Random
sample : 'a array
k : int
Returns: 'a[]