Trait

smile.validation

Operators

Related Doc: package validation

Permalink

trait Operators extends AnyRef

Model validation.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Operators
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Operators to any2stringadd[Operators] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Operators, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Operators to ArrowAssoc[Operators] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def accuracy(truth: Array[Int], prediction: Array[Int]): Double

    Permalink

    The accuracy is the proportion of true results (both true positives and true negatives) in the population.

  7. def adjustedRandIndex(truth: Array[Int], prediction: Array[Int]): Double

    Permalink

    Adjusted Rand Index.

    Adjusted Rand Index. Adjusted Rand Index assumes the generalized hyper-geometric 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.

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def auc(truth: Array[Int], probability: Array[Double]): Double

    Permalink

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

  10. def bootstrap[T <: AnyRef](x: Array[T], y: Array[Double], k: Int, measures: RegressionMeasure*)(trainer: ⇒ (Array[T], Array[Double]) ⇒ Regression[T]): Array[Double]

    Permalink

    Bootstrap validation on a generic regression model.

    Bootstrap validation on a generic regression model.

    x

    data samples.

    y

    response variable.

    k

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

  11. def bootstrap[T <: AnyRef](x: Array[T], y: Array[Int], k: Int, measures: ClassificationMeasure*)(trainer: ⇒ (Array[T], Array[Int]) ⇒ Classifier[T]): Array[Double]

    Permalink

    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

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

  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def confusion(truth: Array[Int], prediction: Array[Int]): ConfusionMatrix

    Permalink

    Computes the confusion matrix.

  14. def cv[T <: AnyRef](x: Array[T], y: Array[Double], k: Int, measures: RegressionMeasure*)(trainer: ⇒ (Array[T], Array[Double]) ⇒ Regression[T]): Array[Double]

    Permalink

    Cross validation on a generic regression model.

    Cross validation on a generic regression model.

    x

    data samples.

    y

    response variable.

    k

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

  15. def cv[T <: AnyRef](x: Array[T], y: Array[Double], split: CrossValidation, measures: RegressionMeasure*)(trainer: ⇒ (Array[T], Array[Double]) ⇒ Regression[T]): Array[Double]

    Permalink

    Cross validation on a generic regression model.

    Cross validation on a generic regression model. Samples will be randomly shuffled first. So the results will not be repeatable. To disable shuffle, pass a customized CrossValidation object.

    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.

  16. def cv[T <: AnyRef](x: Array[T], y: Array[Int], split: CrossValidation, measures: ClassificationMeasure*)(trainer: ⇒ (Array[T], Array[Int]) ⇒ Classifier[T]): Array[Double]

    Permalink

    Cross validation on a generic classifier.

    Cross validation on a generic classifier. Cross-validation 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 cross-validation 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 cross-validation are performed using different partitions, and the validation results are averaged over the rounds.

    x

    data samples.

    y

    sample labels.

    split

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

  17. def cv[T <: AnyRef](x: Array[T], y: Array[Int], k: Int, measures: ClassificationMeasure*)(trainer: ⇒ (Array[T], Array[Int]) ⇒ Classifier[T]): Array[Double]

    Permalink

    Cross validation on a generic classifier.

    Cross validation on a generic classifier. Samples will be randomly shuffled first. So the results will not be repeatable. To disable shuffle, pass a customized CrossValidation object. Cross-validation 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 cross-validation 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 cross-validation are performed using different partitions, and the validation results are averaged over the rounds.

    x

    data samples.

    y

    sample labels.

    k

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

  18. def ensuring(cond: (Operators) ⇒ Boolean, msg: ⇒ Any): Operators

    Permalink
    Implicit information
    This member is added by an implicit conversion from Operators to Ensuring[Operators] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: (Operators) ⇒ Boolean): Operators

    Permalink
    Implicit information
    This member is added by an implicit conversion from Operators to Ensuring[Operators] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: Boolean, msg: ⇒ Any): Operators

    Permalink
    Implicit information
    This member is added by an implicit conversion from Operators to Ensuring[Operators] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean): Operators

    Permalink
    Implicit information
    This member is added by an implicit conversion from Operators to Ensuring[Operators] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  24. def f1(truth: Array[Int], prediction: Array[Int]): Double

    Permalink

    The F-score (or F-measure) considers both the precision and the recall of the test to compute the score.

    The F-score (or F-measure) 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 F-score (F1 score) is the harmonic mean of precision and recall, where an F1 score reaches its best value at 1 and worst at 0.

  25. def fallout(truth: Array[Int], prediction: Array[Int]): Double

    Permalink

    Fall-out, false alarm rate, or false positive rate (FPR).

    Fall-out, false alarm rate, or false positive rate (FPR). Fall-out is actually Type I error and closely related to specificity (1 - specificity).

  26. def fdr(truth: Array[Int], prediction: Array[Int]): Double

    Permalink

    The false discovery rate (FDR) is ratio of false positives to combined true and false positives, which is actually 1 - precision.

  27. def finalize(): Unit

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

    Permalink
    Implicit information
    This member is added by an implicit conversion from Operators to StringFormat[Operators] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  29. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  30. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  31. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  32. def loocv[T <: AnyRef](x: Array[T], y: Array[Double], measures: RegressionMeasure*)(trainer: ⇒ (Array[T], Array[Double]) ⇒ Regression[T]): Array[Double]

    Permalink

    Leave-one-out cross validation on a generic regression model.

    Leave-one-out 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.

  33. def loocv[T <: AnyRef](x: Array[T], y: Array[Int], measures: ClassificationMeasure*)(trainer: ⇒ (Array[T], Array[Int]) ⇒ Classifier[T]): Array[Double]

    Permalink

    Leave-one-out cross validation on a generic classifier.

    Leave-one-out 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 K-fold cross-validation with K being equal to the number of observations in the original sample. Leave-one-out cross-validation 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.

  34. def mad(truth: Array[Double], prediction: Array[Double]): Double

    Permalink

    Mean absolute deviation error.

  35. def mcc(truth: Array[Int], prediction: Array[Int]): Double

    Permalink

    MCC is a correlation coefficient between prediction and actual values.

    MCC is a correlation coefficient between prediction and actual values. It is considered as a balanced measure for binary classification, even in unbalanced data sets. It varies between -1 and +1. 1 when there is perfect agreement between ground truth and prediction, -1 when there is a perfect disagreement between ground truth and predictions. MCC of 0 means the model is not better then random.

  36. def mse(truth: Array[Double], prediction: Array[Double]): Double

    Permalink

    Mean squared error.

  37. def mutualInformationScore(truth: Array[Int], prediction: Array[Int]): Double

    Permalink

    Normalized mutual information score between two clusterings.

  38. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  39. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  40. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  41. def precision(truth: Array[Int], prediction: Array[Int]): Double

    Permalink

    The precision or positive predictive value (PPV) is ratio of true positives to combined true and false positives, which is different from sensitivity.

  42. def randIndex(truth: Array[Int], prediction: Array[Int]): Double

    Permalink

    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.

  43. def recall(truth: Array[Int], prediction: Array[Int]): Double

    Permalink

    In information retrieval area, sensitivity is called recall.

  44. def rmse(truth: Array[Double], prediction: Array[Double]): Double

    Permalink

    Root mean squared error.

  45. def rss(truth: Array[Double], prediction: Array[Double]): Double

    Permalink

    Residual sum of squares.

  46. def sensitivity(truth: Array[Int], prediction: Array[Int]): Double

    Permalink

    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.

  47. def specificity(truth: Array[Int], prediction: Array[Int]): Double

    Permalink

    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.

  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  49. 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

    Permalink

    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.

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

    Permalink

    Test a binary classifier.

    Test a binary classifier. The accuracy, sensitivity, specificity, precision, F-1 score, F-2 score, and F-0.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.

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

    Permalink

    Test a binary soft classifier.

    Test a binary soft classifier. The accuracy, sensitivity, specificity, precision, F-1 score, F-2 score, F-0.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.

  52. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  53. final def wait(): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. def [B](y: B): (Operators, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Operators to ArrowAssoc[Operators] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Operators to any2stringadd[Operators]

Inherited by implicit conversion StringFormat from Operators to StringFormat[Operators]

Inherited by implicit conversion Ensuring from Operators to Ensuring[Operators]

Inherited by implicit conversion ArrowAssoc from Operators to ArrowAssoc[Operators]

Ungrouped