org.apache.mahout.classifier.naivebayes

NBModel

class NBModel extends Serializable

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

Instance Constructors

  1. new NBModel(weightsPerLabelAndFeature: Matrix = null, weightsPerFeature: Vector = null, weightsPerLabel: Vector = null, perlabelThetaNormalizer: Vector = null, labelIndex: Map[String, Integer] = null, alphaI: Float = 1.0, isComplementary: Boolean = false)

    weightsPerLabelAndFeature

    Aggregated matrix of weights of labels x features

    weightsPerFeature

    Vector of summation of all feature weights.

    weightsPerLabel

    Vector of summation of all label weights.

    perlabelThetaNormalizer

    Vector of weight normalizers per label (used only for complemtary models)

    labelIndex

    HashMap of labels and their corresponding row in the weightMatrix

    alphaI

    Laplace smoothing factor.

    isComplementary

    Whether or not this is a complementary 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. val alphaI: Float

    Laplace smoothing factor.

  7. val alphaVector: Vector

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def createScoringVector: Vector

    getter for a single empty vector of weights

  11. def dfsWrite(pathToModel: String)(implicit ctx: DistributedContext): Unit

    Write a trained model to the filesystem as a series of DRMs

    Write a trained model to the filesystem as a series of DRMs

    pathToModel

    Directory to which the model will be written

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

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

    Definition Classes
    AnyRef → Any
  14. def featureWeight(feature: Int): Double

    getter for summed feature weights.

    getter for summed feature weights. Used by legacy classifier

  15. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  18. val isComplementary: Boolean

    Whether or not this is a complementary model.

  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. val labelIndex: Map[String, Integer]

    HashMap of labels and their corresponding row in the weightMatrix

  21. def labelWeight(label: Int): Double

    getter for summed label weights.

    getter for summed label weights. Used by legacy classifier

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

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

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

    Definition Classes
    AnyRef
  25. val numFeatures: Double

  26. def numLabels: Int

    getter for a the number of labels to consider

  27. val perlabelThetaNormalizer: Vector

    Vector of weight normalizers per label (used only for complemtary models)

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

    Definition Classes
    AnyRef
  29. def thetaNormalizer(label: Int): Double

    getter for weight normalizers.

    getter for weight normalizers. Used by legacy classifier

  30. def toString(): String

    Definition Classes
    AnyRef → Any
  31. val totalWeightSum: Double

  32. def validate(): Unit

    Model Validation

  33. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. def weight(label: Int, feature: Int): Double

    getter for individual aggregated weights.

    getter for individual aggregated weights. Used by legacy classifier

  37. val weightsPerFeature: Vector

    Vector of summation of all feature weights.

  38. val weightsPerLabel: Vector

    Vector of summation of all label weights.

  39. val weightsPerLabelAndFeature: Matrix

    Aggregated matrix of weights of labels x features

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped