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
- Alphabetic
- By Inheritance
- Cluster
- Serializable
- Serializable
- Product
- Equals
- Error
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Cluster(c: Int = Cluster.next (), np: Int = 0)
- c
the cluster id
- np
the number of points in the cluster (size)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val c: Int
-
def
cen: VectoD
Return the stored centroid for this cluster.
-
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
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
flaw(method: String, message: String): Unit
- Definition Classes
- Error
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- var np: Int
-
def
set_cen(cn: VectoD): Unit
Set the centroid for this cluster.
Set the centroid for this cluster.
- cn
the calculated centroid
-
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
-
def
sse: Double
Return the stored sum of squared errors for this cluster.
-
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)
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated