tensorfx.models¶
Machine Learning Scenarios¶
-
class
tensorfx.models.
ClassificationScenario
(labels)¶ Represents a classification machine learning scenario.
-
indices_to_labels
(indices, name='label')¶ Converts the specified integer indices into equivalent string label names.
The implementation builds a HashTable, to perform a lookup operation.
Parameters: indices – the int64 indices to convert into equivalent strings. Returns: A set of tensors representing the labels by name.
-
labels
¶ Retrieves the labels being predicted.
-
labels_to_indices
(strings, one_hot, name='indices')¶ Converts the specified string label names into equivalent indices.
The implementation builds a HashTable, to perform a lookup operation.
Parameters: - strings – the string labels to convert into equivalent indices.
- one_hot – whether to convert the indices into their one-hot representation.
Returns: A set of tensors representing the labels by indices.
-
num_labels
¶ Retrieves the number of labels being predicted.
-