scalation.modeling.classifying

Members list

Type members

Classlikes

class BaggingTrees(x: MatrixD, y: VectorI, fname_: Array[String], k: Int, cname_: Array[String], conts: Set[Int], hparam: HyperParameter) extends Classifier, FitC

The BaggingTrees class uses several randomly built descision trees for classification. It randomly selects sub-samples of bRatio * x.dim size from the data x and y to build nTrees decision trees. The classify method uses voting from all of the trees. Note: this classifier does not select sub-features to build the trees.

The BaggingTrees class uses several randomly built descision trees for classification. It randomly selects sub-samples of bRatio * x.dim size from the data x and y to build nTrees decision trees. The classify method uses voting from all of the trees. Note: this classifier does not select sub-features to build the trees.

Value parameters

cname_

the class names

conts

the set of feature indices for variables that are treated as continuous

fname_

the names of the variables/features

hparam

the hyper-parameters

k

the number of classes

x

the data matrix (instances by features)

y

the response/class labels of the instances

Attributes

Companion
object
Supertypes
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all
Known subtypes
class RandomForest
object BaggingTrees

The BaggingTrees companion object provides a factory method.

The BaggingTrees companion object provides a factory method.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
trait BayesClassifier(k: Int)

The BayesClassifier trait provides methods for Bayesian Classifiers, including calculations of joint probabilities and Conditional Mutual Information (CMI). Make sure the variable values start at zero, otherwise call the shift2zero method. If the value counts (vc) are unknown, the vc_fromData method may be called. Classifier.shift2zero (x) // make sure values for all features start at zero val vc = Classifier.vc_fromData (x) // set value counts from data

The BayesClassifier trait provides methods for Bayesian Classifiers, including calculations of joint probabilities and Conditional Mutual Information (CMI). Make sure the variable values start at zero, otherwise call the shift2zero method. If the value counts (vc) are unknown, the vc_fromData method may be called. Classifier.shift2zero (x) // make sure values for all features start at zero val vc = Classifier.vc_fromData (x) // set value counts from data

Value parameters

k

the number of classes (defaults to binary (2-way) classification

Attributes

See also

bayesClassifierTest for calculating cmi and bayesClassifierTest2 for cmiMatrix

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class TANBayes
trait Classifier(x: MatrixD, y: VectorI, var fname: Array[String], k: Int, var cname: Array[String], hparam: HyperParameter) extends Model

The Classifier trait provides a framework for multiple predictive analytics techniques, e.g., NaiveBayes. x is multi-dimensional [1, x_1, ... x_k]. Fit the parameter vector analog p_y, the response probability mass function (pmf)

The Classifier trait provides a framework for multiple predictive analytics techniques, e.g., NaiveBayes. x is multi-dimensional [1, x_1, ... x_k]. Fit the parameter vector analog p_y, the response probability mass function (pmf)

Value parameters

cname

the names/labels for each class

fname

the feature/variable names (if null, use x_j's)

hparam

the hyper-parameters for the model

k

the number of classes (categorical response values)

x

the input/data m-by-n matrix

y

the response/output m-vector (class values where y(i) = class for instance i)

Attributes

Companion
object
Supertypes
trait Model
class Object
trait Matchable
class Any
Known subtypes
object Classifier

The Classifier companion object provides a method for testing predictive models.

The Classifier companion object provides a method for testing predictive models.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Classifier.type
object DecisionTree

The DecisionTree companion object provides the hyper-parameters for the decision trees, bagging trees, and random forests.

The DecisionTree companion object provides the hyper-parameters for the decision trees, bagging trees, and random forests.

Attributes

See also

scalation.modeling.HyperParameter

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait DecisionTree

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

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

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class DecisionTree_C45(x: MatrixD, y: VectorI, fname_: Array[String], k: Int, cname_: Array[String], conts: Set[Int], hparam: HyperParameter) extends Classifier, FitC, DecisionTree

The DecisionTree_C45 class implements a Decision Tree classifier using the C45 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 DecisionTree_C45 class implements a Decision Tree classifier using the C45 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).

Value parameters

cname_

the names for all classes

conts

the set of feature indices for variables that are treated as continuous

fname_

the names for all features/variables

hparam

the hyper-parameters

k

the number of classes

x

the input/data matrix with instances stored in rows

y

the response/classification vector, where y_i = class for row i of matrix x

Attributes

Companion
object
Supertypes
trait DecisionTree
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all
Known subtypes

The DecisionTree_C45 companion object provides factory methods.

The DecisionTree_C45 companion object provides factory methods.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class DecisionTree_C45wp(x: MatrixD, y: VectorI, fname_: Array[String], k: Int, cname_: Array[String], conts: Set[Int], hparam: HyperParameter) extends DecisionTree_C45

The DecisionTree_C45wp class extends DecisionTree_C45 with pruning capabilities. The base class uses the C45 algorithm to construct a decision tree for classifying instance vectors.

The DecisionTree_C45wp class extends DecisionTree_C45 with pruning capabilities. The base class uses the C45 algorithm to construct a decision tree for classifying instance vectors.

Value parameters

cname_

the names for all classes

conts

the set of feature indices for variables that are treated as continuous

fname_

the names for all features/variables

hparam

the hyper-parameters

k

the number of classes

x

the input/data matrix with instances stored in rows

y

the response/classification vector, where y_i = class for row i of matrix x

Attributes

Companion
object
Supertypes
trait DecisionTree
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all

The DecisionTree_C45wp companion object provides a factory function.

The DecisionTree_C45wp companion object provides a factory function.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class DecisionTree_ID3(x: MatrixD, y: VectorI, fname_: Array[String], k: Int, cname_: Array[String], hparam: HyperParameter) extends Classifier, FitC, DecisionTree

The DecisionTree_ID3 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 DecisionTree_ID3 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).

Value parameters

cname_

the name for each class

fname_

the name for each feature/variable xj

hparam

the hyper-parameters

k

the number of classes

x

the input/data m-by-n matrix with instances stored in rows

y

the response/classification m-vector, where y_i = class for row i of matrix x

Attributes

Companion
object
Supertypes
trait DecisionTree
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all
Known subtypes

The DecisionTree_ID3 companion object provides a factory method.

The DecisionTree_ID3 companion object provides a factory method.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class DecisionTree_ID3wp(x: MatrixD, y: VectorI, fname_: Array[String], k: Int, cname_: Array[String], hparam: HyperParameter) extends DecisionTree_ID3

The DecisionTree_ID3wp class extends DecisionTree_ID3 with pruning capabilities. The base class uses the ID3 algorithm to construct a decision tree for classifying instance vectors.

The DecisionTree_ID3wp class extends DecisionTree_ID3 with pruning capabilities. The base class uses the ID3 algorithm to construct a decision tree for classifying instance vectors.

Value parameters

cname_

the name for each class

fname_

the name for each feature/variable xj

hparam

the hyper-parameters

k

the number of classes

x

the input/data m-by-n matrix with instances stored in rows

y

the response/classification m-vector, where y_i = class for row i of matrix x

Attributes

Companion
object
Supertypes
trait DecisionTree
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all

The DecisionTree_ID3wp companion object provides a factory function.

The DecisionTree_ID3wp companion object provides a factory function.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type

The Example_BreastCancer object loads the breast cancer dataset for classifying whether a patient has breast cancer.

The Example_BreastCancer object loads the breast cancer dataset for classifying whether a patient has breast cancer.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

The Example_Diabetes object loads the dibetes dataset for classifying whether a patient has diabetes.

The Example_Diabetes object loads the dibetes dataset for classifying whether a patient has diabetes.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object Example_Iris

The Example_Iris object is used to test all classifiers. This is the well-known classification problem on how to classify a flower val x = xy(?, 1 until 5) // columns 1, 2, 3, 4 val y = xy(?, 5).toInt // column 5

The Example_Iris object is used to test all classifiers. This is the well-known classification problem on how to classify a flower val x = xy(?, 1 until 5) // columns 1, 2, 3, 4 val y = xy(?, 5).toInt // column 5

Attributes

See also
Supertypes
class Object
trait Matchable
class Any
Self type

The Example_MTcars object provides the Motor Trend Car Road Tests dataset (mtcars) as a combined xy matrix.

The Example_MTcars object provides the Motor Trend Car Road Tests dataset (mtcars) as a combined xy matrix.

Attributes

See also
Supertypes
class Object
trait Matchable
class Any
Self type

The Example_PlayTennis 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.not(0, 4) // columns 0, 1, 2, 3 val y = xy(?, 4) // column 4

The Example_PlayTennis 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.not(0, 4) // columns 0, 1, 2, 3 val y = xy(?, 4) // column 4

Attributes

See also

euclid.nmu.edu/~mkowalcz/cs495f09/slides/lesson004.pdf

Supertypes
class Object
trait Matchable
class Any
Self type

The Example_PlayTennis_Cont object is used to test integer/continuous 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.not (?, 4) // columns 0, 1, 2, 3 val y = xy(?, 4) // column 4

The Example_PlayTennis_Cont object is used to test integer/continuous 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.not (?, 4) // columns 0, 1, 2, 3 val y = xy(?, 4) // column 4

Attributes

See also

euclid.nmu.edu/~mkowalcz/cs495f09/slides/lesson004.pdf

sefiks.com/2018/05/13/a-step-by-step-c4-5-decision-tree-example

Supertypes
class Object
trait Matchable
class Any
Self type
object FitC

The FitC companion object records the indices and labels for the base Quality of Fit (QoF) metrics/measures for the classification techniques.

The FitC companion object records the indices and labels for the base Quality of Fit (QoF) metrics/measures for the classification techniques.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
FitC.type
trait FitC(k: Int) extends FitM

The FitC trait provides methods for determining the confusion matrix as well as derived Quality of Fit (QoF) measures such as pseudo R-squared, sst, sse, accuracy, precision, recall, specificity and Cohen's kappa coefficient.

The FitC trait provides methods for determining the confusion matrix as well as derived Quality of Fit (QoF) measures such as pseudo R-squared, sst, sse, accuracy, precision, recall, specificity and Cohen's kappa coefficient.

Value parameters

k

the number distinct class values/labels (defaults to 2)

Attributes

See also

modeling.Fit Must call the confusion method before calling the other methods.

Companion
object
Supertypes
trait FitM
class Object
trait Matchable
class Any
Known subtypes
class HiddenMarkov(y: VectorI, m: Int, n: Int, cname_: Array[String], var pi: VectorD, var a: MatrixD, var b: MatrixD, hparam: HyperParameter) extends Classifier, FitC

The HiddenMarkov classes provides Hidden Markov Models (HMM). An HMM model consists of a probability vector pi and probability matrices a and b. The discrete-time system is characterized by a hidden state x(t) and an observed symbol/value y(t) at time t, which may be viewed as a time series. pi(i) = P(x(t) = i) a(i, j) = P(x(t+1) = j | x(t) = i) b(i, k) = P(y(t) = k | x(t) = i) model (pi, a, b)

The HiddenMarkov classes provides Hidden Markov Models (HMM). An HMM model consists of a probability vector pi and probability matrices a and b. The discrete-time system is characterized by a hidden state x(t) and an observed symbol/value y(t) at time t, which may be viewed as a time series. pi(i) = P(x(t) = i) a(i, j) = P(x(t+1) = j | x(t) = i) b(i, k) = P(y(t) = k | x(t) = i) model (pi, a, b)

Value parameters

a

the state transition probability matrix (n-by-n)

b

the observation probability matrix (n-by-m)

cname_

the class names for the states, e.g., ("Hot", "Cold")

hparam

the hyper-parameters

m

the number of observation symbols/values {0, 1, ... m-1}

n

the number of (hidden) states in the model

pi

the probabilty vector for the initial state

y

the observation vector/observed discrete-valued time series

Attributes

Companion
object
Supertypes
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all
object HiddenMarkov

The HiddenMarkov companion object provides a convenience method for testing.

The HiddenMarkov companion object provides a convenience method for testing.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class KNN_Classifier(x: MatrixD, y: VectorI, fname_: Array[String], k: Int, cname_: Array[String], kappa: Int, hparam: HyperParameter) extends Classifier, FitC

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). FIX - cross validation uses test data for decision making, so when kappa = 1, acc = 100%

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). FIX - cross validation uses test data for decision making, so when kappa = 1, acc = 100%

Value parameters

cname_

the names for all classes

fname_

the names for all features/variables

hparam

the hyper-parameters

k

the number of classes

kappa

the number of nearest neighbors to consider (k >= 3)

x

the input/data matrix

y

the classification of each vector in x

Attributes

Companion
object
Supertypes
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all

The KNN_Classifier companion object provides a factory method.

The KNN_Classifier companion object provides a factory method.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class LinDiscAnalyis(x: MatrixD, y: VectorI, fname_: Array[String], k: Int, cname_: Array[String], hparam: HyperParameter) extends Classifier, FitC

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

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

Value parameters

cname_

the names for all classes

fname_

the names for all features/variables

hparam

the hyper-parameters

k

the number of classes (k in {0, 1, ...k-1}

x

the real-valued training/test data vectors stored as rows of a matrix

y

the training/test classification vector, where y_i = class for row i of the matrix x

Attributes

See also

en.wikipedia.org/wiki/Linear_discriminant_analysis

Companion
object
Supertypes
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all

The LinDiscAnalyis companion object provides a factory method.

The LinDiscAnalyis companion object provides a factory method.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class LogisticRegression(x: MatrixD, y: VectorI, fname_: Array[String], cname_: Array[String], hparam: HyperParameter) extends SimpleLogisticRegression

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.

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.

Value parameters

cname_

the names for both classes

fname_

the names for all features/variables

hparam

the hyper-parameters

x

the input/design matrix augmented with a first column of ones

y

the binary response vector, y_i in {0, 1}

Attributes

See also

see.stanford.edu/materials/lsoeldsee263/05-ls.pdf

Companion
object
Supertypes
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all

The LogisticRegression companion object provides a factory method.

The LogisticRegression companion object provides a factory method.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class NaiveBayes(x: MatrixD, y: VectorI, fname_: Array[String], k: Int, cname_: Array[String], var vc: VectorI, hparam: HyperParameter) extends Classifier, FitC

The classifier is naive, because it assumes variable/feature independence and therefore simply multiplies the conditional probabilities.

Value parameters

cname_

the name for each class

fname_

the name for each feature/variable xj

hparam

the hyper-parameters

k

the number of classes

vc

the value count (number of distinct values) for each feature/variable xj

x

the input/data m-by-n matrix with instances stored in rows

y

the response/classification m-vector, where y_i = class for row i of matrix x

Attributes

Companion
object
Supertypes
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all
object NaiveBayes

NaiveBayes is the companion object for the NaiveBayes class.

NaiveBayes is the companion object for the NaiveBayes class.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
NaiveBayes.type
class NaiveBayesR(x: MatrixD, y: VectorI, fname_: Array[String], k: Int, cname_: Array[String], hparam: HyperParameter) extends Classifier, FitC

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.

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.

Value parameters

cname_

the names for all classes

fname_

the names for all features/variables

hparam

the hyper-parameters

k

the number of classes

x

the real-valued data vectors stored as rows of a matrix

y

the class vector, where y_i = class for row i of the matrix x, x(i)

Attributes

Companion
object
Supertypes
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all
object NaiveBayesR

NaiveBayesR is the companion object for the NaiveBayesR class.

NaiveBayesR is the companion object for the NaiveBayesR class.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class NeuralNet_Class_3L(x: MatrixD, y: VectorI, fname_: Array[String], cname_: Array[String], nz: Int, hparam: HyperParameter, f: AFF) extends Classifier, FitC

The NeuralNet_Class_3L class supports single-output, 3-layer (input, hidden and output) Neural-Network classifiers. Given several input vectors and an output vector (training data), fit the parameters a and b connecting the layers, so that for a new input vector z, the net can classify the output value, i.e., yp = f1 (b * f (a * z)) where f and f1 are the activation functions and the parameter a and b are the parameters between input-hidden and hidden-output layers.

The NeuralNet_Class_3L class supports single-output, 3-layer (input, hidden and output) Neural-Network classifiers. Given several input vectors and an output vector (training data), fit the parameters a and b connecting the layers, so that for a new input vector z, the net can classify the output value, i.e., yp = f1 (b * f (a * z)) where f and f1 are the activation functions and the parameter a and b are the parameters between input-hidden and hidden-output layers.

Value parameters

cname_

the names for all classes

f

the activation function family for layers 1->2 (input to hidden) the activation function family for layers 2->3 (hidden to output) is sigmoid

fname_

the feature/variable names (if null, use x_j's)

hparam

the hyper-parameters

nz

the number of nodes in hidden layer (-1 => use default formula)

x

the m-by-n input/data matrix (training data consisting of m input vectors)

y

the m output/response vector (training data consisting of m output integer values)

Attributes

Companion
object
Supertypes
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all
object NeuralNet_Class_3L extends Scaling

The NeuralNet_Class_3L companion object provides factory methods for building three-layer (one hidden layer) neural network classifiers. Note, 'scale' is defined in Scaling.

The NeuralNet_Class_3L companion object provides factory methods for building three-layer (one hidden layer) neural network classifiers. Note, 'scale' is defined in Scaling.

Attributes

Companion
class
Supertypes
trait Scaling
class Object
trait Matchable
class Any
Self type
case class Node(j: Int, gn: Double, nu: VectorI, parent: Node, y: Int, var leaf: Boolean) extends Cloneable

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

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

Value parameters

gn

the information gain recorded at this node

j

the feature/variable number used for splitting (negative => leaf)

leaf

whether the node is a leaf (terminal node)

nu

the frequency count

parent

the parent node (null for root)

y

the response/decision value

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Cloneable
class Object
trait Matchable
class Any
Show all
object Node

The Node companion object provides helper functions.

The Node companion object provides helper functions.

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Node.type
class NullModel(y: VectorI, k: Int, cname_: Array[String]) extends Classifier, FitC

The NullModel class implements a Null Model Classifier, which is a simple classifier for discrete input data. The classifier is trained just using a classification vector y. Picks the most frequent class. Each data instance is classified into one of k classes numbered 0, ..., k-1. Note: the train method in the super class suffices.

The NullModel class implements a Null Model Classifier, which is a simple classifier for discrete input data. The classifier is trained just using a classification vector y. Picks the most frequent class. Each data instance is classified into one of k classes numbered 0, ..., k-1. Note: the train method in the super class suffices.

Value parameters

cname_

the names for all classes

k

the number of distinct vcalues/classes

y

the response/output m-vector (class values where y(i) = class for instance i)

Attributes

Companion
object
Supertypes
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all
object NullModel

NullModel is the companion object for the NullModel class provides a factory method for creating null models.

NullModel is the companion object for the NullModel class provides a factory method for creating null models.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
NullModel.type
enum QoFC(val name: String)

The QoFC enum defines the Quality of Fit (QoF) measures for classifiers.

The QoFC enum defines the Quality of Fit (QoF) measures for classifiers.

Value parameters

name

the name of ther QoF measure/metric

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
class RandomForest(x: MatrixD, y: VectorI, fname_: Array[String], k: Int, cname_: Array[String], conts: Set[Int], hparam: HyperParameter) extends BaggingTrees

The RandomForest class uses randomness for building descision trees in classification. It randomly selects sub-samples with size = bRatio * sample-size from the sample (with replacement) and uses the fbRatio fraction of sub-features to build the trees, and to classify by voting from all of the trees.

The RandomForest class uses randomness for building descision trees in classification. It randomly selects sub-samples with size = bRatio * sample-size from the sample (with replacement) and uses the fbRatio fraction of sub-features to build the trees, and to classify by voting from all of the trees.

Value parameters

cname_

class names (array of string)

conts

the set of feature indices for variables that are treated as continuous

fname_

feature names (array of string)

hparam

the hyper-parameters

k

the number of classes

x

the data matrix (instances by features)

y

the response class labels of the instances

Attributes

Companion
object
Supertypes
class BaggingTrees
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all
object RandomForest

The RandomForest companion object provides a factory method.

The RandomForest companion object provides a factory method.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type

The SelectionTech enumeration indicates the available feature selection techniques.

The SelectionTech enumeration indicates the available feature selection techniques.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
class SimpleLDA(x: MatrixD, y: VectorI, fname_: Array[String], k: Int, cname_: Array[String], hparam: HyperParameter) extends Classifier, FitC

The SimpleLDA class implements a Linear Discriminant Analysis (LDA) classifier. It places a value into a group according to its maximal discriminant function.

The SimpleLDA class implements a Linear Discriminant Analysis (LDA) classifier. It places a value into a group according to its maximal discriminant function.

Value parameters

cname_

the names for all classes

fname_

the name for the feature/variable

hparam

the hyper-parameters

k

the number of possible values for y (0, 1, ... k-1)

x

the input/design matrix with only one column

y

the response/classification vector, y_i in {0, 1}

Attributes

See also

en.wikipedia.org/wiki/Linear_discriminant_analysis

Supertypes
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all
class SimpleLogisticRegression(x: MatrixD, y: VectorI, fname_: Array[String], cname_: Array[String], hparam: HyperParameter) extends Classifier, FitC

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.

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.

Value parameters

cname_

the names for both classes

fname_

the names for all features/variables

hparam

the hyper-parameters

x

the input/design matrix augmented with a first column of ones

y

the binary response vector, y_i in {0, 1}

Attributes

See also

see.stanford.edu/materials/lsoeldsee263/05-ls.pdf

Companion
object
Supertypes
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all
Known subtypes

The SimpleLogisticRegression companion object provides factory methods.

The SimpleLogisticRegression companion object provides factory methods.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class SupportVectorMachine(x: MatrixD, y: VectorI, fname_: Array[String], cname_: Array[String], hparam: HyperParameter) extends Classifier, FitC

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

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

Value parameters

cname_

the class names

fname_

the feature/variable names

hparam

the hyper-parameters

x

the input/data matrix with points stored as rows

y

the classification of the data points stored in a vector

Attributes

Companion
object
Supertypes
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all

The SupportVectorMachine companion object provides a factory method.

The SupportVectorMachine companion object provides a factory method.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class TANBayes(x: MatrixD, y: VectorI, fname_: Array[String], k: Int, cname_: Array[String], var vc: VectorI, hparam: HyperParameter) extends Classifier, BayesClassifier, FitC

The classifier is TAN allowing each xj to utilize information from its x-parant.

Value parameters

cname_

the names of the classes

fname_

the names of the features/variables

hparam

the hyper-parameters

k

the number of classes

vc

the value count (number of distinct values) for each feature

x

the input/data m-by-n matrix

y

the class vector, where y(i) = class for row i of matrix x

Attributes

Companion
object
Supertypes
trait FitC
trait FitM
trait Classifier
trait Model
class Object
trait Matchable
class Any
Show all
object TANBayes

TANBayes is the companion object for the TANBayes class.

TANBayes is the companion object for the TANBayes class.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
TANBayes.type
final class baggingTreesTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class baggingTreesTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class baggingTreesTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class baggingTreesTest4

Attributes

Supertypes
class Object
trait Matchable
class Any
final class baggingTreesTest5

Attributes

Supertypes
class Object
trait Matchable
class Any
final class baggingTreesTest6

Attributes

Supertypes
class Object
trait Matchable
class Any
final class baggingTreesTest7

Attributes

Supertypes
class Object
trait Matchable
class Any
final class bayesClassifierTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class bayesClassifierTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class classifierTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class decisionTreeTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class decisionTree_C45Test

Attributes

Supertypes
class Object
trait Matchable
class Any
final class decisionTree_C45Test2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class decisionTree_C45Test3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class decisionTree_C45Test4

Attributes

Supertypes
class Object
trait Matchable
class Any
final class decisionTree_C45Test5

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
final class decisionTree_ID3Test

Attributes

Supertypes
class Object
trait Matchable
class Any
final class decisionTree_ID3Test2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class decisionTree_ID3Test3

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
final class example_DiabetesTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class example_IrisTest

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
final class fitCTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class fitCTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class fitCTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class fitCTest4

Attributes

Supertypes
class Object
trait Matchable
class Any
final class hiddenMarkovTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class hiddenMarkovTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class hiddenMarkovTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class hiddenMarkovTest4

Attributes

Supertypes
class Object
trait Matchable
class Any
final class kNN_ClassifierTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class kNN_ClassifierTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class kNN_ClassifierTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class kNN_ClassifierTest4

Attributes

Supertypes
class Object
trait Matchable
class Any
final class linDiscAnalyisTest

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
final class naiveBayesRTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class naiveBayesRTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class naiveBayesTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class naiveBayesTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class naiveBayesTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class naiveBayesTest4

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
final class nullModelTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class randomForestTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class randomForestTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class randomForestTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class randomForestTest4

Attributes

Supertypes
class Object
trait Matchable
class Any
final class randomForestTest5

Attributes

Supertypes
class Object
trait Matchable
class Any
final class randomForestTest6

Attributes

Supertypes
class Object
trait Matchable
class Any
final class randomForestTest7

Attributes

Supertypes
class Object
trait Matchable
class Any
final class simpleLDATest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class simpleLDATest2

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
final class tANBayesTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class tANBayesTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class tANBayesTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class tANBayesTest4

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def baggingTreesTest(): Unit

The baggingTreesTest main function tests the BaggingTrees class. It tests a simple case that does not require a file to be read.

The baggingTreesTest main function tests the BaggingTrees class. It tests a simple case that does not require a file to be read.

runMain scalation.modeling.classifying.baggingTreesTest

Attributes

def baggingTreesTest2(): Unit

The BaggingTreesTest2 main function tests the BaggingTrees class. It tests the Bagging Trees classifier using well-known WineQuality Dataset.

The BaggingTreesTest2 main function tests the BaggingTrees class. It tests the Bagging Trees classifier using well-known WineQuality Dataset.

runMain scalation.modeling.classifying.BaggingTreesTest2

Attributes

def baggingTreesTest3(): Unit

The baggingTreesTest3 main function tests the BaggingTrees class. It tests the Bagging Trees classifier using a specific numbers of trees.

The baggingTreesTest3 main function tests the BaggingTrees class. It tests the Bagging Trees classifier using a specific numbers of trees.

runMain scalation.modeling.classifying.baggingTreesTest3

Attributes

def baggingTreesTest4(): Unit

The baggingTreesTest4 main function tests the BaggingTrees class. It tests Bagging Trees using unseen data.

The baggingTreesTest4 main function tests the BaggingTrees class. It tests Bagging Trees using unseen data.

runMain scalation.modeling.classifying.baggingTreesTest4

Attributes

def baggingTreesTest5(): Unit

The baggingTreesTest5 main function tests the BaggingTrees class. It tests the Bagging Trees classifier by specific numbers of trees.

The baggingTreesTest5 main function tests the BaggingTrees class. It tests the Bagging Trees classifier by specific numbers of trees.

runMain scalation.modeling.classifying.baggingTreesTest5

Attributes

def baggingTreesTest6(): Unit

The baggingTreesTest6 main function tests the BaggingTrees class. It tests the Bagging Trees classifier on Breast Cancer dataset.

The baggingTreesTest6 main function tests the BaggingTrees class. It tests the Bagging Trees classifier on Breast Cancer dataset.

runMain scalation.modeling.classifying.baggingTreesTest6

Attributes

def baggingTreesTest7(): Unit

The baggingTreesTest7 main function tests the BaggingTrees class. It tests the Bagging Trees classifier on Diabetes dataset.

The baggingTreesTest7 main function tests the BaggingTrees class. It tests the Bagging Trees classifier on Diabetes dataset.

runMain scalation.modeling.classifying.baggingTreesTest7

Attributes

def bayesClassifierTest(): Unit

The bayesClassifierTest main function is used to test the BayesClassifier Calculate the CMI I(x; z | y) and it should be 0.15834454180428106.

The bayesClassifierTest main function is used to test the BayesClassifier Calculate the CMI I(x; z | y) and it should be 0.15834454180428106.

Attributes

See also

stackoverflow.com/questions/55402338/finding-conditional-mutual-information-from-3-discrete-variable

runMain scalation.modeling.classifying.bayesClassifierTest

def bayesClassifierTest2(): Unit

The bayesClassifierTest2 main function is used to test the BayesClassifier class using the Play Tennis Example. Calculate the CMI Matrix I(xj; xl | y) for j < l

The bayesClassifierTest2 main function is used to test the BayesClassifier class using the Play Tennis Example. Calculate the CMI Matrix I(xj; xl | y) for j < l

runMain scalation.modeling.classifying.bayesClassifierTest2

Attributes

def classifierTest(): Unit

The classifierTest main function is used to test the Classifier trait and its derived classes using the Example_PlayTennis dataset containing data matrices x and response vector y.

The classifierTest main function is used to test the Classifier trait and its derived classes using the Example_PlayTennis dataset containing data matrices x and response vector y.

Attributes

See also

Example_PlayTennis

runMain scalation.modeling.classifierTest

def decisionTreeTest(): Unit

The decisionTreeTest main function is used to test the DecisionTree class.

The decisionTreeTest main function is used to test the DecisionTree class.

runMain scalation.modeling.classifying.decisionTreeTest

Attributes

def decisionTree_C45Test(): Unit

The decisionTree_C45Test object tests the DecisionTree_C45 class. Ex: Classify (No/Yes) whether a person will play tennis based on the measured features.

The decisionTree_C45Test object tests the DecisionTree_C45 class. Ex: Classify (No/Yes) whether a person will play tennis based on the measured features.

Attributes

See also

www.cise.ufl.edu/~ddd/cap6635/Fall-97/Short-papers/2.htm

runMain scalation.modeling.classifying.decisionTree_C45Test

def decisionTree_C45Test2(): Unit

The decisionTree_C45Test2 main function tests the DecisionTree_C45 class. Ex: Classify (No/Yes) whether a person will play tennis based on the measured features.

The decisionTree_C45Test2 main function tests the DecisionTree_C45 class. Ex: Classify (No/Yes) whether a person will play tennis based on the measured features.

Attributes

See also

www.cise.ufl.edu/~ddd/cap6635/Fall-97/Short-papers/2.htm

runMain scalation.modeling.classifying.decisionTree_C45Test2

def decisionTree_C45Test3(): Unit

The decisionTree_C45Test3 main function tests the DecisionTree_C45 class. Ex: Classify whether a there is breast cancer.

The decisionTree_C45Test3 main function tests the DecisionTree_C45 class. Ex: Classify whether a there is breast cancer.

runMain scalation.modeling.classifying.decisionTree_C45Test3

Attributes

def decisionTree_C45Test4(): Unit

The decisionTree_C45Test4 main function tests the DecisionTree_C45 class. Ex: Classify the quality of white wine.

The decisionTree_C45Test4 main function tests the DecisionTree_C45 class. Ex: Classify the quality of white wine.

runMain scalation.modeling.classifying.decisionTree_C45Test4

Attributes

def decisionTree_C45Test5(): Unit

The decisionTree_C45Test5 main function tests the DecisionTree_C45 class. Ex: Classify whether the patient has diabetes or not

The decisionTree_C45Test5 main function tests the DecisionTree_C45 class. Ex: Classify whether the patient has diabetes or not

runMain scalation.modeling.classifying.decisionTree_C45Test5

Attributes

The decisionTree_C45wpTest main function tests the DecisionTree_C45wp class.

The decisionTree_C45wpTest main function tests the DecisionTree_C45wp class.

runMain scalation.modeling.classifying.decisionTree_C45wpTest

Attributes

The decisionTree_C45wpTest2 main function tests the DecisionTree_C45wp class.

The decisionTree_C45wpTest2 main function tests the DecisionTree_C45wp class.

runMain scalation.modeling.classifying.decisionTree_C45wpTest2

Attributes

def decisionTree_ID3Test(): Unit

The decisionTree_ID3Test main function tests the DecisionTree_ID3 class. Ex: Classify (No/Yes) whether a person will play tennis based on the measured features.

The decisionTree_ID3Test main function tests the DecisionTree_ID3 class. Ex: Classify (No/Yes) whether a person will play tennis based on the measured features.

Attributes

See also

www.cise.ufl.edu/~ddd/cap6635/Fall-97/Short-papers/2.htm

runMain scalation.modeling.classifying.decisionTree_ID3Test

def decisionTree_ID3Test2(): Unit

The decisionTree_ID3Test2 main function tests the DecisionTree_ID3 class. Ex: Classify whether a there is breast cancer.

The decisionTree_ID3Test2 main function tests the DecisionTree_ID3 class. Ex: Classify whether a there is breast cancer.

runMain scalation.modeling.classifying.decisionTree_ID3Test2

Attributes

def decisionTree_ID3Test3(): Unit

The decisionTree_ID3Test3 main function is used to test the DecisionTree_ID3 class. Plot entropy.

The decisionTree_ID3Test3 main function is used to test the DecisionTree_ID3 class. Plot entropy.

runMain scalation.modeling.classifying.decisionTree_ID3Test3

Attributes

The decisionTree_ID3wpTest main function tests the DecisionTree_ID3wp class.

The decisionTree_ID3wpTest main function tests the DecisionTree_ID3wp class.

runMain scalation.modeling.classifying.decisionTree_ID3wpTest

Attributes

The decisionTree_ID3wpTest2 main function tests the DecisionTree_ID3wp class.

The decisionTree_ID3wpTest2 main function tests the DecisionTree_ID3wp class.

runMain scalation.modeling.classifying.decisionTree_ID3wpTest2

Attributes

The decisionTree_ID3wpTest3 main function tests the DecisionTree_ID3wp class.

The decisionTree_ID3wpTest3 main function tests the DecisionTree_ID3wp class.

runMain scalation.modeling.classifying.decisionTree_ID3wpTest3

Attributes

The example_BreastCancerTest main function tests 16 of 18 classifiers on the Breast Cancer dataset. Ex: Classify whether a there is breast cancer.

The example_BreastCancerTest main function tests 16 of 18 classifiers on the Breast Cancer dataset. Ex: Classify whether a there is breast cancer.

BaggingTrees, DecisionTree_C45, DecisionTree_C45wp, DecisionTree_ID3, DecisionTree_ID3wp, HiddenMarkov, KNN_Classifier, LinDiscAnalyis, LogisticRegression, NaiveBayes, NaiveBayesR, NeuralNet_Class_3L, NullModel, RandomForest, SupportVectorMachine, TANBayes.

Require having only a single feature: SimpleLDA, SimpleLogisticRegression => SKIP

runMain scalation.modeling.classifying.example_BreastCancerTest

Attributes

def example_DiabetesTest(): Unit

The example_DiabetesTest main function tests 16 of 18 classifiers on the Breast Cancer dataset. Ex: Classify whether a there is breast cancer.

The example_DiabetesTest main function tests 16 of 18 classifiers on the Breast Cancer dataset. Ex: Classify whether a there is breast cancer.

BaggingTrees, DecisionTree_C45, DecisionTree_C45wp, DecisionTree_ID3, DecisionTree_ID3wp, HiddenMarkov, KNN_Classifier, LinDiscAnalyis, LogisticRegression, NaiveBayes, NaiveBayesR, NeuralNet_Class_3L, NullModel, RandomForest, SupportVectorMachine, TANBayes.

Require having only a single feature: SimpleLDA, SimpleLogisticRegression => SKIP

runMain scalation.modeling.classifying.example_DiabetesTest

Attributes

def example_IrisTest(): Unit

The example_IrisTest main function tests 16 of 18 classifiers on the Iris dataset. As this is an easy classification problem, classifiers should be nearly perfect.

The example_IrisTest main function tests 16 of 18 classifiers on the Iris dataset. As this is an easy classification problem, classifiers should be nearly perfect.

BaggingTrees, DecisionTree_C45, DecisionTree_C45wp, DecisionTree_ID3, DecisionTree_ID3wp, HiddenMarkov, KNN_Classifier, LinDiscAnalyis, LogisticRegression, NaiveBayes, NaiveBayesR, NeuralNet_Class_3L, NullModel, RandomForest, SupportVectorMachine, TANBayes.

Require having only a single feature: SimpleLDA, SimpleLogisticRegression => SKIP

runMain scalation.modeling.classifying.example_IrisTest

Attributes

The example_PlayTennisTest test several classifiers on the Play Tennis dataset. Tests all classes that extend from Classifier.

The example_PlayTennisTest test several classifiers on the Play Tennis dataset. Tests all classes that extend from Classifier.

runMain scalation.modeling.classifying.example_PlayTennisTest

Attributes

The example_PalyTennis_ContTest test several classifiers on the (cont) Play Tennis dataset. Tests all classes that extend from Classifier and include continuous predictors.

The example_PalyTennis_ContTest test several classifiers on the (cont) Play Tennis dataset. Tests all classes that extend from Classifier and include continuous predictors.

runMain scalation.modeling.classifying.Example_PlayTennis_ContTest

Attributes

def fitCTest(): Unit

The fitCTest main function is used to test the FitC trait.

The fitCTest main function is used to test the FitC trait.

runMain scalation.modeling.classifying.fitCTest

Attributes

def fitCTest2(): Unit

The fitCTest2 main function is used to test the FitC trait.

The fitCTest2 main function is used to test the FitC trait.

Attributes

See also

www.quora.com/How-do-I-compute-precision-and-recall-values-for-a-dataset

runMain scalation.modeling.classifying.fitCTest2

def fitCTest3(): Unit

The fitCTest3 main function is used to test the FitC trait.

The fitCTest3 main function is used to test the FitC trait.

Attributes

See also

www.quora.com/How-do-I-compute-precision-and-recall-values-for-a-dataset

runMain scalation.modeling.classifying.fitCTest3

def fitCTest4(): Unit

The fitCTest4 main function is used to test the FitC class.

The fitCTest4 main function is used to test the FitC class.

Attributes

See also

towardsdatascience.com/multi-class-metrics-made-simple-part-i-precision-and-recall-9250280bddc2 Note: ScalaTion's confusion matrix is the transpose of the one on the Website

runMain scalation.modeling.classifying.fitCTest4

def hiddenMarkovTest(): Unit

The hiddenMarkovTest main function is used to test the HiddenMarkov class. Given model (pi, a, b), determine the probability of the observations y.

The hiddenMarkovTest main function is used to test the HiddenMarkov class. Given model (pi, a, b), determine the probability of the observations y.

Attributes

See also

www.cs.sjsu.edu/~stamp/RUA/HMM.pdf (exercise 1).

runMain scalation.modeling.classifying.hiddenMarkovTest

def hiddenMarkovTest2(): Unit

The hiddenMarkovTest2 main function is used to test the HiddenMarkov class. Train the model (pi, a, b) based on the observed data.

The hiddenMarkovTest2 main function is used to test the HiddenMarkov class. Train the model (pi, a, b) based on the observed data.

Attributes

See also

www.cs.sjsu.edu/~stamp/RUA/HMM.pdf.

runMain scalation.modeling.classifying.hiddenMarkovTest2

def hiddenMarkovTest3(): Unit

The hiddenMarkovTest3 main function is used to test the HiddenMarkov class. Given model (pi, a, b), determine the probability of the observations y.

The hiddenMarkovTest3 main function is used to test the HiddenMarkov class. Given model (pi, a, b), determine the probability of the observations y.

Attributes

See also

"Introduction to Data Science using ScalaTion"

runMain scalation.modeling.classifying.hiddenMarkovTest3

def hiddenMarkovTest4(): Unit

The hiddenMarkovTest4 main function is used to test the HiddenMarkov class. Train the model (pi, a, b) based on the observed data.

The hiddenMarkovTest4 main function is used to test the HiddenMarkov class. Train the model (pi, a, b) based on the observed data.

Attributes

See also

"Introduction to Data Science using ScalaTion"

runMain scalation.modeling.classifying.hiddenMarkovTest4

def kNN_ClassifierTest(): Unit

The kNN_ClassifierTest main function is used to test the KNN_Classifier class.

The kNN_ClassifierTest main function is used to test the KNN_Classifier class.

runMain scalation.modeling.classifying.kNN_ClassifierTest

Attributes

def kNN_ClassifierTest2(): Unit

The kNN_ClassifierTest2 main function is used to test the KNN_Classifier class.

The kNN_ClassifierTest2 main function is used to test the KNN_Classifier class.

runMain scalation.modeling.classifying.kNN_ClassifierTest2

Attributes

def kNN_ClassifierTest3(): Unit

The kNN_ClassifierTest3 main function is used to test the KNN_Classifier class. It uses the Iris dataset where the classification/response y is unbalanced.

The kNN_ClassifierTest3 main function is used to test the KNN_Classifier class. It uses the Iris dataset where the classification/response y is unbalanced.

runMain scalation.modeling.classifying.kNN_ClassifierTest3

Attributes

def kNN_ClassifierTest4(): Unit

The kNN_ClassifierTest4 main function is used to test the KNN_Classifier class. It uses the Iris dataset where the classification/response y is imbalanced and downsampling is used to balance the classification.

The kNN_ClassifierTest4 main function is used to test the KNN_Classifier class. It uses the Iris dataset where the classification/response y is imbalanced and downsampling is used to balance the classification.

runMain scalation.modeling.classifying.kNN_ClassifierTest4

Attributes

def linDiscAnalyisTest(): Unit

The linDiscAnalyisTest main function is used to test the LinDiscAnalyis class.

The linDiscAnalyisTest main function is used to test the LinDiscAnalyis class.

Attributes

See also

people.revoledu.com/kardi/tutorial/LDA/Numerical%20Example.html

runMain scalation.modeling.classifying.linDiscAnalyisTest

The logisticRegressionTest main function tests the LogisticRegression class on the mtcars dataset.

The logisticRegressionTest main function tests the LogisticRegression class on the mtcars dataset.

Attributes

See also

Example_MTcars.scala

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.modeling.classifying.logisticRegressionTest

The logisticRegressionTest2 main function tests the LogisticRegression class.

The logisticRegressionTest2 main function tests the LogisticRegression class.

Attributes

See also

statmaster.sdu.dk/courses/st111/module03/index.html

www.stat.wisc.edu/~mchung/teaching/.../GLM.logistic.Rpackage.pdf

runMain scalation.modeling.classifying.logisticRegressionTest2

def naiveBayesRTest(): Unit

The naiveBayesRTest main function is used to test the NaiveBayesR class.

The naiveBayesRTest main function is used to test the NaiveBayesR class.

Attributes

See also

people.revoledu.com/kardi/tutorial/LDA/Numerical%20Example.html

runMain scalation.modeling.classifying.naiveBayesRTest

def naiveBayesRTest2(): Unit

The naiveBayesRTest2 main function is used to test the NaiveBayesR class. Ex: Classify whether a person is male (M) or female (F) based on the measured features.

The naiveBayesRTest2 main function is used to test the NaiveBayesR class. Ex: Classify whether a person is male (M) or female (F) based on the measured features.

Attributes

See also

en.wikipedia.org/wiki/Naive_Bayes_classifier

runMain scalation.modeling.classifying.naiveBayesRTest2

def naiveBayesTest(): Unit

The naiveBayesTest main function is used to test the NaiveBayes class.

The naiveBayesTest main function is used to test the NaiveBayes class.

runMain scalation.modeling.classifying.naiveBayesTest

Attributes

def naiveBayesTest2(): Unit

The naiveBayesTest2 main function is used to test the NaiveBayes class. Classify whether a car is more likely to be stolen (1) or not (1).

The naiveBayesTest2 main function is used to test the NaiveBayes class. Classify whether a car is more likely to be stolen (1) or not (1).

Attributes

See also

www.inf.u-szeged.hu/~ormandi/ai2/06-naiveBayes-example.pdf

runMain scalation.modeling.classiying.naiveBayesTest2

def naiveBayesTest3(): Unit

The naiveBayesTest3 main function 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.

The naiveBayesTest3 main function 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.modeling.classiying.naiveBayesTest3

Attributes

def naiveBayesTest4(): Unit

The naiveBayesTest4 main function is used to test the NaiveBayes class.

The naiveBayesTest4 main function is used to test the NaiveBayes class.

Attributes

See also

archive.ics.uci.edu/ml/datasets/Lenses

docs.roguewave.com/imsl/java/7.3/manual/api/com/imsl/datamining/NaiveBayesClassifierEx2.html

runMain scalation.modeling.classiying.naiveBayesTest4

The neuralNet_Class_3LTest main function tests the NeuralNet_Class_3L class. It tests the Neural Network three layer classifier on the Diabetes dataset.

The neuralNet_Class_3LTest main function tests the NeuralNet_Class_3L class. It tests the Neural Network three layer classifier on the Diabetes dataset.

runMain scalation.modeling.classifying.neuralNet_Class_3LTest

Attributes

def nullModelTest(): Unit

The nullModelTest main function is used to test the NullModel class. Classify whether to play tennis(1) or not (0).

The nullModelTest main function is used to test the NullModel class. Classify whether to play tennis(1) or not (0).

runMain scalation.modeling.classifying.nullModelTest

Attributes

def randomForestTest(): Unit

The randomForestTest main function is used to test the RandomForest class. It tests a simple case that does not require a file to be read.

The randomForestTest main function is used to test the RandomForest class. It tests a simple case that does not require a file to be read.

runMain scalation.modeling.classifying.randomForestTest

Attributes

def randomForestTest2(): Unit

The randomForestTest2 main function is used to test the RandomForest class. It tests the Random Forest classifier using well-known WineQuality Dataset.

The randomForestTest2 main function is used to test the RandomForest class. It tests the Random Forest classifier using well-known WineQuality Dataset.

runMain scalation.modeling.classifying.randomForestTest2

Attributes

def randomForestTest3(): Unit

The randomForestTest3 main function is used to test the RandomForest class. It tests the Random Forest classifier by specific numbers of trees.

The randomForestTest3 main function is used to test the RandomForest class. It tests the Random Forest classifier by specific numbers of trees.

runMain scalation.modeling.classifying.randomForestTest3

Attributes

def randomForestTest4(): Unit

The randomForestTest4 main function is used to test the RandomForest class. It tests RF using unseen data.

The randomForestTest4 main function is used to test the RandomForest class. It tests RF using unseen data.

runMain scalation.modeling.classifying.randomForestTest4

Attributes

def randomForestTest5(): Unit

The randomForestTest5 main function is used to test the RandomForest class. It tests the Random Forest classifier by specific numbers of trees.

The randomForestTest5 main function is used to test the RandomForest class. It tests the Random Forest classifier by specific numbers of trees.

runMain scalation.modeling.classifying.randomForestTest5

Attributes

def randomForestTest6(): Unit

The randomForestTest6 main function is used to test the RandomForest class. It tests the Random Forest classifier by specific numbers of trees.

The randomForestTest6 main function is used to test the RandomForest class. It tests the Random Forest classifier by specific numbers of trees.

runMain scalation.modeling.classifying.randomForestTest6

Attributes

def randomForestTest7(): Unit

The randomForestTest7 main function is used to test the RandomForest class. It tests the Random Forest classifier by specific numbers of trees.

The randomForestTest7 main function is used to test the RandomForest class. It tests the Random Forest classifier by specific numbers of trees.

runMain scalation.modeling.classifying.randomForestTest7

Attributes

def simpleLDATest(): Unit

The simpleLDATest main function tests the SimpleLDA class.

The simpleLDATest main function tests the SimpleLDA class.

Attributes

See also

people.revoledu.com/kardi/tutorial/LDA/Numerical%20Example.html

runMain scalation.modeling.classifying.SimpleLDATest

def simpleLDATest2(): Unit

The simpleLDATest2 main function tests the SimpleLDA class.

The simpleLDATest2 main function tests the SimpleLDA class.

runMain scalation.modeling.classifying.simpleLDATest2

Attributes

The simpleLogisticRegressionTest main function tests the SimpleLogisticRegression class on the mtcars dataset. Use built-in optimizer.

The simpleLogisticRegressionTest main function tests the SimpleLogisticRegression class on the mtcars dataset. Use built-in optimizer.

Attributes

See also

Example_MTcars

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.modeling.classifying.simpleLogisticRegressionTest

The simpleLogisticRegressionTest3 main function tests the SimpleLogisticRegression class. Compare SimpleLogisticRegressionTest with SimpleRegression.

The simpleLogisticRegressionTest3 main function tests the SimpleLogisticRegression class. Compare SimpleLogisticRegressionTest with SimpleRegression.

Attributes

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.modeling.classifying.simpleLogisticRegressionTest3

The simpleLogisticRegressionTest4 main function tests the SimpleLogisticRegression class.

The simpleLogisticRegressionTest4 main function tests the SimpleLogisticRegression class.

Attributes

See also

people.revoledu.com/kardi/tutorial/LDA/Numerical%20Example.html

runMain scalation.modeling.classifying.simpleLogisticRegressionTest4

The simpleLogisticRegressionTest5 main function tests the SimpleLogisticRegression class.

The simpleLogisticRegressionTest5 main function tests the SimpleLogisticRegression class.

runMain scalation.modeling.classifying.simpleLogisticRegressionTest5

Attributes

The simpleLogisticRegressionTest6 main function tests the logistic function.

The simpleLogisticRegressionTest6 main function tests the logistic function.

runMain scalation.modeling.classifying.simpleLogisticRegressionTest6

Attributes

The SupportVectorMachineTest main function tests the SupportVectorMachine class.

The SupportVectorMachineTest main function tests the SupportVectorMachine class.

runMain scalation.modeling.classifying.supportVectorMachineTest

Attributes

The supportVectorMachineTest2 main function tests the SupportVectorMachine class.

The supportVectorMachineTest2 main function tests the SupportVectorMachine class.

runMain scalation.modeling.classifying.supportVectorMachineTest2

Attributes

def tANBayesTest(): Unit

The tANBayesTest main function is used to test the TANBayes class on the Play Tennis example problem.

The tANBayesTest main function is used to test the TANBayes class on the Play Tennis example problem.

runMain scalation.modeling.classifying.tANBayesTest

Attributes

def tANBayesTest2(): Unit

The tANBayesTest2 main function is used to test the TANBayes class. Classify whether a car is more likely to be stolen (1) or not (1).

The tANBayesTest2 main function is used to test the TANBayes class. Classify whether a car is more likely to be stolen (1) or not (1).

Attributes

See also

www.inf.u-szeged.hu/~ormandi/ai2/06-tANBayes-example.pdf

runMain scalation.modeling.classiying.tANBayesTest2

def tANBayesTest3(): Unit

The tANBayesTest3 main function is used to test the TANBayes class. Given whether a person is Fast and/or Strong, classify them as making C = 1 or not making C = 0 the football team.

The tANBayesTest3 main function is used to test the TANBayes 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.modeling.classiying.tANBayesTest3

Attributes

def tANBayesTest4(): Unit

The tANBayesTest4 main function is used to test the TANBayes class.

The tANBayesTest4 main function is used to test the TANBayes class.

Attributes

See also

archive.ics.uci.edu/ml/datasets/Lenses

docs.roguewave.com/imsl/java/7.3/manual/api/com/imsl/datamining/TANBayesClassifierEx2.html

runMain scalation.modeling.classiying.tANBayesTest4