# ComplementaryNBThetaTrainer

#### class ComplementaryNBThetaTrainer extends AnyRef

Trainer for the weight normalization vector used by Transform Weight Normalized Complement Naive Bayes. See: Rennie et.al.: Tackling the poor assumptions of Naive Bayes Text classifiers, ICML 2003, http://people.csail.mit.edu/jrennie/papers/icml03-nb.pdf Sec. 3.2.

Linear Supertypes
AnyRef, Any
Ordering
1. Alphabetic
2. By inheritance
Inherited
1. ComplementaryNBThetaTrainer
2. AnyRef
3. Any
1. Hide All
2. Show all
Visibility
1. Public
2. All

### Instance Constructors

1. #### new ComplementaryNBThetaTrainer(weightsPerFeature: Vector, weightsPerLabel: Vector, alphaI: Double = 1.0)

weightsPerFeature

a Vector of summed TF or TF-IDF weights for each word in dictionary.

weightsPerLabel

a Vector of summed TF or TF-IDF weights for each label.

alphaI

Laplace smoothing factor. Defaut value of 1.

### 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. #### final def eq(arg0: AnyRef): Boolean

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

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

getter for summed TF or TF-IDF weights by word.

getter for summed TF or TF-IDF weights by word.

feature

index of word.

returns

sum of TF or TF-IDF weights for word.

11. #### def finalize(): Unit

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

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

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

Definition Classes
Any
15. #### def labelWeight(label: Int): Double

getter for summed TF or TF-IDF weights by label

getter for summed TF or TF-IDF weights by label

label

index of label

returns

sum of word TF or TF-IDF weights for label

16. #### final def ne(arg0: AnyRef): Boolean

Definition Classes
AnyRef
17. #### final def notify(): Unit

Definition Classes
AnyRef
18. #### final def notifyAll(): Unit

Definition Classes
AnyRef
19. #### def retrievePerLabelThetaNormalizer: Vector

Getter for the weight normalizer vector as indexed by label

Getter for the weight normalizer vector as indexed by label

returns

a copy of the weight normalizer vector.

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

Definition Classes
AnyRef
21. #### def toString(): String

Definition Classes
AnyRef → Any
22. #### def train(label: Int, featurePerLabelWeight: Vector): Unit

Train the weight normalization vector for each label

Train the weight normalization vector for each label

label
featurePerLabelWeight

23. #### def updatePerLabelThetaNormalizer(label: Int, weight: Double): Unit

add the magnitude of the current weight to the current label's corresponding Vector element.

add the magnitude of the current weight to the current label's corresponding Vector element.

label

index of label to update.

weight

24. #### final def wait(): Unit

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

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

Definition Classes
AnyRef
Annotations
@throws( ... )