Class

com.tencent.angel.ml.clustering.kmeans

KMeansLearner

Related Doc: package kmeans

Permalink

class KMeansLearner extends MLLearner

Linear Supertypes
MLLearner, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KMeansLearner
  2. MLLearner
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KMeansLearner(ctx: TaskContext)

    Permalink

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. val C: Double

    Permalink
  5. val K: Int

    Permalink
  6. val LOG: Log

    Permalink
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def batchGenerator(trainData: DataBlock[LabeledData], batchData: Array[LabeledData], batchNum: Int): Iterator[Unit]

    Permalink

    Pick up #batch_sample_num samples randomly from the trainning data.

  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def computeObjValue(dataStorage: DataBlock[LabeledData], epoch: Int): Double

    Permalink

    Compute the objective values of all samples, which is measured by the distance from a sample to its closest center.

    Compute the objective values of all samples, which is measured by the distance from a sample to its closest center.

    dataStorage

    : the trainning dataset

    epoch

    : the epoch number

  11. val conf: Configuration

    Permalink
    Definition Classes
    MLLearner
  12. val ctx: TaskContext

    Permalink
    Definition Classes
    MLLearner
  13. val epochNum: Int

    Permalink
  14. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  18. val globalMetrics: GlobalMetrics

    Permalink
    Definition Classes
    MLLearner
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. val indexRange: Long

    Permalink
  21. def initKCentersRandomly(dataStorage: DataBlock[LabeledData]): Unit

    Permalink

    Pick up K samples as initial centers randomly, and push them to PS.

    Pick up K samples as initial centers randomly, and push them to PS.

    dataStorage

    : trainning data storage, the cluster center candidates

  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. val kmeansModel: KMeansModel

    Permalink
  24. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  27. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  29. def train(trainData: DataBlock[LabeledData], valiData: DataBlock[LabeledData]): MLModel

    Permalink

    Train a ML Model

    Train a ML Model

    trainData

    : input train data storage

    valiData

    : validate data storage

    returns

    : a learned model

    Definition Classes
    KMeansLearnerMLLearner
  30. def trainOneEpoch(epoch: Int, trainData: DataBlock[LabeledData], per_center_step_counts: Array[Int]): Unit

    Permalink

    Each epoch updation is performed in three steps.

    Each epoch updation is performed in three steps. First, pull the centers updated by last epoch from PS. Second, a mini batch of size batch_sample_num is sampled. Third, update the centers in a mini-batch way.

    trainData

    : the trainning data storage

    per_center_step_counts

    : the array caches the number of samples per center

  31. def updateCenters(oldCenters: ArrayList[Vector], oldVs: Vector): Unit

    Permalink
  32. final def wait(): Unit

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

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

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

Inherited from MLLearner

Inherited from AnyRef

Inherited from Any

Ungrouped