Namespace Clustering

namespace clustering

Functions

void kMeans(af::array tss, int k, af::array &centroids, af::array &labels, float tolerance = 0.0000000001, int maxIterations = 100)

Calculates the k-means algorithm.

Parameters
  • tss: Expects an input array whose dimension zero is the length of the time series (all the same) and dimension one indicates the number of time series.
  • k: The number of means to be computed.
  • centroids: The resulting means or centroids.
  • labels: The resulting labels of each time series which is the closest centroid.
  • tolerance: The error tolerance to stop the computation of the centroids.
  • maxIterations: The maximum number of iterations allowed.

void kShape(af::array tss, int k, af::array &centroids, af::array &labels, float tolerance = 0.0000000001, int maxIterations = 100)

Calculates the k-shape algorithm.

Parameters
  • tss: Expects an input array whose dimension zero is the length of the time series (all the same) and dimension one indicates the number of time series.
  • k: The number of means to be computed.
  • centroids: The resulting means or centroids.
  • labels: The resulting labels of each time series which is the closest centroid.
  • tolerance: The error tolerance to stop the computation of the centroids.
  • maxIterations: The maximum number of iterations allowed.