Class/Object

io.radanalytics.silex.cluster

KMedoidsModel

Related Docs: object KMedoidsModel | package cluster

Permalink

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
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

    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: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

    Permalink

    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

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

    Permalink

    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

  8. lazy val distance: (T) ⇒ Double

    Permalink

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  15. def k: Int

    Permalink

    The number of medoids in the model

  16. val medoids: Seq[T]

    Permalink

    The collection of cluster medoids that embodies the model

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

    Permalink

    The metric function over data elements asumed by the model

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

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

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

    Permalink

    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

  22. def predict(point: T): Int

    Permalink

    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

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

    Permalink

    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

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

    Permalink

    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

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

    Permalink

    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

  26. lazy val predictor: (T) ⇒ Int

    Permalink

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

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

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped