Publish 0.0.1_encoder
Browse files- README.md +9 -9
- checksums.json +16 -16
- confidence_model.pt +1 -1
- ephysatlas_model.json +5 -6
- example/expected_predictions.parquet +2 -2
- example/features_sample.parquet +2 -2
- neighbor_bank.npz +2 -2
- preprocessing/channel_stats.npz +2 -2
- results/confidence_validation.json +5 -5
- results/test_r2.json +44 -44
- spatial_encoder.pt +1 -1
README.md
CHANGED
|
@@ -9,13 +9,13 @@ tags:
|
|
| 9 |
- international-brain-lab
|
| 10 |
---
|
| 11 |
|
| 12 |
-
#
|
| 13 |
|
| 14 |
Predicts the **electrophysiological feature vector expected at a channel's position** -- from
|
| 15 |
the anatomical context at that position and the recorded features of nearby channels on other
|
| 16 |
insertions (the position selects both; the network itself is not given coordinates). Trained by the
|
| 17 |
-
[International Brain Laboratory](https://www.internationalbrainlab.com/) on the
|
| 18 |
-
|
| 19 |
|
| 20 |
> **The input is a position, not features.** This is the inverse of the region classifier: that
|
| 21 |
> model takes features and returns a region; this one takes a channel's `x, y, z` (Allen frame,
|
|
@@ -61,7 +61,7 @@ Also published, for users who preprocess new recordings or evaluate the model:
|
|
| 61 |
import pandas as pd
|
| 62 |
from ephysatlas import load_pretrained
|
| 63 |
|
| 64 |
-
model = load_pretrained("int-brain-lab/ea-encoder-channel", revision="
|
| 65 |
df = pd.read_parquet("example/features_sample.parquet") # channel positions (x, y, z)
|
| 66 |
out = model.predict(df) # one pred_<feature> column each
|
| 67 |
print(out.head())
|
|
@@ -101,9 +101,9 @@ input return identical predictions.
|
|
| 101 |
|
| 102 |
## Reproducibility
|
| 103 |
|
| 104 |
-
**Pin the revision.** `revision="
|
| 105 |
-
`main`, which tracks whichever model is currently recommended and *will* change when a new
|
| 106 |
-
|
| 107 |
|
| 108 |
`ephysatlas_model.json` records the training-time `environment` and `random_seed`. Verify your
|
| 109 |
install reproduces the shipped output:
|
|
@@ -114,5 +114,5 @@ model.selftest()
|
|
| 114 |
|
| 115 |
## Citation
|
| 116 |
|
| 117 |
-
Please cite the
|
| 118 |
-
feature
|
|
|
|
| 9 |
- international-brain-lab
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# ELECTRA channel-level model 0.0.1
|
| 13 |
|
| 14 |
Predicts the **electrophysiological feature vector expected at a channel's position** -- from
|
| 15 |
the anatomical context at that position and the recorded features of nearby channels on other
|
| 16 |
insertions (the position selects both; the network itself is not given coordinates). Trained by the
|
| 17 |
+
[International Brain Laboratory](https://www.internationalbrainlab.com/) on the feature release
|
| 18 |
+
`2026_W42` of ELECTRA, the IBL Electrophysiological Reference Atlas.
|
| 19 |
|
| 20 |
> **The input is a position, not features.** This is the inverse of the region classifier: that
|
| 21 |
> model takes features and returns a region; this one takes a channel's `x, y, z` (Allen frame,
|
|
|
|
| 61 |
import pandas as pd
|
| 62 |
from ephysatlas import load_pretrained
|
| 63 |
|
| 64 |
+
model = load_pretrained("int-brain-lab/ea-encoder-channel", revision="0.0.1")
|
| 65 |
df = pd.read_parquet("example/features_sample.parquet") # channel positions (x, y, z)
|
| 66 |
out = model.predict(df) # one pred_<feature> column each
|
| 67 |
print(out.head())
|
|
|
|
| 101 |
|
| 102 |
## Reproducibility
|
| 103 |
|
| 104 |
+
**Pin the revision.** `revision="0.0.1"` is an immutable tag. Omitting `revision` resolves to
|
| 105 |
+
`main`, which tracks whichever model is currently recommended and *will* change when a new model
|
| 106 |
+
is published -- fine for a first look, not for anything you publish or re-run.
|
| 107 |
|
| 108 |
`ephysatlas_model.json` records the training-time `environment` and `random_seed`. Verify your
|
| 109 |
install reproduces the shipped output:
|
|
|
|
| 114 |
|
| 115 |
## Citation
|
| 116 |
|
| 117 |
+
Please cite ELECTRA, the IBL Electrophysiological Reference Atlas. Model `int-brain-lab/ea-encoder-channel`, version
|
| 118 |
+
`0.0.1`, feature release `2026_W42`.
|
checksums.json
CHANGED
|
@@ -8,23 +8,23 @@
|
|
| 8 |
},
|
| 9 |
{
|
| 10 |
"path": "confidence_model.pt",
|
| 11 |
-
"hash": "
|
| 12 |
"bytes": 387569
|
| 13 |
},
|
| 14 |
{
|
| 15 |
"path": "ephysatlas_model.json",
|
| 16 |
-
"hash": "
|
| 17 |
-
"bytes":
|
| 18 |
},
|
| 19 |
{
|
| 20 |
"path": "example/expected_predictions.parquet",
|
| 21 |
-
"hash": "
|
| 22 |
-
"bytes":
|
| 23 |
},
|
| 24 |
{
|
| 25 |
"path": "example/features_sample.parquet",
|
| 26 |
-
"hash": "
|
| 27 |
-
"bytes":
|
| 28 |
},
|
| 29 |
{
|
| 30 |
"path": "merfish_vol_pca.npy",
|
|
@@ -33,27 +33,27 @@
|
|
| 33 |
},
|
| 34 |
{
|
| 35 |
"path": "neighbor_bank.npz",
|
| 36 |
-
"hash": "
|
| 37 |
-
"bytes":
|
| 38 |
},
|
| 39 |
{
|
| 40 |
"path": "preprocessing/channel_stats.npz",
|
| 41 |
-
"hash": "
|
| 42 |
-
"bytes":
|
| 43 |
},
|
| 44 |
{
|
| 45 |
"path": "results/confidence_validation.json",
|
| 46 |
-
"hash": "
|
| 47 |
-
"bytes":
|
| 48 |
},
|
| 49 |
{
|
| 50 |
"path": "results/test_r2.json",
|
| 51 |
-
"hash": "
|
| 52 |
-
"bytes":
|
| 53 |
},
|
| 54 |
{
|
| 55 |
"path": "spatial_encoder.pt",
|
| 56 |
-
"hash": "
|
| 57 |
"bytes": 4485389
|
| 58 |
},
|
| 59 |
{
|
|
|
|
| 8 |
},
|
| 9 |
{
|
| 10 |
"path": "confidence_model.pt",
|
| 11 |
+
"hash": "c6aefee104754b4f23aea39bb4eb65e70684c18b",
|
| 12 |
"bytes": 387569
|
| 13 |
},
|
| 14 |
{
|
| 15 |
"path": "ephysatlas_model.json",
|
| 16 |
+
"hash": "c8000a03d5c3799f383b777a857f16392cc02c20",
|
| 17 |
+
"bytes": 7177
|
| 18 |
},
|
| 19 |
{
|
| 20 |
"path": "example/expected_predictions.parquet",
|
| 21 |
+
"hash": "139c47f376b94e2a40934d37f5c6db74906f5cb7",
|
| 22 |
+
"bytes": 155673
|
| 23 |
},
|
| 24 |
{
|
| 25 |
"path": "example/features_sample.parquet",
|
| 26 |
+
"hash": "ed37712f2406dcadbae59c0a962acbca6c18be7a",
|
| 27 |
+
"bytes": 32792
|
| 28 |
},
|
| 29 |
{
|
| 30 |
"path": "merfish_vol_pca.npy",
|
|
|
|
| 33 |
},
|
| 34 |
{
|
| 35 |
"path": "neighbor_bank.npz",
|
| 36 |
+
"hash": "bd574b1b0e97516df7e26e2705b55b26dcfccb02",
|
| 37 |
+
"bytes": 41258953
|
| 38 |
},
|
| 39 |
{
|
| 40 |
"path": "preprocessing/channel_stats.npz",
|
| 41 |
+
"hash": "c9d2eb15080e79799b8b06ef668fb74a7a20b022",
|
| 42 |
+
"bytes": 3382
|
| 43 |
},
|
| 44 |
{
|
| 45 |
"path": "results/confidence_validation.json",
|
| 46 |
+
"hash": "f0704026b5b897ab185e820b4357c92dcc23dde4",
|
| 47 |
+
"bytes": 290
|
| 48 |
},
|
| 49 |
{
|
| 50 |
"path": "results/test_r2.json",
|
| 51 |
+
"hash": "3d54a113ef33003e54bab413b2e146a1058e237d",
|
| 52 |
+
"bytes": 1971
|
| 53 |
},
|
| 54 |
{
|
| 55 |
"path": "spatial_encoder.pt",
|
| 56 |
+
"hash": "d7aee68febf0dd7a3c0841c7e5c2ea327779595f",
|
| 57 |
"bytes": 4485389
|
| 58 |
},
|
| 59 |
{
|
confidence_model.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 387569
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03558643e945cb2ef176c4f2c67c83a562a916c0dcf9c42a95b712f471cc9e5e
|
| 3 |
size 387569
|
ephysatlas_model.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"model_id": "
|
| 3 |
"task": "spatial-encoding",
|
| 4 |
"model_class": "NeighborInpaintingModel",
|
| 5 |
"vintage": "2026_W42",
|
|
@@ -9,17 +9,17 @@
|
|
| 9 |
"validation_size": 97,
|
| 10 |
"testing_size": 196,
|
| 11 |
"best_epoch": 3,
|
| 12 |
-
"mean_test_r2": 0.
|
| 13 |
},
|
| 14 |
"environment": {
|
| 15 |
"python": "3.11.9",
|
| 16 |
"xgboost": "3.2.0",
|
| 17 |
"scikit_learn": "1.8.0",
|
| 18 |
"numpy": "2.3.5",
|
| 19 |
-
"pandas": "3.
|
| 20 |
"torch": "2.7.1+cu118",
|
| 21 |
"ephysatlas": "0.9.0",
|
| 22 |
-
"iblatlas": "1.
|
| 23 |
},
|
| 24 |
"method": "transformer",
|
| 25 |
"granularity": "channel",
|
|
@@ -138,7 +138,7 @@
|
|
| 138 |
"clipping": "per feature, thresholds from the training channels",
|
| 139 |
"standardisation": "clipped training channels (features); all non-recorded atlas voxels (context)",
|
| 140 |
"stats_file": "preprocessing/channel_stats.npz",
|
| 141 |
-
"hemisphere": "x mirrored to the left hemisphere (
|
| 142 |
},
|
| 143 |
"prediction": {
|
| 144 |
"trilinear_context": true,
|
|
@@ -172,7 +172,6 @@
|
|
| 172 |
"max_len": null,
|
| 173 |
"seed": 0,
|
| 174 |
"max_abs_shift_channels": 64,
|
| 175 |
-
"extra_trace_channels_each_side": 128,
|
| 176 |
"channel_step_um": 20.0,
|
| 177 |
"suspicious_probe_prob": 0.15,
|
| 178 |
"suspicious_perturb_min_um": 150.0,
|
|
|
|
| 1 |
{
|
| 2 |
+
"model_id": "0.0.1_encoder",
|
| 3 |
"task": "spatial-encoding",
|
| 4 |
"model_class": "NeighborInpaintingModel",
|
| 5 |
"vintage": "2026_W42",
|
|
|
|
| 9 |
"validation_size": 97,
|
| 10 |
"testing_size": 196,
|
| 11 |
"best_epoch": 3,
|
| 12 |
+
"mean_test_r2": 0.3864326477050781
|
| 13 |
},
|
| 14 |
"environment": {
|
| 15 |
"python": "3.11.9",
|
| 16 |
"xgboost": "3.2.0",
|
| 17 |
"scikit_learn": "1.8.0",
|
| 18 |
"numpy": "2.3.5",
|
| 19 |
+
"pandas": "2.3.3",
|
| 20 |
"torch": "2.7.1+cu118",
|
| 21 |
"ephysatlas": "0.9.0",
|
| 22 |
+
"iblatlas": "1.3.1"
|
| 23 |
},
|
| 24 |
"method": "transformer",
|
| 25 |
"granularity": "channel",
|
|
|
|
| 138 |
"clipping": "per feature, thresholds from the training channels",
|
| 139 |
"standardisation": "clipped training channels (features); all non-recorded atlas voxels (context)",
|
| 140 |
"stats_file": "preprocessing/channel_stats.npz",
|
| 141 |
+
"hemisphere": "x mirrored to the left hemisphere about the atlas midline (ephysatlas.hemispheres.MIDLINE_X, 44 um left of bregma)"
|
| 142 |
},
|
| 143 |
"prediction": {
|
| 144 |
"trilinear_context": true,
|
|
|
|
| 172 |
"max_len": null,
|
| 173 |
"seed": 0,
|
| 174 |
"max_abs_shift_channels": 64,
|
|
|
|
| 175 |
"channel_step_um": 20.0,
|
| 176 |
"suspicious_probe_prob": 0.15,
|
| 177 |
"suspicious_perturb_min_um": 150.0,
|
example/expected_predictions.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:72640735f534d4f8cc6ae2743196a60f4dbe54418c0b5bfe45c8a0aa0d2b7449
|
| 3 |
+
size 155673
|
example/features_sample.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca61d69a3d7a6566d0e489dcc72dfdb2e674ce4e76a252c2aff580170f7ba7af
|
| 3 |
+
size 32792
|
neighbor_bank.npz
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ea3590183940df6dc4390cdc9acc48618505d8b09b247edda6b96875a7ba5b4
|
| 3 |
+
size 41258953
|
preprocessing/channel_stats.npz
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:36eb0b1e24c81e0a7e1215d36221051a1aaf3245a6bd0ce86a50648766e0de28
|
| 3 |
+
size 3382
|
results/confidence_validation.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
{
|
| 2 |
"split": "validation (synthetic misalignments)",
|
| 3 |
-
"accuracy": 0.
|
| 4 |
"confusion_matrix": [
|
| 5 |
[
|
| 6 |
-
|
| 7 |
-
|
| 8 |
],
|
| 9 |
[
|
| 10 |
-
|
| 11 |
-
|
| 12 |
]
|
| 13 |
],
|
| 14 |
"classes": [
|
|
|
|
| 1 |
{
|
| 2 |
"split": "validation (synthetic misalignments)",
|
| 3 |
+
"accuracy": 0.746325306056701,
|
| 4 |
"confusion_matrix": [
|
| 5 |
[
|
| 6 |
+
161301,
|
| 7 |
+
62823
|
| 8 |
],
|
| 9 |
[
|
| 10 |
+
12768,
|
| 11 |
+
61092
|
| 12 |
]
|
| 13 |
],
|
| 14 |
"classes": [
|
results/test_r2.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
| 1 |
{
|
| 2 |
"split": "test",
|
| 3 |
"n_test_insertions": 196,
|
| 4 |
-
"mean_r2": 0.
|
| 5 |
"per_feature": {
|
| 6 |
-
"rms_lf": 0.
|
| 7 |
-
"psd_delta": 0.
|
| 8 |
-
"psd_theta": 0.
|
| 9 |
-
"psd_alpha": 0.
|
| 10 |
-
"psd_beta": 0.
|
| 11 |
-
"psd_gamma": 0.
|
| 12 |
-
"psd_lfp": 0.
|
| 13 |
-
"rms_lf_bpr": 0.
|
| 14 |
-
"psd_delta_bpr": 0.
|
| 15 |
-
"psd_theta_bpr": 0.
|
| 16 |
-
"psd_alpha_bpr": 0.
|
| 17 |
-
"psd_beta_bpr": 0.
|
| 18 |
-
"psd_gamma_bpr": 0.
|
| 19 |
-
"psd_lfp_bpr": 0.
|
| 20 |
-
"psd_residual_delta": 0.
|
| 21 |
-
"psd_residual_theta": 0.
|
| 22 |
-
"psd_residual_alpha": 0.
|
| 23 |
-
"psd_residual_beta": 0.
|
| 24 |
-
"psd_residual_gamma": 0.
|
| 25 |
-
"psd_residual_lfp": 0.
|
| 26 |
-
"aperiodic_offset": 0.
|
| 27 |
-
"aperiodic_exponent": 0.
|
| 28 |
-
"decay_fit_error": 0.
|
| 29 |
-
"decay_fit_r_squared": 0.
|
| 30 |
-
"decay_n_peaks": 0.
|
| 31 |
-
"cor_ratio": 0.
|
| 32 |
-
"rms_ap": 0.
|
| 33 |
-
"alpha_mean": 0.
|
| 34 |
-
"alpha_std": 0.
|
| 35 |
-
"spike_count": 0.
|
| 36 |
-
"depolarisation_slope": 0.
|
| 37 |
-
"polarity": 0.
|
| 38 |
-
"recovery_slope": 0.
|
| 39 |
-
"repolarisation_slope": 0.
|
| 40 |
-
"slowness_s_per_m": 0.
|
| 41 |
-
"slowness_s_per_m_std": 0.
|
| 42 |
-
"spatial_spread_um": 0.
|
| 43 |
-
"spatial_spread_um_std": 0.
|
| 44 |
-
"tip_val": 0.
|
| 45 |
-
"spike_width_secs": 0.
|
| 46 |
-
"predepolarisation_width_secs": 0.
|
| 47 |
-
"spike_amplitude": 0.
|
| 48 |
-
"peak_to_trough_ratio_log": 0.
|
| 49 |
}
|
| 50 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"split": "test",
|
| 3 |
"n_test_insertions": 196,
|
| 4 |
+
"mean_r2": 0.3864326477050781,
|
| 5 |
"per_feature": {
|
| 6 |
+
"rms_lf": 0.6608211398124695,
|
| 7 |
+
"psd_delta": 0.6028587818145752,
|
| 8 |
+
"psd_theta": 0.6918218731880188,
|
| 9 |
+
"psd_alpha": 0.6843409538269043,
|
| 10 |
+
"psd_beta": 0.6907578706741333,
|
| 11 |
+
"psd_gamma": 0.6702374219894409,
|
| 12 |
+
"psd_lfp": 0.6713683009147644,
|
| 13 |
+
"rms_lf_bpr": 0.4029957056045532,
|
| 14 |
+
"psd_delta_bpr": 0.3776191473007202,
|
| 15 |
+
"psd_theta_bpr": 0.5010265111923218,
|
| 16 |
+
"psd_alpha_bpr": 0.4952860474586487,
|
| 17 |
+
"psd_beta_bpr": 0.4416058659553528,
|
| 18 |
+
"psd_gamma_bpr": 0.3798099160194397,
|
| 19 |
+
"psd_lfp_bpr": 0.4127731919288635,
|
| 20 |
+
"psd_residual_delta": 0.37373650074005127,
|
| 21 |
+
"psd_residual_theta": 0.33198755979537964,
|
| 22 |
+
"psd_residual_alpha": 0.30064451694488525,
|
| 23 |
+
"psd_residual_beta": 0.2966166138648987,
|
| 24 |
+
"psd_residual_gamma": 0.22155386209487915,
|
| 25 |
+
"psd_residual_lfp": 0.19938170909881592,
|
| 26 |
+
"aperiodic_offset": 0.6557266712188721,
|
| 27 |
+
"aperiodic_exponent": 0.33777135610580444,
|
| 28 |
+
"decay_fit_error": 0.2508656978607178,
|
| 29 |
+
"decay_fit_r_squared": 0.2946712374687195,
|
| 30 |
+
"decay_n_peaks": 0.11502385139465332,
|
| 31 |
+
"cor_ratio": 0.5255212783813477,
|
| 32 |
+
"rms_ap": 0.5364702343940735,
|
| 33 |
+
"alpha_mean": 0.37363916635513306,
|
| 34 |
+
"alpha_std": 0.3089878559112549,
|
| 35 |
+
"spike_count": 0.30980920791625977,
|
| 36 |
+
"depolarisation_slope": 0.375978946685791,
|
| 37 |
+
"polarity": 0.25484418869018555,
|
| 38 |
+
"recovery_slope": 0.3090283274650574,
|
| 39 |
+
"repolarisation_slope": 0.3113645315170288,
|
| 40 |
+
"slowness_s_per_m": 0.086406409740448,
|
| 41 |
+
"slowness_s_per_m_std": 0.395765483379364,
|
| 42 |
+
"spatial_spread_um": 0.2819598317146301,
|
| 43 |
+
"spatial_spread_um_std": 0.12447232007980347,
|
| 44 |
+
"tip_val": 0.23651427030563354,
|
| 45 |
+
"spike_width_secs": 0.4956895112991333,
|
| 46 |
+
"predepolarisation_width_secs": 0.3421085476875305,
|
| 47 |
+
"spike_amplitude": 0.26507002115249634,
|
| 48 |
+
"peak_to_trough_ratio_log": 0.021671831607818604
|
| 49 |
}
|
| 50 |
}
|
spatial_encoder.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4485389
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fc475b549d984ada89b2749d57784c72066edd9fb2407d5a064c5862e572b58c
|
| 3 |
size 4485389
|