package classifier
The analytics package contains classes, traits and objects for analytics focused on classification.
- Alphabetic
- By Inheritance
- classifier
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
abstract
class
BayesClassifier extends ClassifierInt with BayesMetrics
The
BayesClassifier
abstract class provides factory methods for building Bayesian classifiers.The
BayesClassifier
abstract class provides factory methods for building Bayesian classifiers. The following types of classifiers are currently supported:NaiveBayes
- Naive Bayes classifierOneBAN
- Augmented Naive Bayes (1-BAN) classifierTANBayes
- Tree Augmented Naive Bayes classifierTwoBAN_OS
- Ordering-based Bayesian Network (2-BAN with Order Swapping) ----------------------------------------------------------------------------- -
trait
BayesMetrics extends AnyRef
The
BayesMetrics
trait provides scoring methods. -
class
BayesNetwork extends BayesClassifier
The
BayesNetwork
class implements a Bayesian Network Classifier.The
BayesNetwork
class implements a Bayesian Network Classifier. It classifies a data vector 'z' by determining which of 'k' classes has the highest Joint Probability of 'z' and the outcome (i.e., one of the 'k' classes) of occurring. The Joint Probability calculation is factored into multiple calculations of Conditional Probability. Conditional dependencies are specified using a Directed Acyclic Graph 'DAG'. Nodes are conditionally dependent on their parents only. Conditional probability are recorded in tables. Training is achieved by ... ----------------------------------------------------------------------------- -
trait
Classifier extends AnyRef
The
Classifier
trait provides a common framework for several classifiers.The
Classifier
trait provides a common framework for several classifiers. A classifier is for bounded responses. When the number of distinct responses cannot be bounded by some integer 'k', a predictor should be used. -
abstract
class
ClassifierInt extends Classifier with Error
The
ClassifierInt
abstract class provides a common foundation for several classifiers that operate on integer-valued data. -
abstract
class
ClassifierReal extends Classifier with Error
The
ClassifierReal
abstract class provides a common foundation for several classifiers that operate on real-valued data. -
class
ConfusionMat extends AnyRef
The
ConfusionMat
object provides functions for determining the confusion matrix as well as derived quality metrics such as accuracy, precsion, recall, and Cohen's kappa coefficient. -
class
DAG extends AnyRef
The 'DAG' class provides a data structure for storing directed acyclic graphs.
-
trait
DecisionTree extends AnyRef
The
DecisionTree
trait provides common capabilities for all types of decision trees. -
class
DecisionTreeC45 extends ClassifierReal with DecisionTree
The
DecisionTreeC45
class implements a Decision Tree classifier using the C4.5 algorithm.The
DecisionTreeC45
class implements a Decision Tree classifier using the C4.5 algorithm. The classifier is trained using a data matrix 'x' and a classification vector 'y'. Each data vector in the matrix is classified into one of 'k' classes numbered '0, ..., k-1'. Each column in the matrix represents a feature (e.g., Humidity). The 'vc' array gives the number of distinct values per feature (e.g., 2 for Humidity). ----------------------------------------------------------------------------- At node for feature 'x_f', create children for possible discrete values of 'x_f' (For continuous, pick a threshold to split into lower and higher values). Upon splitting, some matrices need to be created for which 'x_f' column is removed and each child only contains rows for its given value of 'x_f'. ----------------------------------------------------------------------------- -
class
DecisionTreeID3 extends ClassifierInt with DecisionTree
The
DecisionTreeID3
class implements a Decision Tree classifier using the ID3 algorithm.The
DecisionTreeID3
class implements a Decision Tree classifier using the ID3 algorithm. The classifier is trained using a data matrix 'x' and a classification vector 'y'. Each data vector in the matrix is classified into one of 'k' classes numbered '0, ..., k-1'. Each column in the matrix represents a feature (e.g., Humidity). The 'vc' array gives the number of distinct values per feature (e.g., 2 for Humidity). -
class
DecisionTreeID3wp extends DecisionTreeID3
The
DecisionTreeID3wp
class implements a Decision Tree classifier using the ID3 algorithm with pruning.The
DecisionTreeID3wp
class implements a Decision Tree classifier using the ID3 algorithm with pruning. The classifier is trained using a data matrix 'x' and a classification vector 'y'. Each data vector in the matrix is classified into one of 'k' classes numbered '0, ..., k-1'. Each column in the matrix represents a feature (e.g., Humidity). The 'vc' array gives the number of distinct values per feature (e.g., 2 for Humidity). -
case class
FeatureNode(f: Int, branches: HashMap[Int, Node], path: List[(Int, Int)], nu: VectoI) extends Node with Cloneable with Product with Serializable
The
FeatureNode
class is for internal nodes.The
FeatureNode
class is for internal nodes.- f
the feature/variable number used for splitting
- branches
maps the branch value, e.g., f2 has values 0, 1, 3, for a node
- path
the path from the current node to the root {(parent node feature, branch)}
- nu
the frequency count
-
class
GMM extends Classifier
The
GMM
class is used for univariate Gaussian Mixture Models.The
GMM
class is used for univariate Gaussian Mixture Models. Given a sample, thought to be generated according to 'k' Normal distributions, estimate the values for the 'mu' and 'sig2' parameters for the Normal distributions. Given a new value, determine which class (0, ..., k-1) it is most likely to have come from. FIX: need a class for multivariate Gaussian Mixture Models. FIX: need to adapt for clustering. ----------------------------------------------------------------------------- -
class
KNN_Classifier extends ClassifierReal
The
KNN_Classifier
class is used to classify a new vector 'z' into one of 'k' classes.The
KNN_Classifier
class is used to classify a new vector 'z' into one of 'k' classes. It works by finding its 'kappa' nearest neighbors. These neighbors essentially vote according to their classification. The class with most votes is selected as the classification of 'z'. Using a distance metric, the 'kappa' vectors nearest to 'z' are found in the training data, which is stored row-wise in the data matrix 'x'. The corresponding classifications are given in the vector 'y', such that the classification for vector 'x(i)' is given by 'y(i)'. -
class
LDA extends ClassifierReal
The
LDA
class implements a Linear Discriminant Analysis 'LDA' classifier.The
LDA
class implements a Linear Discriminant Analysis 'LDA' classifier. It places a vector into a group according to its maximal discriminant function. FIX - currently only works when the number of classes 'k' = 2.- See also
en.wikipedia.org/wiki/Linear_discriminant_analysis
-
case class
LeafNode(y: Int, nu: VectoI) extends Node with Cloneable with Product with Serializable
The
LeafNode
class is for leaf nodes.The
LeafNode
class is for leaf nodes.- y
the respone/decision value
- nu
the frequency count (count for each possible decision value for y)
-
class
LogisticRegression extends ClassifierReal
The
LogisticRegression
class supports (binomial) logistic regression.The
LogisticRegression
class supports (binomial) logistic regression. In this case, 'x' may be multi-dimensional '[1, x_1, ... x_k]'. Fit the parameter vector 'b' in the logistic regression equationlogit (p_y) = b dot x + e = b_0 + b_1 * x_1 + ... b_k * x_k + e
where 'e' represents the residuals (the part not explained by the model) and 'y' is now binary.
- See also
see.stanford.edu/materials/lsoeldsee263/05-ls.pdf
-
class
NaiveBayes extends NaiveBayes0
The same classifier but uses an optimized cross-validation technique.
The same classifier but uses an optimized cross-validation technique. -----------------------------------------------------------------------------
-
class
NaiveBayes0 extends BayesClassifier
The
NaiveBayes0
class implements an Integer-Based Naive Bayes Classifier, which is a commonly used such classifier for discrete input data.The
NaiveBayes0
class implements an Integer-Based Naive Bayes Classifier, which is a commonly used such classifier for discrete input data. The classifier is trained using a data matrix 'x' and a classification vector 'y'. Each data vector in the matrix is classified into one of 'k' classes numbered 0, ..., k-1. Prior probabilities are calculated based on the population of each class in the training-set. Relative posterior probabilities are computed by multiplying these by values computed using conditional probabilities. The classifier is naive, because it assumes feature independence and therefore simply multiplies the conditional probabilities. ----------------------------------------------------------------------------- This classifier uses the standard cross-validation technique. ----------------------------------------------------------------------------- -
class
NaiveBayesR extends ClassifierReal
The
NaiveBayesR
class implements a Gaussian Naive Bayes Classifier, which is the most commonly used such classifier for continuous input data.The
NaiveBayesR
class implements a Gaussian Naive Bayes Classifier, which is the most commonly used such classifier for continuous input data. The classifier is trained using a data matrix 'x' and a classification vector 'y'. Each data vector in the matrix is classified into one of 'k' classes numbered 0, ..., k-1. Class probabilities are calculated based on the frequency of each class in the training-set. Relative probabilities are computed by multiplying these by values computed using conditional density functions based on the Normal (Gaussian) distribution. The classifier is naive, because it assumes feature independence and therefore simply multiplies the conditional densities. ----------------------------------------------------------------------------- -
abstract
class
Node extends Cloneable
The
Node
class is used to hold information about a node in the decision tree. -
class
NullModel extends ClassifierInt
The
NullModel
class implements an Integer-Based Null Model Classifier, which is a simple classifier for discrete input data.The
NullModel
class implements an Integer-Based Null Model Classifier, which is a simple classifier for discrete input data. The classifier is trained just using a classification vector 'y'. Each data instance is classified into one of 'k' classes numbered 0, ..., k-1. -
class
OneBAN extends OneBAN0
The same classifier but uses an optimized cross-validation technique.
The same classifier but uses an optimized cross-validation technique. -----------------------------------------------------------------------------
-
class
OneBAN0 extends BayesClassifier
The
OneBAN
class implements an Integer-Based One-parent BN Augmented Naive Bayes Classifier, which is a commonly used such classifier for discrete input data.The
OneBAN
class implements an Integer-Based One-parent BN Augmented Naive Bayes Classifier, which is a commonly used such classifier for discrete input data. The classifier is trained using a data matrix 'x' and a classification vector 'y'. Each data vector in the matrix is classified into one of 'k' classes numbered 0, ..., k-1. Prior probabilities are calculated based on the population of each class in the training-set. Relative posterior probabilities are computed by multiplying these by values computed using conditional probabilities. The classifier supports limited dependency between features/variables. ----------------------------------------------------------------------------- This classifier uses the standard cross-validation technique. ----------------------------------------------------------------------------- -
class
PGMHD3 extends BayesClassifier
The
PGMHD3
class implements a three level Bayes Classifier for discrete input data.The
PGMHD3
class implements a three level Bayes Classifier for discrete input data. The classifier is trained using a data matrix 'x' and a classification vector 'y'. Each data vector in the matrix is classified into one of 'k' classes numbered 0, ..., k-1. Prior probabilities are calculated based on the population of each class in the training-set. Relative posterior probabilities are computed by multiplying these by values computed using conditional probabilities. The classifier is naive, because it assumes feature independence and therefore simply multiplies the conditional probabilities. ----------------------------------------------------------------------------- [ x ] -> [ x z ] where x features are level 2 and z features are level 3. ----------------------------------------------------------------------------- -
class
PGMHD3cp extends BayesClassifier
The
PGMHD3cp
class implements a three level Bayes Classifier for discrete input data.The
PGMHD3cp
class implements a three level Bayes Classifier for discrete input data. The classifier is trained using a data matrix 'x' and a classification vector 'y'. Each data vector in the matrix is classified into one of 'k' classes numbered 0, ..., k-1. Prior probabilities are calculated based on the frequency/population of each class in the training-set. Relative posterior probabilities are computed by multiplying these by values computed using conditional probabilities. The classifier is naive, because it assumes feature independence and therefore simply multiplies the conditional probabilities. ----------------------------------------------------------------------------- [ x ] -> [ x z ] where x features are level 2 and z features are level 3. ----------------------------------------------------------------------------- -
class
PGMHD3fl extends BayesClassifier
The
PGMHD3fl
class implements a three-level Probabilistic Classifier for discrete (binary) input data, based on flow from bottom to top levels.The
PGMHD3fl
class implements a three-level Probabilistic Classifier for discrete (binary) input data, based on flow from bottom to top levels. The classifier is trained using the following data matrices:'x' - the mid/features 'X' (level 1) 'z' - the low/feature 'Z' (level 2) 'y' - the top/class 'C' (level 0)
Each random variable 'C_j, X_k and Z_l' is binary ('vc = 2', 'k = 2'), where '1' indicates occurrence, while '0' indicates no evidence of occurreence. Frequency counts and classification scores are computed from a training-set. -----------------------------------------------------------------------------
-
class
RandomForest extends ClassifierReal
The
RandomForest
class uses randomness for building descision trees in classification.The
RandomForest
class uses randomness for building descision trees in classification. It randomly selects sub-samples with 'size = bR * sample-size' from the sample (with replacement) and uses the 'fS' number of sub-features to build the trees, and to classify by voting from all of the trees. -
class
SimpleLDA extends ClassifierReal
The
SimpleLDA
class implements a Linear Discriminant Analysis 'LDA' classifier.The
SimpleLDA
class implements a Linear Discriminant Analysis 'LDA' classifier. It places a value into a group according to its maximal discriminant function.- See also
en.wikipedia.org/wiki/Linear_discriminant_analysis
-
class
SimpleLogisticRegression extends ClassifierReal
The
SimpleLogisticRegression
class supports (binomial) logistic regression.The
SimpleLogisticRegression
class supports (binomial) logistic regression. In this case, 'x' is two-dimensional '[1, x_1]'. Fit the parameter vector 'b' in the logistic regression equationlogit (p_y) = b dot x + e = b_0 + b_1 * x_1 + e
where 'e' represents the residuals (the part not explained by the model) and 'y' is now binary.
- See also
see.stanford.edu/materials/lsoeldsee263/05-ls.pdf
-
type
Strings = Array[String]
Shorthand for array of strings
-
class
SupportVectorMachine extends ClassifierReal
The
SupportVectorMachine
class is a translation of Pseudo-Code from a modified SMO (Modification 2) found at the above URL's into Scala and includes a few simplifications (e.g., currently only works for linear kernels, dense data and binary classification). -
class
TANBayes extends TANBayes0
The same classifier but uses an optimized cross-validation technique.
The same classifier but uses an optimized cross-validation technique. -----------------------------------------------------------------------------
-
class
TANBayes0 extends BayesClassifier
The
TANBayes0
class implements an Integer-Based Tree Augmented Naive Bayes Classifier, which is a commonly used such classifier for discrete input data.The
TANBayes0
class implements an Integer-Based Tree Augmented Naive Bayes Classifier, which is a commonly used such classifier for discrete input data. The classifier is trained using a data matrix 'x' and a classification vector 'y'. Each data vector in the matrix is classified into one of 'k' classes numbered 0, ..., k-1. Prior probabilities are calculated based on the population of each class in the training-set. Relative posterior probabilities are computed by multiplying these by values computed using conditional probabilities. The classifier supports limited dependency between features/variables. ----------------------------------------------------------------------------- This classifier uses the standard cross-validation technique. ----------------------------------------------------------------------------- -
class
TabuFeatures extends AnyRef
The
TabuFeatures
keeps track of pairs of features, so they are not repeatedly tried. -
class
TwoBAN_OS extends TwoBAN_OS0
The same classifier but uses an optimized cross-validation technique ------------------------------------------------------------------------------
-
class
TwoBAN_OS0 extends BayesClassifier
The
TwoBAN_OS0
class implements an Integer-Based Bayesian Network Classifier, which is a commonly used such classifier for discrete input data.The
TwoBAN_OS0
class implements an Integer-Based Bayesian Network Classifier, which is a commonly used such classifier for discrete input data. Each node is limited to have at most 2 parents, and hence the "2" in the class nameTwoBAN_OS0
. The classifier is trained using a data matrix 'x' and a classification vector 'y'. Each data vector in the matrix is classified into one of 'k' classes numbered 0, ..., k-1. Prior probabilities are calculated based on the population of each class in the training-set. Relative posterior probabilities are computed by multiplying these by values computed using conditional probabilities. The classifier supports limited dependency between features/variables. ------------------------------------------------------------------------------ This classifier uses the standard cross-validation technique. ------------------------------------------------------------------------------
Value Members
-
val
BASE_DIR: String
The relative path for base directory
-
object
BayesClassifier
The
BayesClassifier
object provides factory methods for building Bayes classifiers. -
object
BayesClassifierTest extends App
The
BayesClassifierTest
object is used to test theBayesClassifier
class.The
BayesClassifierTest
object is used to test theBayesClassifier
class. Classify whether a car is more likely to be stolen (1) or not (1).- See also
www.inf.u-szeged.hu/~ormandi/ai2/06-naiveBayes-example.pdf > runMain scalation.analytics.classifier.BayesClassifierTest
-
object
BayesClassifierTest10 extends App
The
BayesClassifierTest10
object is used to test theBayesClassifier
class.The
BayesClassifierTest10
object is used to test theBayesClassifier
class. > runMain scalation.analytics.classifier.BayesClassifierTest10 -
object
BayesClassifierTest11 extends App
The
BayesClassifierTest11
object is used to test theBayesClassifier
class.The
BayesClassifierTest11
object is used to test theBayesClassifier
class. > runMain scalation.analytics.classifier.BayesClassifierTest11 -
object
BayesClassifierTest2 extends App
The
BayesClassifierTest2
object is used to test theBayesClassifier
class.The
BayesClassifierTest2
object is used to test theBayesClassifier
class. > runMain scalation.analytics.classifier.BayesClassifierTest2 -
object
BayesClassifierTest3 extends App
The
BayesClassifierTest3
object is used to test theBayesClassifier
class.The
BayesClassifierTest3
object is used to test theBayesClassifier
class. > runMain scalation.analytics.classifier.BayesClassifierTest3 -
object
BayesClassifierTest4 extends App
The
BayesClassifierTest4
object is used to test theBayesClassifier
class.The
BayesClassifierTest4
object is used to test theBayesClassifier
class. > runMain scalation.analytics.classifier.BayesClassifierTest4 -
object
BayesClassifierTest5 extends App
The
BayesClassifierTest5
object is used to test theBayesClassifier
class.The
BayesClassifierTest5
object is used to test theBayesClassifier
class. > runMain scalation.analytics.classifier.BayesClassifierTest5 -
object
BayesClassifierTest6 extends App
The
BayesClassifierTest6
object is used to test theBayesClassifier
class.The
BayesClassifierTest6
object is used to test theBayesClassifier
class. > runMain scalation.analytics.classifier.BayesClassifierTest6 -
object
BayesClassifierTest7 extends App
The
BayesClassifierTest7
object is used to test theBayesClassifier
class.The
BayesClassifierTest7
object is used to test theBayesClassifier
class. > runMain scalation.analytics.classifier.BayesClassifierTest7 -
object
BayesClassifierTest8 extends App
The
BayesClassifierTest8
object is used to test theBayesClassifier
class.The
BayesClassifierTest8
object is used to test theBayesClassifier
class. > runMain scalation.analytics.classifier.BayesClassifierTest8 -
object
BayesClassifierTest9 extends App
The
BayesClassifierTest9
object is used to test theBayesClassifier
class.The
BayesClassifierTest9
object is used to test theBayesClassifier
class. > runMain scalation.analytics.classifier.BayesClassifierTest9 -
object
BayesNetworkTest extends App
The
BayesNetworkTest
object is used to test theBayesNetwork
class.The
BayesNetworkTest
object is used to test theBayesNetwork
class. Ex: Classify whether a person has a Back Ache.- See also
www.eng.tau.ac.il/~bengal/BN.pdf > runMain sclation.analytics.classifier.BayesNetworkTest
-
object
Classifier
The
Classifier
object provides methods for paritioning the downsampling the the dataset. -
object
ClassifierInt
The
ClassifierInt
companion object provides methods to read in data matrices in a combined 'xy' format that can be later decomposed into 'x' the feature data matrix and 'y' the classification vector. -
object
ClassifierReal
The
ClassifierReal
object provides helper methods. -
object
ConfusionMatTest extends App
The
ConfusionMatTest
object is used to test the ConfusionMatclass. > runMain scalation.analytics.classifier.ConfusionMatTest
-
object
DecisionTreeC45
DecisionTreeC45
is the companion object provides factory methods. -
object
DecisionTreeC45Test extends App
The
DecisionTreeC45Test
object is used to test theDecisionTreeC45
class.The
DecisionTreeC45Test
object is used to test theDecisionTreeC45
class. Ex: Classify (No/Yes) whether a person will play tennis based on the measured features.- See also
www.cise.ufl.edu/~ddd/cap6635/Fall-97/Short-papers/2.htm > runMain scalation.analytics.classifier.DecisionTreeC45Test
-
object
DecisionTreeC45Test2 extends App
The
DecisionTreeC45Test2
object is used to test theDecisionTreeC45
class.The
DecisionTreeC45Test2
object is used to test theDecisionTreeC45
class. Ex: Classify (No/Yes) whether a person will play tennis based on the measured features. This one used the version with continuous features.- See also
https://sefiks.com/2018/05/13/a-step-by-step-c4-5-decision-tree-example/ > runMain scalation.analytics.classifier.DecisionTreeC45Test2
-
object
DecisionTreeC45Test3 extends App
The
DecisionTreeC45Test3
object is used to test theDecisionTreeC45
class.The
DecisionTreeC45Test3
object is used to test theDecisionTreeC45
class. Ex: Classify whether a there is breast cancer. > runMain scalation.analytics.classifier.DecisionTreeC45Test3 -
object
DecisionTreeC45Test4 extends App
The
DecisionTreeC45Test4
object is used to test theDecisionTreeC45
class using the well-known wine quality dataset.The
DecisionTreeC45Test4
object is used to test theDecisionTreeC45
class using the well-known wine quality dataset. > runMain scalation.analytics.classifier.DecisionTreeC45Test4 -
object
DecisionTreeC45Test5 extends App
The
DecisionTreeC45Test5
object is used to test the 'makeIsCont' function.The
DecisionTreeC45Test5
object is used to test the 'makeIsCont' function. > runMain scalation.analytics.classifier.DecisionTreeC45Test5 -
object
DecisionTreeID3
The
DecisionTreeID3
companion object provides factory methods. -
object
DecisionTreeID3Test extends App
The
DecisionTreeID3Test
object is used to test theDecisionTreeID3
class.The
DecisionTreeID3Test
object is used to test theDecisionTreeID3
class. Ex: Classify (No/Yes) whether a person will play tennis based on the measured features.- See also
http://www.cise.ufl.edu/~ddd/cap6635/Fall-97/Short-papers/2.htm > runMain scalation.analytics.classifier.DecisionTreeID3Test
-
object
DecisionTreeID3Test2 extends App
The
DecisionTreeID3Test2
object is used to test theDecisionTreeID3
class.The
DecisionTreeID3Test2
object is used to test theDecisionTreeID3
class. Ex: Classify whether a there is breast cancer. > runMain scalation.analytics.classifier.DecisionTreeID3Test2 -
object
DecisionTreeID3Test3 extends App
The
DecisionTreeID3Test3
object is used to test theDecisionTreeID3
class.The
DecisionTreeID3Test3
object is used to test theDecisionTreeID3
class. Plot entropy. > runMain scalation.analytics.classifier.DecisionTreeID3Test3 -
object
ExampleIris
The
ExampleIris
object is used to test all classifiers.The
ExampleIris
object is used to test all classifiers. This is the well-known classification problem on how to classify a flowerval x = xy.sliceCol (1, 5) // columns 1, 2, 3, 4 val y = xy.col (5).toInt // column 5
- See also
https://en.wikipedia.org/wiki/Iris_flower_data_set
-
object
ExampleIrisTest extends App
The
ExampleIrisTest
test several classifiers on the Iris dataset.The
ExampleIrisTest
test several classifiers on the Iris dataset. > runMain scalation.analytics.classifier.ExampleIrisTest -
object
ExampleMtcars
The
ExampleMtcars
object provides the Motor Trend Car Road Tests dataset (mtcars) as a combined 'xy' matrix.The
ExampleMtcars
object provides the Motor Trend Car Road Tests dataset (mtcars) as a combined 'xy' matrix.- See also
https://gist.github.com/seankross/a412dfbd88b3db70b74b
https://stat.ethz.ch/R-manual/R-devel/library/datasets/html/mtcars.html
-
object
ExampleTennis
The
ExampleTennis
object is used to test all integer based classifiers.The
ExampleTennis
object is used to test all integer based classifiers. This is the well-known classification problem on whether to play tennis based on given weather conditions. Applications may need to slice 'xy'.val x = xy.sliceCol (0, 4) // columns 0, 1, 2, 3 val y = xy.col (4) // column 4
- See also
euclid.nmu.edu/~mkowalcz/cs495f09/slides/lesson004.pdf
-
object
ExampleTennisCont
The
ExampleTennisCont
object is used to test all integer based classifiers.The
ExampleTennisCont
object is used to test all integer based classifiers. This is the well-known classification problem on whether to play tennis based on given weather conditions. Applications may need to slice 'xy'. The 'Cont' version uses continuous values for Temperature and Humidity.val x = xy.sliceCol (0, 4) // columns 0, 1, 2, 3 val y = xy.col (4) // column 4
- See also
sefiks.com/2018/05/13/a-step-by-step-c4-5-decision-tree-example
euclid.nmu.edu/~mkowalcz/cs495f09/slides/lesson004.pdf
-
object
ExampleTennisContTest extends App
The
ExampleTennisContTest
test several classifiers on the Tennis dataset.The
ExampleTennisContTest
test several classifiers on the Tennis dataset. > runMain scalation.analytics.classifier.ExampleTennisContTest -
object
ExampleTennisTest extends App
The
ExampleTennisTest
test several classifiers on the Tennis dataset.The
ExampleTennisTest
test several classifiers on the Tennis dataset. > runMain scalation.analytics.classifier.ExampleTennisTest -
object
GMMTest extends App
The
GMMTest
object is used to test theGMM
class.The
GMMTest
object is used to test theGMM
class. > runMain scalation.analytics.classifier.GMMTest -
object
KNN_Classifier
The
KNN_Classifier
companion object provides a factory method. -
object
KNN_ClassifierTest extends App
The
KNN_ClassifierTest
object is used to test theKNN_Classifier
class.The
KNN_ClassifierTest
object is used to test theKNN_Classifier
class. > runMain scalation.analytics.classifier.KNN_ClassifierTest -
object
KNN_ClassifierTest2 extends App
The
KNN_ClassifierTest2
object is used to test theKNN_Classifier
class.The
KNN_ClassifierTest2
object is used to test theKNN_Classifier
class. > runMain scalation.analytics.classifier.KNN_ClassifierTest2 -
object
KNN_ClassifierTest3 extends App
The
KNN_ClassifierTest3
object is used to test theKNN_Classifier
class.The
KNN_ClassifierTest3
object is used to test theKNN_Classifier
class. It uses the Iris dataset where the classification/response 'y' is unbalanced. > runMain scalation.analytics.classifier.KNN_ClassifierTest3 -
object
KNN_ClassifierTest4 extends App
The
KNN_ClassifierTest4
object is used to test theKNN_Classifier
class.The
KNN_ClassifierTest4
object is used to test theKNN_Classifier
class. It uses the Iris dataset where the classification/response 'y' is unbalanced and downsampling is used to balance the classification. > runMain scalation.analytics.classifier.KNN_ClassifierTest4 -
object
LDATest extends App
The
LDATest
is used to test theLDA
class.The
LDATest
is used to test theLDA
class.- See also
people.revoledu.com/kardi/tutorial/LDA/Numerical%20Example.html > runMain scalation.analytics.classifier.LDATest
-
object
LogisticRegressionTest extends App
The
LogisticRegressionTest
object tests theLogisticRegression
class on the mtcars dataset.The
LogisticRegressionTest
object tests theLogisticRegression
class on the mtcars dataset.- See also
www.cookbook-r.com/Statistical_analysis/Logistic_regression/ Answer: b = (-8.8331, 0.4304), n_dev = 43.860, r_dev = 25.533, aci = 29.533, pseudo_rSq = 0.4178 > runMain scalation.analytics.classifier.LogisticRegressionTest
ExampleMtcars.scala
-
object
LogisticRegressionTest2 extends App
The
LogisticRegressionTest2
object tests theLogisticRegression
class.The
LogisticRegressionTest2
object tests theLogisticRegression
class.- See also
www.stat.wisc.edu/~mchung/teaching/.../GLM.logistic.Rpackage.pdf > runMain scalation.analytics.classifier.LogisticRegressionTest2
statmaster.sdu.dk/courses/st111/module03/index.html
-
object
NaiveBayes
NaiveBayes
is the companion object for theNaiveBayes
class. -
object
NaiveBayes0
NaiveBayes0
is the companion object for theNaiveBayes0
class. -
object
NaiveBayesR
NaiveBayesR
is the companion object for theNaiveBayesR
class. -
object
NaiveBayesRTest extends App
The
NaiveBayesRTest
object is used to test theNaiveBayesR
class.The
NaiveBayesRTest
object is used to test theNaiveBayesR
class.- See also
people.revoledu.com/kardi/tutorial/LDA/Numerical%20Example.html > runMain scalation.analytics.classifier.NaiveBayesRTest
-
object
NaiveBayesRTest2 extends App
The
NaiveBayesRTest2
object is used to test theNaiveBayesR
class.The
NaiveBayesRTest2
object is used to test theNaiveBayesR
class. Ex: Classify whether a person is male (M) or female (F) based on the measured features.- See also
en.wikipedia.org/wiki/Naive_Bayes_classifier > runMain scalation.analytics.classifier.NaiveBayesRTest2
-
object
NaiveBayesTest extends App
The
NaiveBayesTest
object is used to test the 'NaiveBayes' class.The
NaiveBayesTest
object is used to test the 'NaiveBayes' class. > runMain scalation.analytics.classifier.NaiveBayesTest -
object
NaiveBayesTest2 extends App
The
NaiveBayesTest2
object is used to test theNaiveBayes
class.The
NaiveBayesTest2
object is used to test theNaiveBayes
class. Classify whether a car is more likely to be stolen (1) or not (1).- See also
www.inf.u-szeged.hu/~ormandi/ai2/06-naiveBayes-example.pdf > runMain scalation.analytics.classifier.NaiveBayesTest2
-
object
NaiveBayesTest3 extends App
The
NaiveBayesTest3
object is used to test the 'NaiveBayes' class.The
NaiveBayesTest3
object is used to test the 'NaiveBayes' class. Given whether a person is Fast and/or Strong, classify them as making C = 1 or not making C = 0 the football team. > runMain scalation.analytics.classifier.NaiveBayesTest3 -
object
NaiveBayesTest4 extends App
The
NaiveBayesTest4
object is used to test the 'NaiveBayes' class.The
NaiveBayesTest4
object is used to test the 'NaiveBayes' class.- See also
docs.roguewave.com/imsl/java/7.3/manual/api/com/imsl/datamining/NaiveBayesClassifierEx2.html > runMain scalation.analytics.classifier.NaiveBayesTest4
archive.ics.uci.edu/ml/datasets/Lenses
-
object
NaiveBayesTest5 extends App
The
NaiveBayesTest5
object is used to test the 'NaiveBayes' class.The
NaiveBayesTest5
object is used to test the 'NaiveBayes' class. > runMain scalation.analytics.classifier.NaiveBayesTest5 -
object
NaiveBayesTest6 extends App
The
NaiveBayesTest6
object is used to test the 'NaiveBayes' class.The
NaiveBayesTest6
object is used to test the 'NaiveBayes' class. > runMain scalation.analytics.classifier.NaiveBayesTest6 -
object
NaiveBayesTest7 extends App
The
NaiveBayesTest7
object is used to test the 'NaiveBayes' class.The
NaiveBayesTest7
object is used to test the 'NaiveBayes' class. > runMain scalation.analytics.classifier.NaiveBayesTest7 -
object
Node
The
Node
object provides helper functions. -
object
NullModelTest extends App
The
NullModelTest
object is used to test theNullModel
class.The
NullModelTest
object is used to test theNullModel
class. Classify whether to play tennis(1) or not (0). > runMain scalation.analytics.classifier.NullModelTest -
object
OneBAN
OneBAN
is the companion object for theOneBAN
class. -
object
OneBAN0
OneBAN0
is the companion object for theOneBAN0
class. -
object
OneBANTest extends App
The
OneBANTest
object is used to test theOneBAN
class.The
OneBANTest
object is used to test theOneBAN
class. Classify whether a car is more likely to be stolen (1) or not (1).- See also
www.inf.u-szeged.hu/~ormandi/ai2/06-OneBAN-example.pdf > runMain scalation.analytics.classifier.OneBANTest
-
object
OneBANTest2 extends App
The
OneBANTest2
object is used to test theOneBAN
class.The
OneBANTest2
object is used to test theOneBAN
class. Given whether a person is Fast and/or Strong, classify them as making C = 1 or not making C = 0 the football team. > runMain scalation.analytics.classifier.OneBANTest2 -
object
OneBANTest3 extends App
The
OneBANTest3
object is used to test theOneBAN
class.The
OneBANTest3
object is used to test theOneBAN
class. > runMain scalation.analytics.classifier.OneBANTest3 -
object
PGMHD3
PGMHD3
is the companion object for thePGMHD3
class. -
object
PGMHD3Test extends App
The
PGMHD3Test
object is used to test thePGMHD3
class.The
PGMHD3Test
object is used to test thePGMHD3
class. Classify whether a car is more likely to be stolen (1) or not (1).- See also
www.inf.u-szeged.hu/~ormandi/ai2/06-naiveBayes-example.pdf > runMain scalation.analytics.classifier.PGMHD3Test
-
object
PGMHD3Test2 extends App
The
PGMHD3Test2
object is used to test the 'PGMHD3' class.The
PGMHD3Test2
object is used to test the 'PGMHD3' class. Given whether a person is Fast and/or Strong, classify them as making C = 1 or not making C = 0 the football team. > runMain scalation.analytics.classifier.PGMHD3Test2 -
object
PGMHD3Test3 extends App
The
PGMHD3Test3
object is used to test the 'PGMHD3' class.The
PGMHD3Test3
object is used to test the 'PGMHD3' class. > runMain scalation.analytics.classifier.PGMHD3Test3 -
object
PGMHD3cp
PGMHD3cp
is the companion object for thePGMHD3cp
class. -
object
PGMHD3cpTest extends App
The
PGMHD3cpTest
object is used to test thePGMHD3cp
class.The
PGMHD3cpTest
object is used to test thePGMHD3cp
class. Classify whether a car is more likely to be stolen (1) or not (1).- See also
www.inf.u-szeged.hu/~ormandi/ai2/06-naiveBayes-example.pdf > runMain scalation.analytics.classifier.PGMHD3cpTest
-
object
PGMHD3cpTest2 extends App
The
PGMHD3cpTest2
object is used to test the 'PGMHD3cp' class.The
PGMHD3cpTest2
object is used to test the 'PGMHD3cp' class. Given whether a person is Fast and/or Strong, classify them as making C = 1 or not making C = 0 the football team. > runMain scalation.analytics.classifier.PGMHD3cpTest2 -
object
PGMHD3cpTest3 extends App
The
PGMHD3cpTest3
object is used to test the 'PGMHD3cp' class.The
PGMHD3cpTest3
object is used to test the 'PGMHD3cp' class. > runMain scalation.analytics.classifier.PGMHD3cpTest3 -
object
PGMHD3fl
PGMHD3fl
is the companion object for thePGMHD3fl
class. -
object
PGMHD3flTest extends App
The
PGMHD3flTest
object is used to test thePGMHD3fl
class.The
PGMHD3flTest
object is used to test thePGMHD3fl
class. Classify whether a car is more likely to be stolen (1) or not (1).- See also
www.inf.u-szeged.hu/~ormandi/ai2/06-naiveBayes-example.pdf > runMain scalation.analytics.classifier.PGMHD3flTest
-
object
RandomForestTest extends App
The
RandomForestTest
object is used to test theRandomForest
class.The
RandomForestTest
object is used to test theRandomForest
class. It tests a simple case that does not require a file to be read. > runMain scalation.analytics.classifier.RandomForestTest -
object
RandomForestTest2 extends App
The
RandomForestTest2
object is used to test theRandomForest
class.The
RandomForestTest2
object is used to test theRandomForest
class. It tests the Random Forest classifier using well-known WineQuality Dataset. > runMain scalation.analytics.classifier.RandomForestTest2 -
object
RandomForestTest3 extends App
The
RandomForestTest3
object is used to test theRandomForest
class.The
RandomForestTest3
object is used to test theRandomForest
class. It tests the Random Forest classifier by specific numbers of trees. > runMain scalation.analytics.classifier.RandomForestTest3 -
object
RandomForestTest4 extends App
The
RandomForestTest4
object is used to test theRandomForest
class.The
RandomForestTest4
object is used to test theRandomForest
class. It tests RF using unseen data. > runMain scalation.analytics.classifier.RandomForestTest4 -
object
Round
The
Round
object provides methods to round double vectors and matrices into integer vectors and matrices. -
object
SimpleLDATest extends App
The
SimpleLDATest
is used to test theSimpleLDA
class.The
SimpleLDATest
is used to test theSimpleLDA
class.- See also
people.revoledu.com/kardi/tutorial/LDA/Numerical%20Example.html > runMain scalation.analytics.classifier.SimpleLDATest
-
object
SimpleLDATest2 extends App
The
SimpleLDATest2
is used to test theSimpleLDA
class.The
SimpleLDATest2
is used to test theSimpleLDA
class. > runMain scalation.analytics.classifier.SimpleLDATest2 -
object
SimpleLogisticRegression
The
SimpleLogisticRegression
companion object provides factory methods. -
object
SimpleLogisticRegressionTest extends App
The
SimpleLogisticRegressionTest
object tests theSimpleLogisticRegression
class on the mtcars dataset.The
SimpleLogisticRegressionTest
object tests theSimpleLogisticRegression
class on the mtcars dataset. Use built-in optimizer.- See also
www.cookbook-r.com/Statistical_analysis/Logistic_regression/ Answer: b = (-8.8331, 0.4304), n_dev = 43.860, r_dev = 25.533, aic = 29.533, pseudo_rSq = 0.4178 > runMain scalation.analytics.classifier.SimpleLogisticRegressionTest
ExampleMtcars.scala
-
object
SimpleLogisticRegressionTest2 extends App
The
SimpleLogisticRegressionTest2
object tests theSimpleLogisticRegression
class on the mtcars dataset.The
SimpleLogisticRegressionTest2
object tests theSimpleLogisticRegression
class on the mtcars dataset. Use grid search optimizer. To get a better solution, refine the grid.- See also
www.cookbook-r.com/Statistical_analysis/Logistic_regression/ Answer: b = (-8.8331, 0.4304), n_dev = 43.860, r_dev = 25.533, aic = 29.533, pseudo_rSq = 0.4178 > runMain scalation.analytics.classifier.SimpleLogisticRegressionTest2
ExampleMtcars.scala
-
object
SimpleLogisticRegressionTest3 extends App
The
SimpleLogisticRegressionTest3
object tests theSimpleLogisticRegression
class.The
SimpleLogisticRegressionTest3
object tests theSimpleLogisticRegression
class. CompareSimpleLogisticRegressionTest
withSimpleRegression
.- See also
www.cookbook-r.com/Statistical_analysis/Logistic_regression/ Answer: b = (-8.8331, 0.4304), n_dev = 43.860, r_dev = 25.533, aic = 29.533, pseudo_rSq = 0.4178 > runMain scalation.analytics.classifier.SimpleLogisticRegressionTest3
-
object
SimpleLogisticRegressionTest4 extends App
The
SimpleLogisticRegressionTest4
is tests theSimpleLogisticRegression
class.The
SimpleLogisticRegressionTest4
is tests theSimpleLogisticRegression
class.- See also
people.revoledu.com/kardi/tutorial/LDA/Numerical%20Example.html > runMain scalation.analytics.classifier.SimpleLogisticRegressionTest4
-
object
SimpleLogisticRegressionTest5 extends App
The
SimpleLogisticRegressionTest5
is used to test > runMain scalation.analytics.classifier.SimpleLogisticRegressionTest5 -
object
SimpleLogisticRegressionTest6 extends App
The
SimpleLogisticRegressionTest6
is used to test the logistic function.The
SimpleLogisticRegressionTest6
is used to test the logistic function. > runMain scalation.analytics.classifier.SimpleLogisticRegressionTest6 -
object
SupportVectorMachineTest extends App
The
SupportVectorMachineTest
is used to test theSupportVectorMachine
class.The
SupportVectorMachineTest
is used to test theSupportVectorMachine
class. > runMain scalation.analytics.classifier.SupportVectorMachineTest -
object
SupportVectorMachineTest2 extends App
The
SupportVectorMachineTest2
is used to test theSupportVectorMachine
class. -
object
TANBayes
The
TANBayes
object is the companion object for theTANBayes
class. -
object
TANBayes0
The
TANBayes0
object is the companion object for theTANBayes0
class. -
object
TANBayesTest extends App
The
TANBayesTest
object is used to test the 'TANBayes' class.The
TANBayesTest
object is used to test the 'TANBayes' class. > runMain scalation.analytics.classifier.TANBayesTest -
object
TANBayesTest2 extends App
The
TANBayesTest2
object is used to test theTANBayes0
class.The
TANBayesTest2
object is used to test theTANBayes0
class. Classify whether a car is more likely to be stolen (1) or not (1).- See also
www.inf.u-szeged.hu/~ormandi/ai2/06-AugNaiveBayes-example.pdf > runMain scalation.analytics.classifier.TANBayesTest2
-
object
TANBayesTest3 extends App
The
TANBayesTest3
object is used to test theTANBayes0
class.The
TANBayesTest3
object is used to test theTANBayes0
class. Given whether a person is Fast and/or Strong, classify them as making C = 1 or not making C = 0 the football team. > runMain scalation.analytics.classifier.TANBayesTest3 -
object
TANBayesTest4 extends App
The
TANBayesTest4
object is used to test theTANBayes0
class.The
TANBayesTest4
object is used to test theTANBayes0
class. > runMain scalation.analytics.classifier.TANBayesTest4 -
object
TwoBAN_OS
The
TwoBAN_OS
object is the companion object for theTwoBAN_OS
class. -
object
TwoBAN_OS0
The
TwoBAN_OS0
object is the companion object for theTwoBAN_OS0
class. -
object
TwoBAN_OSTest extends App
The
TwoBAN_OSTest
object is used to test theTwoBAN_OS0
class.The
TwoBAN_OSTest
object is used to test theTwoBAN_OS0
class. Classify whether a car is more likely to be stolen (1) or not (1).- See also
www.inf.u-szeged.hu/~ormandi/ai2/06-TwoBAN_OS0-example.pdf > runMain scalation.analytics.classifier.TwoBAN_OSTest
-
object
TwoBAN_OSTest2 extends App
The
TwoBAN_OSTest2
object is used to test theTwoBAN_OS0
class.The
TwoBAN_OSTest2
object is used to test theTwoBAN_OS0
class. Given whether a person is Fast and/or Strong, classify them as making C = 1 or not making C = 0 the football team. > runMain scalation.analytics.classifier.TwoBAN_OSTest2 -
object
TwoBAN_OSTest3 extends App
The
TwoBAN_OSTest3
object is used to test theTwoBAN_OS0
class.The
TwoBAN_OSTest3
object is used to test theTwoBAN_OS0
class. > runMain scalation.analytics.classifier.TwoBAN_OSTest3