trait DiscreteKMeansMixtureModel[D <: DiscreteDistr[Int]] extends DiscreteMixtureModel[Int, D]
- Alphabetic
- By Inheritance
- DiscreteKMeansMixtureModel
- DiscreteMixtureModel
- Logging
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
initializeDistribution(mean: Double, sigma: Double): D
Initializes the distributions, given a mean and a sigma.
Initializes the distributions, given a mean and a sigma.
- mean
Mean for an initial distribution.
- sigma
Standard deviation for an initial distribution.
- returns
Returns a distribution.
- Attributes
- protected
Concrete 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
-
def
classMembership(value: Int, weighting: Array[Double], distributions: Array[D]): (Array[Double], Double)
Computes the assignment weights of a single point to the different distributions that we are fitting.
Computes the assignment weights of a single point to the different distributions that we are fitting.
- value
The value of this point.
- weighting
An array containing the weights of all current distributions.
- distributions
An array containing all distributions we have fit.
- returns
Returns a tuple containing the per-point weights of all distributions, and the expected complete log likelihood contribution of this point.
- Attributes
- protected
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
debug(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
debug(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
debug(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
eStep(rdd: RDD[Int], distributions: Array[D], weighting: Array[Double])(implicit dTag: ClassTag[D]): (RDD[Array[Double]], Double)
Implements the basic expectation stage for most EM algorithms.
Implements the basic expectation stage for most EM algorithms. Algorithms that diverge from the traditional E step should override this method.
- rdd
An RDD of data points.
- distributions
An array containing the distributions fit in the last iteration. This array should contain k distributions, where k is the number of components in the mixture.
- weighting
The weights of the different distributions.
- returns
Returns an RDD of assignments to classes, and the total ECLL.
- Attributes
- protected
-
def
em(rdd: RDD[Int], initialDistributions: Array[D], maxIterations: Int, initialWeights: Array[Double])(implicit dTag: ClassTag[D]): Array[D]
Runs an EM loop to fit a mixture model.
Runs an EM loop to fit a mixture model.
- rdd
An RDD of doubles to fit the mixture model to.
- initialDistributions
The initial distributions to start running EM from.
- maxIterations
The maximum number of iterations to run.
- returns
Returns an array of fit distributions.
- Attributes
- protected
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
error(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
error(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
error(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
info(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
info(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
info(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
isDebugEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
isErrorEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
isInfoEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isTraceEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
isWarnEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
logger: Logger
- Attributes
- protected
- Definition Classes
- Logging
-
def
loggerName: String
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
trace(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
trace(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
trace(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
train(rdd: RDD[Int], k: Int, maxIterations: Int)(implicit dTag: ClassTag[D]): Array[D]
Trains a mixture model on an integer dataset.
Trains a mixture model on an integer dataset.
- rdd
Dataset to fit model to.
- k
Number of mixture components.
- returns
Returns an array of distributions.
- Definition Classes
- DiscreteKMeansMixtureModel → DiscreteMixtureModel
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
warn(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
warn(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
warn(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging