Cluster

scalation.modeling.clustering.Cluster
See theCluster companion object
case class Cluster(c: Int, var np: Int)

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.

Value parameters

c

the cluster id

np

the number of points in the cluster (size)

Attributes

See also

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

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def cen: VectorD

Return the stored centroid for this cluster.

Return the stored centroid for this cluster.

Attributes

def cenf(x: MatrixD, to_c: Array[Int]): VectorD

Calculate the centroid for this cluster.

Calculate the centroid for this cluster.

Value parameters

to_c

the data point assignment function

x

the data matrix where each row is a data point

Attributes

def set_cen(cn: VectorD): Unit

Set the centroid for this cluster.

Set the centroid for this cluster.

Value parameters

cn

the calculated centroid

Attributes

def set_sse(ss: Double): Unit

Set the sum of squared error for this cluster.

Set the sum of squared error for this cluster.

Value parameters

ss

the calculated sum of squared errors

Attributes

def sse: Double

Return the stored sum of squared errors for this cluster.

Return the stored sum of squared errors for this cluster.

Attributes

def ssef(x: MatrixD, to_c: Array[Int], cn: VectorD): Double

Calculate the sum of squared errors for this cluster.

Calculate the sum of squared errors for this cluster.

Value parameters

cn

the hypothetical centroid (defaults to current centroid)

to_c

the data point assignment function

x

the data matrix where each row is a data point

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product