object BayesClassifier
The BayesClassifier
object provides factory methods for building Bayesian
Classifiers.
- Alphabetic
- By Inheritance
- BayesClassifier
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- val RANDOMIZED: Boolean
Use randomized cross-validation
- val XFOLD: Int
Perform XFOLD cross-validation
- def apply(xy: MatriI, fn: Strings, k: Int, cn: Strings, vc: Array[Int], thres: Double, me: Float): TwoBAN_OS
Build a Bayesian Network (2-BAN-OS) classification model, passing 'x' and 'y' together in one matrix.
Build a Bayesian Network (2-BAN-OS) classification model, passing 'x' and 'y' together in one matrix.
- xy
the data vectors along with their classifications stored as rows of a matrix
- fn
the names of the features
- k
the number of classes
- cn
the names for all classes
- vc
the value count (number of distinct values) for each feature
- thres
the correlation threshold between 2 features for possible parent-child relationship
- me
use m-estimates (me == 0 => regular MLE estimates)
- def apply(x: MatriI, y: VectoI, fn: Strings, k: Int, cn: Strings, vc: Array[Int], thres: Double, me: Float): TwoBAN_OS
Create a Bayesian Network (2-BAN-OS) classification model.
Create a Bayesian Network (2-BAN-OS) classification model.
- x
the integer-valued data vectors stored as rows of a matrix
- y
the class vector, where y(l) = class for row l of the matrix, x(l)
- fn
the names for all features/variables
- k
the number of classes
- cn
the names for all classes
- vc
the value count (number of distinct values) for each feature
- thres
the correlation threshold between 2 features for possible parent-child relationship
- me
use m-estimates (me == 0 => regular MLE estimates)
- def apply(xy: MatriI, fn: Strings, k: Int, cn: Strings, me: Float, vc: Array[Int]): TANBayes
Build a Tree Augmented Naive Bayes (TAN) classification model, passing 'x' and 'y' together in one matrix.
Build a Tree Augmented Naive Bayes (TAN) classification model, passing 'x' and 'y' together in one matrix.
- xy
the data vectors along with their classifications stored as rows of a matrix
- fn
the names of the features
- k
the number of classes
- cn
the names for all classes
- me
use m-estimates (me == 0 => regular MLE estimates)
- vc
the value count (number of distinct values) for each feature
- def apply(x: MatriI, y: VectoI, fn: Strings, k: Int, cn: Strings, me: Float, vc: Array[Int]): TANBayes
Build a Tree Augmented Naive Bayes (TAN) classification model.
Build a Tree Augmented Naive Bayes (TAN) classification model.
- x
the integer-valued data vectors stored as rows of a matrix
- y
the class vector, where y(l) = class for row l of the matrix, x(l)
- fn
the names for all features/variables
- k
the number of classes
- cn
the names for all classes
- me
use m-estimates (me == 0 => regular MLE estimates)
- vc
the value count (number of distinct values) for each feature
- def apply(xy: MatriI, fn: Strings, k: Int, cn: Strings, vc: Array[Int], me: Float, thres: Double): OneBAN
Build a Augmented Naive Bayes (1-BAN) classification model, passing 'x' and 'y' together in one matrix.
Build a Augmented Naive Bayes (1-BAN) classification model, passing 'x' and 'y' together in one matrix.
- xy
the data vectors along with their classifications stored as rows of a matrix
- fn
the names for all features/variables
- k
the number of classes
- cn
the names for all classes
- vc
the value count (number of distinct values) for each feature
- me
use m-estimates (me == 0 => regular MLE estimates)
- thres
the correlation threshold between 2 features for possible parent-child relationship
- def apply(x: MatriI, y: VectoI, fn: Strings, k: Int, cn: Strings, vc: Array[Int], me: Float, thres: Double): OneBAN
Build a Augmented Naive Bayes (1-BAN) classification model.
Build a Augmented Naive Bayes (1-BAN) classification model.
- x
the integer-valued data vectors stored as rows of a matrix
- y
the class vector, where y(l) = class for row l of the matrix, x(l)
- fn
the names for all features/variables
- k
the number of classes
- cn
the names for all classes
- vc
the value count (number of distinct values) for each feature
- me
use m-estimates (me == 0 => regular MLE estimates)
- thres
the correlation threshold between 2 features for possible parent-child relationship
- def apply(xy: MatriI, fn: Strings, k: Int, cn: Strings, vc: Array[Int], me: Float): NaiveBayes
Build a Naive Bayes classification model, passing 'x' and 'y' together in one matrix.
Build a Naive Bayes classification model, passing 'x' and 'y' together in one matrix.
- xy
the data vectors along with their classifications stored as rows of a matrix
- fn
the names for all features/variables
- k
the number of classes
- cn
the names for all classes
- vc
the value count (number of distinct values) for each feature
- me
use m-estimates (me == 0 => regular MLE estimates)
- def apply(x: MatriI, y: VectoI, fn: Strings, k: Int, cn: Strings, vc: Array[Int], me: Float): NaiveBayes
Build a Naive Bayes classification model.
Build a Naive Bayes classification model.
- x
the integer-valued data vectors stored as rows of a matrix
- y
the class vector, where y(l) = class for row l of the matrix x, x(l)
- fn
the names for all features/variables
- k
the number of classes
- cn
the names for all classes
- vc
the value count (number of distinct values) for each feature
- me
use m-estimates (me == 0 => regular MLE estimates)
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def list2Array(list: ListBuffer[Int], n: Int): Array[Boolean]
Convert a selected feature set from a list to a
Boolean
array representation.Convert a selected feature set from a list to a
Boolean
array representation.- list
the list of selected features, e.g., (1, 3, 5)
- n
the total number (selected or not) of features
- val me_default: Float
The default value for m-estimates (me == 0 => regular MLE estimates) me == small => no divide by 0, close to MLE estimates)
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def test(bc: BayesClassifier, name: String): Double
Test the given Bayes classifier and return its average accuracy.
Test the given Bayes classifier and return its average accuracy.
- bc
the Bayes classifier
- name
name of the Bayes classifier
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated