classifiers
ruff check --select I --fix . && ruff format .
Expected input is features and labels columns.
| task | labels per example | example |
|---|---|---|
binary |
scalar 0/1 |
1 |
multilabel |
multi-hot list, length num_labels |
[1, 0, 1] |
multiclass |
int class index 0..k-1 |
2 |
Multilabel must be multi-hot, not index lists. To convert [0, 2] → [1, 0, 1]:
def to_multihot(ex, k):
v = [0.0] * k
for i in ex["labels"]:
v[i] = 1.0
return {"labels": v}
ds = ds.map(to_multihot, fn_kwargs={"k": num_labels})
Metadata
Release files for classifiers 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| classifiers-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / classifiers-0.1.0-py3-none-any.whl
| Download URL | classifiers-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79bf4fa8e9328e8c4de4b5b5eb8d62d90d7f7609313b4d175d480febe898c872
|
|
BLAKE2b-256 checksum How to use checksums |
2e2862e33e5623d307eec9bed4ba74634544489ea48d3353304768a094f0d9bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|