case class Cluster(c: Int = Cluster.next (), np: Int = 0) extends Error with Product with Serializable

The Cluster case class maintains information about clusters, the cluster id, center/centroid, cluster size, and measure of error. Note: the cluster assignment function as an array 'to_c' indicates how points are assigned to clusters.

c

the cluster id

np

the number of points in the cluster (size)

See also

package.scala for the definition of the 'distance' method

Linear Supertypes
Serializable, Serializable, Product, Equals, Error, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Cluster
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Error
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Cluster(c: Int = Cluster.next (), np: Int = 0)

    c

    the cluster id

    np

    the number of points in the cluster (size)

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. val c: Int
  6. def cen: VectoD

    Return the stored centroid for this cluster.

  7. def cenf(x: MatriD, to_c: Array[Int]): VectoD

    Calculate the centroid for this cluster.

    Calculate the centroid for this cluster.

    x

    the data matrix where each row is a data point

    to_c

    the data point assignment function

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. final def flaw(method: String, message: String): Unit
    Definition Classes
    Error
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. var np: Int
  17. def set_cen(cn: VectoD): Unit

    Set the centroid for this cluster.

    Set the centroid for this cluster.

    cn

    the calculated centroid

  18. def set_sse(ss: Double): Unit

    Set the sum of squared error for this cluster.

    Set the sum of squared error for this cluster.

    ss

    the calculated sum of squared errors

  19. def sse: Double

    Return the stored sum of squared errors for this cluster.

  20. def ssef(x: MatriD, to_c: Array[Int], cn: VectoD = cen): Double

    Calculate the sum of squared errors for this cluster.

    Calculate the sum of squared errors for this cluster.

    x

    the data matrix where each row is a data point

    to_c

    the data point assignment function

    cn

    the hypothetical centroid (defaults to current centroid)

  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  24. 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 Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Error

Inherited from AnyRef

Inherited from Any

Ungrouped