Class/Object

org.platanios.tensorflow.api.ops.metrics

GroupedPrecision

Related Docs: object GroupedPrecision | package metrics

Permalink

class GroupedPrecision extends Metric[(Output, Output), Output]

Grouped precision metric.

The metric creates two local variables, truePositives and falsePositives that are used to compute the precision of some provided predictions and targets. The predictions must be in the form of predicted label indices. The precision is ultimately returned as an idempotent operation that simply divides truePositives by truePositives + falsePositives.

For estimation of the metric over a stream of data, the function creates an update operation that updates these variables and returns the precision.

If weights is None, the weights default to 1. Use weights of 0 to mask values.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GroupedPrecision
  2. Metric
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GroupedPrecision(nameScope: String, defaultWeights: Option[tensors.Tensor[types.FLOAT32]] = None, labelID: Option[Int] = None, variablesCollections: Set[Key[variables.Variable]] = Set(METRIC_VARIABLES), valuesCollections: Set[Key[Output]] = Set(METRIC_VALUES), updatesCollections: Set[Key[Output]] = Set(METRIC_UPDATES), resetsCollections: Set[Key[Op]] = Set(METRIC_RESETS))

    Permalink

    nameScope

    Name prefix for the created ops.

    defaultWeights

    Default weights with which all computed metric values are multiplied.

    labelID

    Optional label for which we want to compute the precision.

    variablesCollections

    Graph collections in which to add the metric variables (for streaming metrics).

    valuesCollections

    Graph collections in which to add the metric values.

    updatesCollections

    Graph collections in which to add the metric updates.

    resetsCollections

    Graph collections in which to add the metric resets.

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. def compute(values: (Output, Output), weights: Option[Output] = None, name: String = s"$name/Compute"): Output

    Permalink

    Computes the value of this metric for the provided predictions and targets, optionally weighted by weights.

    Computes the value of this metric for the provided predictions and targets, optionally weighted by weights.

    values

    Tuple containing the predictions tensor and the targets tensor.

    weights

    Optional tensor containing weights for the values.

    name

    Name prefix for the created ops.

    returns

    Created output containing the metric value.

    Definition Classes
    GroupedPrecisionMetric
  7. val defaultWeights: Option[tensors.Tensor[types.FLOAT32]]

    Permalink

    Default weights with which all computed metric values are multiplied.

    Default weights with which all computed metric values are multiplied.

    Attributes
    protected
  8. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def getWeights(providedWeights: Option[Output]): Option[Output]

    Permalink
    Attributes
    protected
    Definition Classes
    Metric
  13. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  15. val labelID: Option[Int]

    Permalink

    Optional label for which we want to compute the precision.

  16. def name: String

    Permalink

    Name of this metric.

    Name of this metric.

    Definition Classes
    GroupedPrecisionMetric
  17. val nameScope: String

    Permalink

    Name prefix for the created ops.

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

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

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

    Permalink
    Definition Classes
    AnyRef
  21. val resetsCollections: Set[Key[Op]]

    Permalink

    Graph collections in which to add the metric resets.

  22. def streaming(values: (Output, Output), weights: Option[Output] = None, name: String = s"$name/Streaming"): StreamingInstance[Output]

    Permalink

    Creates ops for computing the value of this metric in a streaming fashion.

    Creates ops for computing the value of this metric in a streaming fashion. This function returns an op for obtaining the value of this metric, as well as a pair of ops to update its accumulated value and reset it.

    values

    Tuple containing the predictions tensor and the targets tensor.

    weights

    Optional tensor containing weights for the predictions.

    name

    Name prefix for the created ops.

    returns

    Tuple containing: (i) an output representing the current value of the metric, (ii) an op used to update its current value and obtain the new value, and (iii) an op used to reset its value.

    Definition Classes
    GroupedPrecisionMetric
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

    Permalink
    Definition Classes
    Metric → AnyRef → Any
  25. val updatesCollections: Set[Key[Output]]

    Permalink

    Graph collections in which to add the metric updates.

  26. val valuesCollections: Set[Key[Output]]

    Permalink

    Graph collections in which to add the metric values.

  27. val variablesCollections: Set[Key[variables.Variable]]

    Permalink

    Graph collections in which to add the metric variables (for streaming metrics).

  28. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def weights: Option[tensors.Tensor[types.FLOAT32]]

    Permalink

    Weights to multiply the provided values with when computing the value of this metric.

    Weights to multiply the provided values with when computing the value of this metric.

    Definition Classes
    GroupedPrecisionMetric

Inherited from Metric[(Output, Output), Output]

Inherited from AnyRef

Inherited from Any

Ungrouped