rztdl.dl.components.metrics.primitive package

Submodules

rztdl.dl.components.metrics.primitive.accuracy module

@created on: 12/20/19, @author: Himaprasoon, @version: v0.0.1

Description:

Sphinx Documentation Status:

class rztdl.dl.components.metrics.primitive.accuracy.Accuracy(name: str, prediction: typing.Union[str, tensorflow.python.framework.ops.Tensor], labels: typing.Union[str, tensorflow.python.framework.ops.Tensor])[source]

Bases: rztdl.dl.components.metrics.metric.Metric

Accuracy Metrics

Parameters:
  • name (str) – Name of the metrics
  • prediction (Union[str, Tensor]) – Predictions
  • labels (Union[str, Tensor]) – Labels
call(inputs, **kwargs)[source]
create(predictions, labels)[source]
validate()[source]

rztdl.dl.components.metrics.primitive.auc module

@created on: 1/13/20, @author: Vivek A Gupta,

Description:
AUC Metrics

..todo:

.. py:class:: AUC(name: str, predictions: typing.Union[str, tensorflow.python.framework.ops.Tensor], labels: typing.Union[str, tensorflow.python.framework.ops.Tensor], num_thresholds: int = 200, curve: rztdl.dl.constants.string_constants.AUCConstants = <AUCConstants.ROC: 'ROC'>)
module:rztdl.dl.components.metrics.primitive.auc

Bases: rztdl.dl.components.metrics.metric.Metric

AUC Metrics

type name:str
param name:Name of the metrics
type predictions:
 Union[str, Tensor]
param predictions:
 Predictions
type labels:Union[str, Tensor]
param labels:Labels
type num_thresholds:
 int
param num_thresholds:
 Number of thresholds
type curve:AUCConstants
param curve:Type of Curve
AUC.call(inputs, **kwargs)[source]
AUC.create(predictions, labels)[source]
AUC.parameter_validation(num_thresholds)[source]
AUC.validate(*args, **kwargs)

rztdl.dl.components.metrics.primitive.binary_accuracy module

@created on: 2020-01-13,
@author: shubham,
@version: v0.0.1

Description:

Sphinx Documentation Status: Complete

class rztdl.dl.components.metrics.primitive.binary_accuracy.BinaryAccuracy(name: str, predictions: typing.Union[str, tensorflow.python.framework.ops.Tensor], labels: typing.Union[str, tensorflow.python.framework.ops.Tensor], sample_weight: float = 1.0, threshold: float = 0.5)[source]

Bases: rztdl.dl.components.metrics.metric.Metric

Binary Accuracy Metrics

Calculates how often predictions matches labels

Parameters:
  • name (str) – Name of component
  • predictions (Union[str, Tensor]) – Predicated values
  • labels (Union[str, Tensor]) – Truth values
  • sample_weight (float) – Sample Weight
  • threshold (float) – Float representing the threshold for deciding whether prediction values are 1 or 0.
call(inputs, **kwargs)[source]
create(predictions, labels)[source]
validate(predictions, labels)[source]

rztdl.dl.components.metrics.primitive.categorical_accuracy module

@created on: 12/20/19, @author: Prathyush SP, @version: v0.0.1

Description:

Sphinx Documentation Status:

class rztdl.dl.components.metrics.primitive.categorical_accuracy.CategoricalAccuracy(name: str, predictions: typing.Union[str, tensorflow.python.framework.ops.Tensor], labels: typing.Union[str, tensorflow.python.framework.ops.Tensor], sample_weight: float = 1.0)[source]

Bases: rztdl.dl.components.metrics.metric.Metric

Categorical Accuracy Metrics

Parameters:
  • name (str) – Name of the metrics
  • predictions (Union[str, Tensor]) – Predictions
  • labels (Union[str, Tensor]) – Labels
  • sample_weight (float) – Sample Weight
call(inputs, **kwargs)[source]
create(predictions, labels)[source]
validate(labels, predictions)[source]

rztdl.dl.components.metrics.primitive.gini module

@created on: 1/13/20, @author: Vivek A Gupta,

Description:
Gini Metrics

..todo:

.. py:class:: Gini(name: str, predictions: typing.Union[str, tensorflow.python.framework.ops.Tensor], labels: typing.Union[str, tensorflow.python.framework.ops.Tensor], num_thresholds: int = 200, curve: rztdl.dl.constants.string_constants.AUCConstants = <AUCConstants.ROC: 'ROC'>)
module:rztdl.dl.components.metrics.primitive.gini

Bases: rztdl.dl.components.metrics.primitive.auc.AUC

Gini Metric

type name:str
param name:Name of the metrics
type predictions:
 Union[str, Tensor]
param predictions:
 Predictions
type labels:Union[str, Tensor]
param labels:Labels
type num_thresholds:
 int
param num_thresholds:
 Number of thresholds
type curve:AUCConstants
param curve:Type of Curve
Gini.call(inputs, **kwargs)[source]
Gini.create(predictions, labels)[source]
Gini.validate(*args, **kwargs)

rztdl.dl.components.metrics.primitive.mse_metric module

@created on: 12/20/19, @author: Himaprasoon, @version: v0.0.1

Description:

Sphinx Documentation Status:

class rztdl.dl.components.metrics.primitive.mse_metric.MSEMetric(name: str, predictions: typing.Union[str, tensorflow.python.framework.ops.Tensor], labels: typing.Union[str, tensorflow.python.framework.ops.Tensor])[source]

Bases: rztdl.dl.components.metrics.metric.Metric

Mean Squared Error

Parameters:
  • name (str) – Name of the metrics
  • predictions (Union[str, Tensor]) – Predictions
  • labels (Union[str, Tensor]) – Labels
call(inputs, **kwargs)[source]
create(predictions, labels)[source]
validate(predictions, labels)[source]
@author: Shubham Singh

Validation on input shapes

rztdl.dl.components.metrics.primitive.rmse_metric module

@created on: 2020-01-13,
@author: shubham,
@version: v0.0.1

Description:

Sphinx Documentation Status: Complete

class rztdl.dl.components.metrics.primitive.rmse_metric.RMSEMetric(name: str, predictions: typing.Union[str, tensorflow.python.framework.ops.Tensor], labels: typing.Union[str, tensorflow.python.framework.ops.Tensor])[source]

Bases: rztdl.dl.components.metrics.primitive.mse_metric.MSEMetric

Calculates root mean squared error : (MSE^(1/2))

Parameters:
  • name (str) – Component name
  • predictions (Union[str, Tensor]) – Predicted values
  • labels (Union[str, Tensor]) – Ground truth values
call(inputs, training, **kwargs)[source]

Calls square root over MSE to calculate MSE :param inputs: input Tensor :param training: checks whether in training or not :param kwargs: :return:

validate(predictions, labels)[source]

Module contents

@created on: 12/20/19, @author: Himaprasoon, @version: v0.0.1

Description:

Sphinx Documentation Status: