com.redhat.et.silex.cluster

KMedoidsModel

class KMedoidsModel[T] extends Serializable

Represents a K-Medoids clustering model

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. KMedoidsModel
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KMedoidsModel(medoids: Seq[T], metric: (T, T) ⇒ Double)

    medoids

    The collection of cluster medoids that embodies the model

    metric

    The metric function over data elements asumed by the model

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def computeCost(data: RDD[T], normalized: Boolean = false): Double

    Return the model cost with respect to the given data

    Return the model cost with respect to the given data

    Model cost is defined as the sum of closest-distances over the data elements

    data

    The input data to compute the cost over

    normalized

    If true, compute cost normalized by number of data elements. Defaults to false.

    returns

    The sum of closest-distances over the data elements

  9. def cost(data: RDD[T], normalized: Boolean = false): Double

    Return the model cost with respect to the given data

    Return the model cost with respect to the given data

    Model cost is defined as the sum of closest-distances over the data elements

    data

    The input data to compute the cost over

    normalized

    If true, compute cost normalized by number of data elements. Defaults to false.

    returns

    The sum of closest-distances over the data elements

  10. lazy val distance: (T) ⇒ Double

    The model distance function: maps an element to its distance to the closest medoid

  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. def k: Int

    The number of medoids in the model

  18. val medoids: Seq[T]

    The collection of cluster medoids that embodies the model

  19. val metric: (T, T) ⇒ Double

    The metric function over data elements asumed by the model

  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. def predict(points: RDD[T]): RDD[Int]

    Return an RDD produced by predicting the closest medoid to each row

    Return an RDD produced by predicting the closest medoid to each row

    points

    An RDD whose rows are elements of the data space

    returns

    An RDD whose rows are the corresponding indices of the closest medoids

  24. def predict(point: T): Int

    Return the index of the medoid closest to the input

    Return the index of the medoid closest to the input

    point

    An element of the data space

    returns

    The index of the medoid closest to the input

  25. def predictBy[O, V](obj: O)(f: (O) ⇒ (T, V)): (Int, V)

    Extracts a data object and a tag value from another data structure, and returns the index of closest cluster, paired with the tag value

    Extracts a data object and a tag value from another data structure, and returns the index of closest cluster, paired with the tag value

    obj

    An object containing a data point and an associated tag value

    f

    Function to extract data point and the tag value from 'obj'

    returns

    A pair value (j, v) where (j) is index of closest cluster and (v) is the associated tag value

  26. def predictWithDistance(point: T): (Int, Double)

    Returns the index of closest cluster, paired with corresponding distance

    Returns the index of closest cluster, paired with corresponding distance

    point

    A data object

    returns

    Pair (j, d) with (j) the closest cluster index and (d) the corresponding distance

  27. def predictWithDistanceBy[O, V](obj: O)(f: (O) ⇒ (T, V)): (Int, Double, V)

    Extracts a data object and a tag value from another data structure, and returns the index of closest cluster, with the corresponding distance and associated tag value

    Extracts a data object and a tag value from another data structure, and returns the index of closest cluster, with the corresponding distance and associated tag value

    obj

    An object containing a data point and an associated tag value

    f

    Function to extract data point and tag value from 'obj'

    returns

    A tuple (j, d, v) where (j) is index of closest cluster, (d) is corresponding distance, and (v) is the associated tag value

  28. lazy val predictor: (T) ⇒ Int

    The model prediction function: maps an element to the index of the closest medoid

  29. lazy val predictorWithDistance: (T) ⇒ (Int, Double)

    Returns index of closest medoid, paired with its distance to that medoid

  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  31. def toString(): String

    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  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( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped