trait Operators extends AnyRef
Model validation.
 Alphabetic
 By Inheritance
 Operators
 AnyRef
 Any
 by any2stringadd
 by StringFormat
 by Ensuring
 by ArrowAssoc
 Hide All
 Show All
 Public
 All
Value Members

final
def
!=(arg0: Any): Boolean
 Definition Classes
 AnyRef → Any

final
def
##(): Int
 Definition Classes
 AnyRef → Any
 def +(other: String): String
 def >[B](y: B): (Operators, B)

final
def
==(arg0: Any): Boolean
 Definition Classes
 AnyRef → Any

def
accuracy(truth: Array[Int], prediction: Array[Int]): Double
The accuracy is the proportion of true results (both true positives and true negatives) in the population.

def
adjustedRandIndex(truth: Array[Int], prediction: Array[Int]): Double
Adjusted Rand Index.
Adjusted Rand Index. Adjusted Rand Index assumes the generalized hypergeometric distribution as the model of randomness. The adjusted Rand index has the maximum value 1, and its expected value is 0 in the case of random clusters. A larger adjusted Rand index means a higher agreement between two partitions. The adjusted Rand index is recommended for measuring agreement even when the partitions compared have different numbers of clusters.

final
def
asInstanceOf[T0]: T0
 Definition Classes
 Any

def
auc(truth: Array[Int], probability: Array[Double]): Double
The area under the curve (AUC).
The area under the curve (AUC). When using normalized units, the area under the curve is equal to the probability that a classifier will rank a randomly chosen positive instance higher than a randomly chosen negative one (assuming 'positive' ranks higher than 'negative').

def
bootstrap[T <: AnyRef](x: Array[T], y: Array[Double], k: Int, measures: RegressionMeasure*)(trainer: ⇒ (Array[T], Array[Double]) ⇒ Regression[T]): Array[Double]
Bootstrap validation on a generic regression model.
Bootstrap validation on a generic regression model.
 x
data samples.
 y
response variable.
 k
kround bootstrap estimation.
 measures
validation measures such as MSE, AbsoluteDeviation, etc.
 trainer
a code block to return a regression model trained on the given data.
 returns
measure results.

def
bootstrap[T <: AnyRef](x: Array[T], y: Array[Int], k: Int, measures: ClassificationMeasure*)(trainer: ⇒ (Array[T], Array[Int]) ⇒ Classifier[T]): Array[Double]
Bootstrap validation on a generic classifier.
Bootstrap validation on a generic classifier. The bootstrap is a general tool for assessing statistical accuracy. The basic idea is to randomly draw datasets with replacement from the training data, each sample the same size as the original training set. This is done many times (say k = 100), producing k bootstrap datasets. Then we refit the model to each of the bootstrap datasets and examine the behavior of the fits over the k replications.
 x
data samples.
 y
sample labels.
 k
kround bootstrap estimation.
 measures
validation measures such as accuracy, specificity, etc.
 trainer
a code block to return a classifier trained on the given data.
 returns
measure results.

def
clone(): AnyRef
 Attributes
 protected[java.lang]
 Definition Classes
 AnyRef
 Annotations
 @throws( ... )

def
confusion(truth: Array[Int], prediction: Array[Int]): ConfusionMatrix
Computes the confusion matrix.

def
cv[T <: AnyRef](x: Array[T], y: Array[Double], k: Int, measures: RegressionMeasure*)(trainer: ⇒ (Array[T], Array[Double]) ⇒ Regression[T]): Array[Double]
Cross validation on a generic regression model.
Cross validation on a generic regression model.
 x
data samples.
 y
response variable.
 k
kfold cross validation.
 measures
validation measures such as MSE, AbsoluteDeviation, etc.
 trainer
a code block to return a regression model trained on the given data.
 returns
measure results.

def
cv[T <: AnyRef](x: Array[T], y: Array[Int], k: Int, measures: ClassificationMeasure*)(trainer: ⇒ (Array[T], Array[Int]) ⇒ Classifier[T]): Array[Double]
Cross validation on a generic classifier.
Cross validation on a generic classifier. Crossvalidation is a technique for assessing how the results of a statistical analysis will generalize to an independent data set. It is mainly used in settings where the goal is prediction, and one wants to estimate how accurately a predictive model will perform in practice. One round of crossvalidation involves partitioning a sample of data into complementary subsets, performing the analysis on one subset (called the training set), and validating the analysis on the other subset (called the validation set or testing set). To reduce variability, multiple rounds of crossvalidation are performed using different partitions, and the validation results are averaged over the rounds.
 x
data samples.
 y
sample labels.
 k
kfold cross validation.
 measures
validation measures such as accuracy, specificity, etc.
 trainer
a code block to return a classifier trained on the given data.
 returns
measure results.
 def ensuring(cond: (Operators) ⇒ Boolean, msg: ⇒ Any): Operators
 def ensuring(cond: (Operators) ⇒ Boolean): Operators
 def ensuring(cond: Boolean, msg: ⇒ Any): Operators
 def ensuring(cond: Boolean): Operators

final
def
eq(arg0: AnyRef): Boolean
 Definition Classes
 AnyRef

def
equals(arg0: Any): Boolean
 Definition Classes
 AnyRef → Any

def
f1(truth: Array[Int], prediction: Array[Int]): Double
The Fscore (or Fmeasure) considers both the precision and the recall of the test to compute the score.
The Fscore (or Fmeasure) considers both the precision and the recall of the test to compute the score. The precision p is the number of correct positive results divided by the number of all positive results, and the recall r is the number of correct positive results divided by the number of positive results that should have been returned.
The traditional or balanced Fscore (F1 score) is the harmonic mean of precision and recall, where an F1 score reaches its best value at 1 and worst at 0.

def
fallout(truth: Array[Int], prediction: Array[Int]): Double
Fallout, false alarm rate, or false positive rate (FPR).
Fallout, false alarm rate, or false positive rate (FPR). Fallout is actually Type I error and closely related to specificity (1  specificity).

def
fdr(truth: Array[Int], prediction: Array[Int]): Double
The false discovery rate (FDR) is ratio of false positives to combined true and false positives, which is actually 1  precision.

def
finalize(): Unit
 Attributes
 protected[java.lang]
 Definition Classes
 AnyRef
 Annotations
 @throws( classOf[java.lang.Throwable] )
 def formatted(fmtstr: String): String

final
def
getClass(): Class[_]
 Definition Classes
 AnyRef → Any

def
hashCode(): Int
 Definition Classes
 AnyRef → Any

final
def
isInstanceOf[T0]: Boolean
 Definition Classes
 Any

def
loocv[T <: AnyRef](x: Array[T], y: Array[Double], measures: RegressionMeasure*)(trainer: ⇒ (Array[T], Array[Double]) ⇒ Regression[T]): Array[Double]
Leaveoneout cross validation on a generic regression model.
Leaveoneout cross validation on a generic regression model.
 x
data samples.
 y
response variable.
 measures
validation measures such as MSE, AbsoluteDeviation, etc.
 trainer
a code block to return a regression model trained on the given data.
 returns
measure results.

def
loocv[T <: AnyRef](x: Array[T], y: Array[Int], measures: ClassificationMeasure*)(trainer: ⇒ (Array[T], Array[Int]) ⇒ Classifier[T]): Array[Double]
Leaveoneout cross validation on a generic classifier.
Leaveoneout cross validation on a generic classifier. LOOCV uses a single observation from the original sample as the validation data, and the remaining observations as the training data. This is repeated such that each observation in the sample is used once as the validation data. This is the same as a Kfold crossvalidation with K being equal to the number of observations in the original sample. Leaveoneout crossvalidation is usually very expensive from a computational point of view because of the large number of times the training process is repeated.
 x
data samples.
 y
sample labels.
 measures
validation measures such as accuracy, specificity, etc.
 trainer
a code block to return a classifier trained on the given data.
 returns
measure results.

def
mad(truth: Array[Double], prediction: Array[Double]): Double
Mean absolute deviation error.

def
mse(truth: Array[Double], prediction: Array[Double]): Double
Mean squared error.

def
mutualInformationScore(truth: Array[Int], prediction: Array[Int]): Double
Normalized mutual information score between two clusterings.

final
def
ne(arg0: AnyRef): Boolean
 Definition Classes
 AnyRef

final
def
notify(): Unit
 Definition Classes
 AnyRef

final
def
notifyAll(): Unit
 Definition Classes
 AnyRef

def
precision(truth: Array[Int], prediction: Array[Int]): Double
The precision or positive predictive value (PPV) is ratio of true positives to combined true and false positives, which is different from sensitivity.

def
randIndex(truth: Array[Int], prediction: Array[Int]): Double
Rand index is defined as the number of pairs of objects that are either in the same group or in different groups in both partitions divided by the total number of pairs of objects.
Rand index is defined as the number of pairs of objects that are either in the same group or in different groups in both partitions divided by the total number of pairs of objects. The Rand index lies between 0 and 1. When two partitions agree perfectly, the Rand index achieves the maximum value 1. A problem with Rand index is that the expected value of the Rand index between two random partitions is not a constant. This problem is corrected by the adjusted Rand index.

def
recall(truth: Array[Int], prediction: Array[Int]): Double
In information retrieval area, sensitivity is called recall.

def
rmse(truth: Array[Double], prediction: Array[Double]): Double
Root mean squared error.

def
rss(truth: Array[Double], prediction: Array[Double]): Double
Residual sum of squares.

def
sensitivity(truth: Array[Int], prediction: Array[Int]): Double
Sensitivity or true positive rate (TPR) (also called hit rate, recall) is a statistical measures of the performance of a binary classification test.
Sensitivity or true positive rate (TPR) (also called hit rate, recall) is a statistical measures of the performance of a binary classification test. Sensitivity is the proportion of actual positives which are correctly identified as such.

def
specificity(truth: Array[Int], prediction: Array[Int]): Double
Specificity or True Negative Rate is a statistical measures of the performance of a binary classification test.
Specificity or True Negative Rate is a statistical measures of the performance of a binary classification test. Specificity measures the proportion of negatives which are correctly identified.

final
def
synchronized[T0](arg0: ⇒ T0): T0
 Definition Classes
 AnyRef

def
test[T, C <: Classifier[T]](x: Array[T], y: Array[Int], testx: Array[T], testy: Array[Int], parTest: Boolean = true)(trainer: ⇒ (Array[T], Array[Int]) ⇒ C): C
Test a generic classifier.
Test a generic classifier. The accuracy will be measured and printed out on standard output.
 T
the type of training and test data.
 x
training data.
 y
training labels.
 testx
test data.
 testy
test data labels.
 parTest
Parallel test if true.
 trainer
a code block to return a classifier trained on the given data.
 returns
the trained classifier.

def
test2[T, C <: Classifier[T]](x: Array[T], y: Array[Int], testx: Array[T], testy: Array[Int], parTest: Boolean = true)(trainer: ⇒ (Array[T], Array[Int]) ⇒ C): C
Test a binary classifier.
Test a binary classifier. The accuracy, sensitivity, specificity, precision, F1 score, F2 score, and F0.5 score will be measured and printed out on standard output.
 T
the type of training and test data.
 x
training data.
 y
training labels.
 testx
test data.
 testy
test data labels.
 parTest
Parallel test if true.
 trainer
a code block to return a binary classifier trained on the given data.
 returns
the trained classifier.

def
test2soft[T, C <: SoftClassifier[T]](x: Array[T], y: Array[Int], testx: Array[T], testy: Array[Int], parTest: Boolean = true)(trainer: ⇒ (Array[T], Array[Int]) ⇒ C): C
Test a binary soft classifier.
Test a binary soft classifier. The accuracy, sensitivity, specificity, precision, F1 score, F2 score, F0.5 score, and AUC will be measured and printed out on standard output.
 T
the type of training and test data.
 x
training data.
 y
training labels.
 testx
test data.
 testy
test data labels.
 parTest
Parallel test if true.
 trainer
a code block to return a binary classifier trained on the given data.
 returns
the trained classifier.

def
toString(): String
 Definition Classes
 AnyRef → Any

final
def
wait(): Unit
 Definition Classes
 AnyRef
 Annotations
 @throws( ... )

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

final
def
wait(arg0: Long): Unit
 Definition Classes
 AnyRef
 Annotations
 @throws( ... )
 def →[B](y: B): (Operators, B)
High level Smile operators in Scala.