HMC-loss
Abstruct
Python-implemented hierarchical multi-class validation metrics: HMC-loss . Original paper is (Bi&Kwok, 2012) .
Install
pip install hmc_loss
Requirement
numpy
Network X
How to use
This metrics is implemented like scikit-learn metrics.
from hmc_loss import hmc_loss_score, get_cost_list import numpy as np # Generate label data(2-D array of numpy) true_label = np.random.randint(2, size(100, 100)) pred_label = np.random.randint(2, size(100, 100)) # Generate test graph(Di-Graph of NetworkX) graph = nx.gnc_graph(100) # Generate element list of graph node label_list = list(range(100)) # Calculate cost of each node in graph cost_list = get_cost_list(graph, 0, label_list) # Calculate HMC-loss hmc_loss_score(true_label, pred_label, graph, 0, label_list, cost_list, alpha=0.5, beta=1.5)
Licence
Metadata
Release files for hmc_loss 1.0.0
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 |
|---|---|---|---|---|
| hmc_loss-1.0.0.tar.gz | 3.7 kB | Without provenance | Details for hmc_loss-1.0.0.tar.gz |
Release files / hmc_loss-1.0.0.tar.gz
| Download URL | hmc_loss-1.0.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d454b6d715eaf37268340ba5a55b384b42d4bebf923c5433361c585eb0649dc
|
|
BLAKE2b-256 checksum How to use checksums |
4416d8cd51d8ef7f4a6212ef699d243dbfe83222dd7d22eec440f27b4d164305
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for hmc_loss 1.0.0
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.