Views
No views yet
2026_W32.What you can and cannot do without IBL access. The model runs for anyone. Computing the input features from raw Neuropixels data needsibllib/ibl-neuropixel, and the raw data itself is IBL-hosted. To try the model immediately, use the bundled sample underexample/-- no account, no raw data, no S3.
1import pandas as pd
2from ephysatlas import load_pretrained
3
4model = load_pretrained("int-brain-lab/ea-decoder-channel-xgboost", revision="2026_W32")
5df = pd.read_parquet("example/features_sample.parquet") # or your own features
6out = model.predict(df)
7print(out[["predicted_acronym", "prediction_probability", "fold_agreement"]].head())load_pretrained is the entry point for every ephysatlas model, whatever its family — it reads
ephysatlas_model.json and returns the right wrapper. Use it rather than importing a concrete
class, so your code keeps working as the package evolves.predict returns one row per input channel, indexed identically to the input:
predicted_acronym, its Allen predicted_atlas_id, the fold-averaged
prediction_probability, a fold_agreement column (fraction of the 5 folds voting
for the winner -- the natural uncertainty signal), and a p_<acronym> column per class.df.join(out) works: the feature table already
carries histology-derived acronym / atlas_id columns, and predictions must not shadow them.ephysatlas_model.json under inputs.features. Every
one must be present; predict raises and names anything missing.(pid, channel), one row per recording channel.2026_W32 -- that is, the
raw_ephys_features_denoised.pqt table produced by the Ephys Atlas aggregation pipeline,
as loaded by ephysatlas.data.read_features_from_disk. Units are baked into that table by
the pipeline (RMS features in dB, spike_count in log2), so feeding raw features, or
features from a vintage whose units differ, produces confident nonsense. Run
model.selftest() to confirm your install reproduces the shipped output before trusting it.pid), so no channel from a test
insertion appears in training. See confusion_matrix.png.Cosmos is a coarse parcellation. Predictions are per-channel and spatially
unregularised -- neighbouring channels can disagree.revision="2026_W32" is an immutable tag. Omitting revision resolves
to main, which tracks whichever model is currently recommended and will change when a new
feature vintage is published — fine for a first look, not for anything you publish or re-run.ephysatlas_model.json records the training-time environment (xgboost, scikit-learn, numpy,
ephysatlas, python) and random_seed. Verify your install reproduces the shipped output:model.selftest()scikit-learn<1.9 is required (1.9 broke OneToOneFeatureMixin.get_feature_names_out,
which the feature transformer relies on).2026_W32_Cosmos_guiltless-orange-mallard,
feature vintage 2026_W32.