Packages

package classifier

The analytics package contains classes, traits and objects for analytics focused on classification.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. classifier
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. 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 classifier OneBAN - Augmented Naive Bayes (1-BAN) classifier TANBayes - Tree Augmented Naive Bayes classifier TwoBAN_OS - Ordering-based Bayesian Network (2-BAN with Order Swapping) -----------------------------------------------------------------------------

  2. trait BayesMetrics extends AnyRef

    The BayesMetrics trait provides scoring methods.

  3. 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 ... -----------------------------------------------------------------------------

  4. 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.

  5. abstract class ClassifierInt extends Classifier with Error

    The ClassifierInt abstract class provides a common foundation for several classifiers that operate on integer-valued data.

  6. abstract class ClassifierReal extends Classifier with Error

    The ClassifierReal abstract class provides a common foundation for several classifiers that operate on real-valued data.

  7. 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.

  8. class DAG extends AnyRef

    The 'DAG' class provides a data structure for storing directed acyclic graphs.

  9. trait DecisionTree extends AnyRef

    The DecisionTree trait provides common capabilities for all types of decision trees.

  10. 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'. -----------------------------------------------------------------------------

  11. 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).

  12. 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).

  13. 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

  14. 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. -----------------------------------------------------------------------------

  15. 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)'.

  16. 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

  17. 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)

  18. 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 equation

    logit (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

  19. class NaiveBayes extends NaiveBayes0

    The same classifier but uses an optimized cross-validation technique.

    The same classifier but uses an optimized cross-validation technique. -----------------------------------------------------------------------------

  20. 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. -----------------------------------------------------------------------------

  21. 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. -----------------------------------------------------------------------------

  22. abstract class Node extends Cloneable

    The Node class is used to hold information about a node in the decision tree.

  23. 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.

  24. class OneBAN extends OneBAN0

    The same classifier but uses an optimized cross-validation technique.

    The same classifier but uses an optimized cross-validation technique. -----------------------------------------------------------------------------

  25. 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. -----------------------------------------------------------------------------

  26. 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. -----------------------------------------------------------------------------

  27. 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. -----------------------------------------------------------------------------

  28. 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. -----------------------------------------------------------------------------

  29. 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.

  30. 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

  31. 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 equation

    logit (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

  32. type Strings = Array[String]

    Shorthand for array of strings

  33. 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).

  34. class TANBayes extends TANBayes0

    The same classifier but uses an optimized cross-validation technique.

    The same classifier but uses an optimized cross-validation technique. -----------------------------------------------------------------------------

  35. 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. -----------------------------------------------------------------------------

  36. class TabuFeatures extends AnyRef

    The TabuFeatures keeps track of pairs of features, so they are not repeatedly tried.

  37. class TwoBAN_OS extends TwoBAN_OS0

    The same classifier but uses an optimized cross-validation technique ------------------------------------------------------------------------------

  38. 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 name TwoBAN_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

  1. val BASE_DIR: String

    The relative path for base directory

  2. object BayesClassifier

    The BayesClassifier object provides factory methods for building Bayes classifiers.

  3. object BayesClassifierTest extends App

    The BayesClassifierTest object is used to test the BayesClassifier class.

    The BayesClassifierTest object is used to test the BayesClassifier 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

  4. object BayesClassifierTest10 extends App

    The BayesClassifierTest10 object is used to test the BayesClassifier class.

    The BayesClassifierTest10 object is used to test the BayesClassifier class. > runMain scalation.analytics.classifier.BayesClassifierTest10

  5. object BayesClassifierTest11 extends App

    The BayesClassifierTest11 object is used to test the BayesClassifier class.

    The BayesClassifierTest11 object is used to test the BayesClassifier class. > runMain scalation.analytics.classifier.BayesClassifierTest11

  6. object BayesClassifierTest2 extends App

    The BayesClassifierTest2 object is used to test the BayesClassifier class.

    The BayesClassifierTest2 object is used to test the BayesClassifier class. > runMain scalation.analytics.classifier.BayesClassifierTest2

  7. object BayesClassifierTest3 extends App

    The BayesClassifierTest3 object is used to test the BayesClassifier class.

    The BayesClassifierTest3 object is used to test the BayesClassifier class. > runMain scalation.analytics.classifier.BayesClassifierTest3

  8. object BayesClassifierTest4 extends App

    The BayesClassifierTest4 object is used to test the BayesClassifier class.

    The BayesClassifierTest4 object is used to test the BayesClassifier class. > runMain scalation.analytics.classifier.BayesClassifierTest4

  9. object BayesClassifierTest5 extends App

    The BayesClassifierTest5 object is used to test the BayesClassifier class.

    The BayesClassifierTest5 object is used to test the BayesClassifier class. > runMain scalation.analytics.classifier.BayesClassifierTest5

  10. object BayesClassifierTest6 extends App

    The BayesClassifierTest6 object is used to test the BayesClassifier class.

    The BayesClassifierTest6 object is used to test the BayesClassifier class. > runMain scalation.analytics.classifier.BayesClassifierTest6

  11. object BayesClassifierTest7 extends App

    The BayesClassifierTest7 object is used to test the BayesClassifier class.

    The BayesClassifierTest7 object is used to test the BayesClassifier class. > runMain scalation.analytics.classifier.BayesClassifierTest7

  12. object BayesClassifierTest8 extends App

    The BayesClassifierTest8 object is used to test the BayesClassifier class.

    The BayesClassifierTest8 object is used to test the BayesClassifier class. > runMain scalation.analytics.classifier.BayesClassifierTest8

  13. object BayesClassifierTest9 extends App

    The BayesClassifierTest9 object is used to test the BayesClassifier class.

    The BayesClassifierTest9 object is used to test the BayesClassifier class. > runMain scalation.analytics.classifier.BayesClassifierTest9

  14. object BayesNetworkTest extends App

    The BayesNetworkTest object is used to test the BayesNetwork class.

    The BayesNetworkTest object is used to test the BayesNetwork 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

  15. object Classifier

    The Classifier object provides methods for paritioning the downsampling the the dataset.

  16. 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.

  17. object ClassifierReal

    The ClassifierReal object provides helper methods.

  18. object ConfusionMatTest extends App

    The ConfusionMatTest object is used to test the ConfusionMat class. > runMain scalation.analytics.classifier.ConfusionMatTest

  19. object DecisionTreeC45

    DecisionTreeC45 is the companion object provides factory methods.

  20. object DecisionTreeC45Test extends App

    The DecisionTreeC45Test object is used to test the DecisionTreeC45 class.

    The DecisionTreeC45Test object is used to test the DecisionTreeC45 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

  21. object DecisionTreeC45Test2 extends App

    The DecisionTreeC45Test2 object is used to test the DecisionTreeC45 class.

    The DecisionTreeC45Test2 object is used to test the DecisionTreeC45 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

  22. object DecisionTreeC45Test3 extends App

    The DecisionTreeC45Test3 object is used to test the DecisionTreeC45 class.

    The DecisionTreeC45Test3 object is used to test the DecisionTreeC45 class. Ex: Classify whether a there is breast cancer. > runMain scalation.analytics.classifier.DecisionTreeC45Test3

  23. object DecisionTreeC45Test4 extends App

    The DecisionTreeC45Test4 object is used to test the DecisionTreeC45 class using the well-known wine quality dataset.

    The DecisionTreeC45Test4 object is used to test the DecisionTreeC45 class using the well-known wine quality dataset. > runMain scalation.analytics.classifier.DecisionTreeC45Test4

  24. 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

  25. object DecisionTreeID3

    The DecisionTreeID3 companion object provides factory methods.

  26. object DecisionTreeID3Test extends App

    The DecisionTreeID3Test object is used to test the DecisionTreeID3 class.

    The DecisionTreeID3Test object is used to test the DecisionTreeID3 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

  27. object DecisionTreeID3Test2 extends App

    The DecisionTreeID3Test2 object is used to test the DecisionTreeID3 class.

    The DecisionTreeID3Test2 object is used to test the DecisionTreeID3 class. Ex: Classify whether a there is breast cancer. > runMain scalation.analytics.classifier.DecisionTreeID3Test2

  28. object DecisionTreeID3Test3 extends App

    The DecisionTreeID3Test3 object is used to test the DecisionTreeID3 class.

    The DecisionTreeID3Test3 object is used to test the DecisionTreeID3 class. Plot entropy. > runMain scalation.analytics.classifier.DecisionTreeID3Test3

  29. 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 flower

    val 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

  30. 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

  31. 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

  32. 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

  33. 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

  34. 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

  35. 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

  36. object GMMTest extends App

    The GMMTest object is used to test the GMM class.

    The GMMTest object is used to test the GMM class. > runMain scalation.analytics.classifier.GMMTest

  37. object KNN_Classifier

    The KNN_Classifier companion object provides a factory method.

  38. object KNN_ClassifierTest extends App

    The KNN_ClassifierTest object is used to test the KNN_Classifier class.

    The KNN_ClassifierTest object is used to test the KNN_Classifier class. > runMain scalation.analytics.classifier.KNN_ClassifierTest

  39. object KNN_ClassifierTest2 extends App

    The KNN_ClassifierTest2 object is used to test the KNN_Classifier class.

    The KNN_ClassifierTest2 object is used to test the KNN_Classifier class. > runMain scalation.analytics.classifier.KNN_ClassifierTest2

  40. object KNN_ClassifierTest3 extends App

    The KNN_ClassifierTest3 object is used to test the KNN_Classifier class.

    The KNN_ClassifierTest3 object is used to test the KNN_Classifier class. It uses the Iris dataset where the classification/response 'y' is unbalanced. > runMain scalation.analytics.classifier.KNN_ClassifierTest3

  41. object KNN_ClassifierTest4 extends App

    The KNN_ClassifierTest4 object is used to test the KNN_Classifier class.

    The KNN_ClassifierTest4 object is used to test the KNN_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

  42. object LDATest extends App

    The LDATest is used to test the LDA class.

    The LDATest is used to test the LDA class.

    See also

    people.revoledu.com/kardi/tutorial/LDA/Numerical%20Example.html > runMain scalation.analytics.classifier.LDATest

  43. object LogisticRegressionTest extends App

    The LogisticRegressionTest object tests the LogisticRegression class on the mtcars dataset.

    The LogisticRegressionTest object tests the LogisticRegression 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

  44. object LogisticRegressionTest2 extends App

    The LogisticRegressionTest2 object tests the LogisticRegression class.

    The LogisticRegressionTest2 object tests the LogisticRegression 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

  45. object NaiveBayes

    NaiveBayes is the companion object for the NaiveBayes class.

  46. object NaiveBayes0

    NaiveBayes0 is the companion object for the NaiveBayes0 class.

  47. object NaiveBayesR

    NaiveBayesR is the companion object for the NaiveBayesR class.

  48. object NaiveBayesRTest extends App

    The NaiveBayesRTest object is used to test the NaiveBayesR class.

    The NaiveBayesRTest object is used to test the NaiveBayesR class.

    See also

    people.revoledu.com/kardi/tutorial/LDA/Numerical%20Example.html > runMain scalation.analytics.classifier.NaiveBayesRTest

  49. object NaiveBayesRTest2 extends App

    The NaiveBayesRTest2 object is used to test the NaiveBayesR class.

    The NaiveBayesRTest2 object is used to test the NaiveBayesR 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

  50. 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

  51. object NaiveBayesTest2 extends App

    The NaiveBayesTest2 object is used to test the NaiveBayes class.

    The NaiveBayesTest2 object is used to test the NaiveBayes 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

  52. 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

  53. 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

  54. 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

  55. 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

  56. 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

  57. object Node

    The Node object provides helper functions.

  58. object NullModelTest extends App

    The NullModelTest object is used to test the NullModel class.

    The NullModelTest object is used to test the NullModel class. Classify whether to play tennis(1) or not (0). > runMain scalation.analytics.classifier.NullModelTest

  59. object OneBAN

    OneBAN is the companion object for the OneBAN class.

  60. object OneBAN0

    OneBAN0 is the companion object for the OneBAN0 class.

  61. object OneBANTest extends App

    The OneBANTest object is used to test the OneBAN class.

    The OneBANTest object is used to test the OneBAN 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

  62. object OneBANTest2 extends App

    The OneBANTest2 object is used to test the OneBAN class.

    The OneBANTest2 object is used to test the OneBAN 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

  63. object OneBANTest3 extends App

    The OneBANTest3 object is used to test the OneBAN class.

    The OneBANTest3 object is used to test the OneBAN class. > runMain scalation.analytics.classifier.OneBANTest3

  64. object PGMHD3

    PGMHD3 is the companion object for the PGMHD3 class.

  65. object PGMHD3Test extends App

    The PGMHD3Test object is used to test the PGMHD3 class.

    The PGMHD3Test object is used to test the PGMHD3 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

  66. 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

  67. 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

  68. object PGMHD3cp

    PGMHD3cp is the companion object for the PGMHD3cp class.

  69. object PGMHD3cpTest extends App

    The PGMHD3cpTest object is used to test the PGMHD3cp class.

    The PGMHD3cpTest object is used to test the PGMHD3cp 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

  70. 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

  71. 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

  72. object PGMHD3fl

    PGMHD3fl is the companion object for the PGMHD3fl class.

  73. object PGMHD3flTest extends App

    The PGMHD3flTest object is used to test the PGMHD3fl class.

    The PGMHD3flTest object is used to test the PGMHD3fl 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

  74. object RandomForestTest extends App

    The RandomForestTest object is used to test the RandomForest class.

    The RandomForestTest object is used to test the RandomForest class. It tests a simple case that does not require a file to be read. > runMain scalation.analytics.classifier.RandomForestTest

  75. object RandomForestTest2 extends App

    The RandomForestTest2 object is used to test the RandomForest class.

    The RandomForestTest2 object is used to test the RandomForest class. It tests the Random Forest classifier using well-known WineQuality Dataset. > runMain scalation.analytics.classifier.RandomForestTest2

  76. object RandomForestTest3 extends App

    The RandomForestTest3 object is used to test the RandomForest class.

    The RandomForestTest3 object is used to test the RandomForest class. It tests the Random Forest classifier by specific numbers of trees. > runMain scalation.analytics.classifier.RandomForestTest3

  77. object RandomForestTest4 extends App

    The RandomForestTest4 object is used to test the RandomForest class.

    The RandomForestTest4 object is used to test the RandomForest class. It tests RF using unseen data. > runMain scalation.analytics.classifier.RandomForestTest4

  78. object Round

    The Round object provides methods to round double vectors and matrices into integer vectors and matrices.

  79. object SimpleLDATest extends App

    The SimpleLDATest is used to test the SimpleLDA class.

    The SimpleLDATest is used to test the SimpleLDA class.

    See also

    people.revoledu.com/kardi/tutorial/LDA/Numerical%20Example.html > runMain scalation.analytics.classifier.SimpleLDATest

  80. object SimpleLDATest2 extends App

    The SimpleLDATest2 is used to test the SimpleLDA class.

    The SimpleLDATest2 is used to test the SimpleLDA class. > runMain scalation.analytics.classifier.SimpleLDATest2

  81. object SimpleLogisticRegression

    The SimpleLogisticRegression companion object provides factory methods.

  82. object SimpleLogisticRegressionTest extends App

    The SimpleLogisticRegressionTest object tests the SimpleLogisticRegression class on the mtcars dataset.

    The SimpleLogisticRegressionTest object tests the SimpleLogisticRegression 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

  83. object SimpleLogisticRegressionTest2 extends App

    The SimpleLogisticRegressionTest2 object tests the SimpleLogisticRegression class on the mtcars dataset.

    The SimpleLogisticRegressionTest2 object tests the SimpleLogisticRegression 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

  84. object SimpleLogisticRegressionTest3 extends App

    The SimpleLogisticRegressionTest3 object tests the SimpleLogisticRegression class.

    The SimpleLogisticRegressionTest3 object tests the SimpleLogisticRegression class. Compare SimpleLogisticRegressionTest with SimpleRegression.

    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

  85. object SimpleLogisticRegressionTest4 extends App

    The SimpleLogisticRegressionTest4 is tests the SimpleLogisticRegression class.

    The SimpleLogisticRegressionTest4 is tests the SimpleLogisticRegression class.

    See also

    people.revoledu.com/kardi/tutorial/LDA/Numerical%20Example.html > runMain scalation.analytics.classifier.SimpleLogisticRegressionTest4

  86. object SimpleLogisticRegressionTest5 extends App

    The SimpleLogisticRegressionTest5 is used to test > runMain scalation.analytics.classifier.SimpleLogisticRegressionTest5

  87. 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

  88. object SupportVectorMachineTest extends App

    The SupportVectorMachineTest is used to test the SupportVectorMachine class.

    The SupportVectorMachineTest is used to test the SupportVectorMachine class. > runMain scalation.analytics.classifier.SupportVectorMachineTest

  89. object SupportVectorMachineTest2 extends App

    The SupportVectorMachineTest2 is used to test the SupportVectorMachine class.

  90. object TANBayes

    The TANBayes object is the companion object for the TANBayes class.

  91. object TANBayes0

    The TANBayes0 object is the companion object for the TANBayes0 class.

  92. 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

  93. object TANBayesTest2 extends App

    The TANBayesTest2 object is used to test the TANBayes0 class.

    The TANBayesTest2 object is used to test the TANBayes0 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

  94. object TANBayesTest3 extends App

    The TANBayesTest3 object is used to test the TANBayes0 class.

    The TANBayesTest3 object is used to test the TANBayes0 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

  95. object TANBayesTest4 extends App

    The TANBayesTest4 object is used to test the TANBayes0 class.

    The TANBayesTest4 object is used to test the TANBayes0 class. > runMain scalation.analytics.classifier.TANBayesTest4

  96. object TwoBAN_OS

    The TwoBAN_OS object is the companion object for the TwoBAN_OS class.

  97. object TwoBAN_OS0

    The TwoBAN_OS0 object is the companion object for the TwoBAN_OS0 class.

  98. object TwoBAN_OSTest extends App

    The TwoBAN_OSTest object is used to test the TwoBAN_OS0 class.

    The TwoBAN_OSTest object is used to test the TwoBAN_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

  99. object TwoBAN_OSTest2 extends App

    The TwoBAN_OSTest2 object is used to test the TwoBAN_OS0 class.

    The TwoBAN_OSTest2 object is used to test the TwoBAN_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

  100. object TwoBAN_OSTest3 extends App

    The TwoBAN_OSTest3 object is used to test the TwoBAN_OS0 class.

    The TwoBAN_OSTest3 object is used to test the TwoBAN_OS0 class. > runMain scalation.analytics.classifier.TwoBAN_OSTest3

Inherited from AnyRef

Inherited from Any

Ungrouped