tf1
F1-score metrics for classification models in TensorFlow. There are 3 average modes provided:
- binary
- macro
- micro
Usage
from tf1 import f1_binary
# use f1_binary as any other metric from tf.metrics.*
Note, that due to streaming nature of metric computation process, "macro" and "micro" average metrics should know total number of classes. Use them as follows:
from tf1 import f1_macro, f1_micro
def my_task_f1_macro(
labels, predictions, num_classes, weights=None,
metrics_collections=None, updates_collections=None,
name=None):
return f1_macro(
labels=labels,
predictions=predictions,
num_classes=123, # Required
weights=weights,
metrics_collections=metrics_collections,
updates_collections=updates_collections,
name=name
)
# use my_task_f1_macro as any other metric from tf.metrics.*
Metadata
Release files for tf1 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tf1-1.1.1.tar.gz | 5.9 kB | Without provenance | Details for tf1-1.1.1.tar.gz |
Release files / tf1-1.1.1.tar.gz
| Download URL | tf1-1.1.1.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3edd395f346453c549a5ee1c061c2bc14d8d64e5da09d826c3f52e2a67f78f9f
|
|
BLAKE2b-256 checksum How to use checksums |
f5239bd29ec433ba776a80e57e04c374abfed9378fa3b44f77bfde6e4fc12254
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
|
Security for tf1 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.