Package

com.spotify

noether

Permalink

package noether

Visibility
  1. Public
  2. All

Type Members

  1. case class AUC(metric: AUCMetric, samples: Int = 100) extends Aggregator[Prediction[Boolean, Double], Curve, Double] with Product with Serializable

    Permalink

    Compute the "Area Under the Curve" for a collection of predictions.

    Compute the "Area Under the Curve" for a collection of predictions. Uses the Trapezoid method to compute the area.

    Internally a linspace is defined using the given number of samples. Each point in the linspace represents a threshold which is used to build a confusion matrix. The area is then defined on this list of confusion matrices.

    AUCMetric which is given to the aggregate selects the function to apply on the confusion matrix prior to the AUC calculation.

    metric

    Which function to apply on the confusion matrix.

    samples

    Number of samples to use for the curve definition.

  2. sealed trait AUCMetric extends AnyRef

    Permalink

    Which function to apply on the list of confusion matrices prior to the AUC calculation.

  3. case class BinaryConfusionMatrix(threshold: Double = 0.5) extends Aggregator[Prediction[Boolean, Double], Map[(Int, Int), Long], DenseMatrix[Long]] with Product with Serializable

    Permalink

    Special Case for a Binary Confusion Matrix to make it easier to compose with other binary aggregators

    Special Case for a Binary Confusion Matrix to make it easier to compose with other binary aggregators

    threshold

    Threshold to apply on predictions

  4. final case class ClassificationReport(threshold: Double = 0.5, beta: Double = 1.0) extends Aggregator[Prediction[Boolean, Double], Map[(Int, Int), Long], Report] with Product with Serializable

    Permalink

    Generate a Classification Report for a collection of binary predictions.

    Generate a Classification Report for a collection of binary predictions. The output of this aggregator will be a Report object.

    threshold

    Threshold to apply to get the predictions.

    beta

    Beta parameter used in the f-score calculation.

  5. final case class ConfusionMatrix(labels: Seq[Int]) extends Aggregator[Prediction[Int, Int], Map[(Int, Int), Long], DenseMatrix[Long]] with Product with Serializable

    Permalink

    Generic Consfusion Matrix Aggregator for any dimension.

    Generic Consfusion Matrix Aggregator for any dimension. Thresholds must be applied to make a prediction prior to using this aggregator.

    labels

    List of possible label values

  6. final case class MultiClassificationReport(labels: Seq[Int], beta: Double = 1.0) extends Aggregator[Prediction[Int, Int], Map[(Int, Int), Long], Map[Int, Report]] with Product with Serializable

    Permalink

    Generate a Classification Report for a collection of multiclass predictions.

    Generate a Classification Report for a collection of multiclass predictions. A report is generated for each class by treating the predictions as binary of either "class" or "not class". The output of this aggregator will be a map of classes and their Report objects.

    labels

    List of possible label values.

    beta

    Beta parameter used in the f-score calculation.

  7. final case class Prediction[L, S](actual: L, predicted: S) extends Product with Serializable

    Permalink

    Generic Prediction Object used by most aggregators

    Generic Prediction Object used by most aggregators

    L

    Type of the Real Value

    S

    Type of the Predicted Value

    actual

    Real value for this entry. Also normally seen as label.

    predicted

    Predicted value. Can be a class or a score depending on the aggregator.

  8. final case class Report(mcc: Double, fscore: Double, precision: Double, recall: Double, accuracy: Double, fpr: Double) extends Product with Serializable

    Permalink

    Classification Report

Value Members

  1. object ErrorRateSummary extends Aggregator[Prediction[Int, List[Double]], (Double, Long), Double] with Product with Serializable

    Permalink

    Measurement of what percentage of values were predicted incorrectly.

  2. object LogLoss extends Aggregator[Prediction[Int, List[Double]], (Double, Long), Double] with Product with Serializable

    Permalink

    LogLoss of the predictions.

  3. object PR extends AUCMetric with Product with Serializable

    Permalink

    Precision Recall Curve

  4. object ROC extends AUCMetric with Product with Serializable

    Permalink

    Receiver operating characteristic Curve

Ungrouped