Packages

c

scalation.analytics.fda

KMeansClustering_F

class KMeansClustering_F extends Clusterer

The KMeansClustering_F class provides a simple form of k-means clustering that simply smoothes the data and then appliers KMeansClustering.

Linear Supertypes
Clusterer, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KMeansClustering_F
  2. Clusterer
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KMeansClustering_F(x: MatrixD, t: VectorD, τ: VectorD, k: Int)

    x

    the vectors/points to be clustered stored as rows of a matrix

    t

    the time points

    τ

    the time points for knots

    k

    the number of clusters to make

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def calcCentroids(x: MatriD, to_c: Array[Int], sz: VectoI, cent: MatriD): Unit

    Calculate the centroids based on current assignment of points to clusters and update the 'cent' matrix that stores the centroids in its rows.

    Calculate the centroids based on current assignment of points to clusters and update the 'cent' matrix that stores the centroids in its rows.

    x

    the data matrix holding the points {x_i = x(i)} in its rows

    to_c

    the cluster assignment array

    sz

    the sizes of the clusters (number of points)

    cent

    the matrix holding the centroids in its rows

    Definition Classes
    Clusterer
  6. def centroids: MatrixD

    As seen from class KMeansClustering_F, the missing signatures are as follows.

    As seen from class KMeansClustering_F, the missing signatures are as follows. For convenience, these are usable as stub implementations.

    Definition Classes
    KMeansClustering_FClusterer
  7. def checkOpt(x: MatriD, to_c: Array[Int], opt: Double): Boolean

    Check to see if the sum of squared errors is optimum.

    Check to see if the sum of squared errors is optimum.

    x

    the data matrix holding the points

    to_c

    the cluster assignments

    opt

    the known (from human/oracle) optimum

    Definition Classes
    Clusterer
  8. def classify(y: VectorD): Int

    Given a new point/vector 'y', determine which cluster it belongs to, i.e., the cluster whose centroid it is closest to.

    Given a new point/vector 'y', determine which cluster it belongs to, i.e., the cluster whose centroid it is closest to.

    y

    the vector to classify

  9. def classify(y: VectoD): Int

    Given a new point/vector z, determine which cluster it belongs to.

    Given a new point/vector z, determine which cluster it belongs to.

    Definition Classes
    KMeansClustering_FClusterer
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  11. def cluster(): Array[Int]

    Create 'k' clusters consisting of points/rows that are closest to each other.

    Create 'k' clusters consisting of points/rows that are closest to each other.

    Definition Classes
    KMeansClustering_FClusterer
  12. def csize: VectorI

    Return the sizes (number of points within) of the clusters.

    Return the sizes (number of points within) of the clusters. Should only be called after 'train'.

    Definition Classes
    KMeansClustering_FClusterer
  13. def distance(u: VectoD, cn: MatriD, kc_: Int = -1): VectoD

    Compute the distances between vector/point 'u' and the points stored as rows in matrix 'cn'

    Compute the distances between vector/point 'u' and the points stored as rows in matrix 'cn'

    u

    the given vector/point (u = x_i)

    cn

    the matrix holding several centroids

    kc_

    the number of centroids so far

    Definition Classes
    Clusterer
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def initCentroids(): Boolean
    Definition Classes
    Clusterer
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. def name(c: Int): String

    Return the name of the 'c'-th cluster.

    Return the name of the 'c'-th cluster.

    c

    the c-th cluster

    Definition Classes
    Clusterer
  21. def name_(nm: Strings): Unit

    Set the names for the clusters.

    Set the names for the clusters.

    nm

    the array of names

    Definition Classes
    Clusterer
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. def setStream(s: Int): Unit

    Set the random stream to 's'.

    Set the random stream to 's'. Method must be called in implemeting classes before creating any random generators.

    s

    the new value for the random number stream

    Definition Classes
    Clusterer
  26. def sse(x: MatriD, c: Int, to_c: Array[Int]): Double

    Compute the sum of squared errors from the points in cluster 'c' to the cluster's centroid.

    Compute the sum of squared errors from the points in cluster 'c' to the cluster's centroid.

    x

    the data matrix holding the points

    c

    the current cluster

    to_c

    the cluster assignments

    Definition Classes
    Clusterer
  27. def sse(x: MatriD, to_c: Array[Int]): Double

    Compute the sum of squared errors within all clusters, where error is indicated by e.g., the distance from a point to its centroid.

    Compute the sum of squared errors within all clusters, where error is indicated by e.g., the distance from a point to its centroid.

    x

    the data matrix holding the points

    to_c

    the cluster assignments

    Definition Classes
    Clusterer
  28. def sst(x: MatriD): Double

    Compute the sum of squares total for all the points from the mean.

    Compute the sum of squares total for all the points from the mean.

    x

    the data matrix holding the points

    Definition Classes
    Clusterer
  29. val stream: Int
    Attributes
    protected
    Definition Classes
    Clusterer
  30. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  31. def toString(): String
    Definition Classes
    AnyRef → Any
  32. def train(): Clusterer

    Given a set of points/vectors, put them in clusters, returning the cluster assignments.

    Given a set of points/vectors, put them in clusters, returning the cluster assignments. A basic goal is to minimize the sum of squared errors (sse) in terms of squared distances of points in the cluster to its centroid.

    Definition Classes
    KMeansClustering_FClusterer
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Clusterer

Inherited from AnyRef

Inherited from Any

Ungrouped