Class

com.salesforce.op.evaluators

MulticlassThresholdMetrics

Related Doc: package evaluators

Permalink

case class MulticlassThresholdMetrics(topNs: Seq[Int], thresholds: Seq[Double], correctCounts: Map[Int, Seq[Long]], incorrectCounts: Map[Int, Seq[Long]], noPredictionCounts: Map[Int, Seq[Long]]) extends EvaluationMetrics with Product with Serializable

Threshold-based metrics for multiclass classification

Classifications being correct, incorrect, or no classification are defined in terms of the topN and score threshold to be: Correct - score of the true label is in the top N scores AND the score of the true label is >= threshold Incorrect - score of top predicted label >= threshold AND (true label NOT in top N predicted labels OR score of true label < threshold) No prediction - otherwise (score of top predicted label < threshold)

topNs

list of topN values (used as keys for the count maps)

thresholds

list of threshold values (correspond to thresholds at the indices of the arrays in the count maps)

correctCounts

map from topN value to an array of counts of correct classifications at each threshold

incorrectCounts

map from topN value to an array of counts of incorrect classifications at each threshold

noPredictionCounts

map from topN value to an array of counts of no prediction at each threshold

Linear Supertypes
Product, Equals, EvaluationMetrics, JsonLike, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MulticlassThresholdMetrics
  2. Product
  3. Equals
  4. EvaluationMetrics
  5. JsonLike
  6. Serializable
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MulticlassThresholdMetrics(topNs: Seq[Int], thresholds: Seq[Double], correctCounts: Map[Int, Seq[Long]], incorrectCounts: Map[Int, Seq[Long]], noPredictionCounts: Map[Int, Seq[Long]])

    Permalink

    topNs

    list of topN values (used as keys for the count maps)

    thresholds

    list of threshold values (correspond to thresholds at the indices of the arrays in the count maps)

    correctCounts

    map from topN value to an array of counts of correct classifications at each threshold

    incorrectCounts

    map from topN value to an array of counts of incorrect classifications at each threshold

    noPredictionCounts

    map from topN value to an array of counts of no prediction at each threshold

Value Members

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val correctCounts: Map[Int, Seq[Long]]

    Permalink

    map from topN value to an array of counts of correct classifications at each threshold

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. val incorrectCounts: Map[Int, Seq[Long]]

    Permalink

    map from topN value to an array of counts of incorrect classifications at each threshold

  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. val noPredictionCounts: Map[Int, Seq[Long]]

    Permalink

    map from topN value to an array of counts of no prediction at each threshold

  14. final def notify(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
  17. val thresholds: Seq[Double]

    Permalink

    list of threshold values (correspond to thresholds at the indices of the arrays in the count maps)

  18. def toJson(pretty: Boolean = true): String

    Permalink

    Write this instance to json string

    Write this instance to json string

    pretty

    should pretty print

    returns

    json string of the instance

    Definition Classes
    JsonLike
  19. def toMap: Map[String, Any]

    Permalink

    Convert metrics class to a map

    Convert metrics class to a map

    returns

    a map from metric name to metric value

    Definition Classes
    EvaluationMetrics
  20. def toMetadata(skipUnsupported: Boolean = false): Metadata

    Permalink

    Convert metrics into Metadata for saving

    Convert metrics into Metadata for saving

    skipUnsupported

    skip unsupported values

    returns

    Metadata metadata

    Definition Classes
    EvaluationMetrics
    Exceptions thrown

    RuntimeException in case of unsupported value type

  21. def toString(): String

    Permalink

    This instance json string

    This instance json string

    returns

    json string of the instance

    Definition Classes
    JsonLike → AnyRef → Any
  22. val topNs: Seq[Int]

    Permalink

    list of topN values (used as keys for the count maps)

  23. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Product

Inherited from Equals

Inherited from EvaluationMetrics

Inherited from JsonLike

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped