linear-probe
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})
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
linear_probe-0.1.0.tar.gz
(2.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linear_probe-0.1.0.tar.gz.
File metadata
- Download URL: linear_probe-0.1.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e56d755958995c982c8b1f615f1dce925bc985d769ba024ceb58a2b86997e925
|
|
| MD5 |
e54846580402880f0ab6fd72de71c458
|
|
| BLAKE2b-256 |
a6517b6035c38fdfea9c428cb1dc63d12453af5612c468e53ebc681e0481748a
|
File details
Details for the file linear_probe-0.1.0-py3-none-any.whl.
File metadata
- Download URL: linear_probe-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57ab7b81b0650a70ef37f0f38205f3cf1e22ec514a292b843cf61c51dbfe1551
|
|
| MD5 |
17726fa56ff5cd0ffa8823b748de3b7b
|
|
| BLAKE2b-256 |
5785f5bea6e802f7af5558794f0716d2ae57c51d482d3e102d58f710fe6b4c40
|