brainscore_core.supported_data_standards.brainio.assemblies
ASSEMBLIES MODULE - Core data structures for Brain-Score
PURPOSE:
This module provides the fundamental data structures used throughout Brain-Score for representing experimental and computational data. These are xarray-based containers that maintain metadata alongside numeric data.
KEY CLASSES:
DataAssembly: Base class for all data containers
NeuroidAssembly: Neural recordings (neurons x stimuli x time)
BehavioralAssembly: Behavioral responses (subjects x stimuli)
PropertyAssembly: Model properties and features
StimulusSet: Collections of experimental stimuli
CORE UTILITIES:
walk_coords(): Navigate through coordinate metadata
merge_data_arrays(): Combine multiple data arrays
gather_indexes(): Manage multi-level indexing
Assembly loaders: Load data from NetCDF files with stimulus metadata
This replaces the full BrainIO assemblies module but keeps all functionality actually used by Brain-Score models, benchmarks, and data processing.
Functions
|
|
|
|
|
This is only necessary as long as xarray cannot persist MultiIndex to netCDF. |
|
|
|
|
|
Return coords and/or indexes or index levels from an assembly, yielding either name or (name, dims, values). |
|
Return coords and/or indexes or index levels from an assembly, yielding either name or (name, dims, values). |
|
checks whether a set of args and kwargs would be interpreted by DataArray.__init__ |
|
|
|
walks through coords and all levels, just like the __repr__ function, yielding (name, dims, values). |
Classes
|
Loads a DataAssembly from a file. |
|
A BehavioralAssembly is a DataAssembly containing behavioral data. |
|
A DataAssembly represents a set of data a researcher wishes to work with for an analysis or benchmarking task. |
|
A DataPoint represents one value, usually a recording from one neuron or node, in response to one presentation of a stimulus. |
|
Loads an assembly plus any included metadata assemblies and a pointer to a stimulus set. |
|
Wraps an xarray GroupBy object to allow grouping on multiple coordinates. |
|
A MetadataAssembly is a DataAssembly containing metadata, pertaining to another DataAssembly, that is best described by a DataAssembly but has different dimensions from the DataAssembly it describes. |
|
A ModelFeaturesAssembly is a NeuroidAssembly containing data captured from nodes in a machine learning model. |
|
A NeuroidAssembly is a DataAssembly containing data recorded from either neurons or neuron analogues. |
|
A NeuronRecordingAssembly is a NeuroidAssembly containing data recorded from neurons. |
|
A PropertyAssembly is a DataAssembly containing single neuronal properties data. |
|
A SpikeTimesAssembly is a DataAssembly containing a one-dimensional array of neural spike event timestamps. |
|
Loads an assembly and merges in metadata from a stimulus set. |
|
Loads an assembly and adds a pointer to a stimulus set. |
Exceptions
|