Skip to content

Phase 1: MIR core metric (mutual information reduction) #134

Description

@neuromechanist

Part of #133.

Port mir(unmixing, data) -> (mir_nats, variance) from bigdelys/pre_ICA_cleaning's
getMIR.m (Apache-2.0, permits direct port with attribution) using pyAMICA's
existing sphere + unmixing pipeline.

  • Use Seyed Yahya Shirazi's own mir() adaptation in
    sccn/NEMAR-pipeline/eeg_nemar_dataqual.m as the reference (it adds the
    sphering step), but fix the scope bug: that version's signature is
    (data, linT) yet its body references eig(W) and /N, which only resolve
    today via MATLAB's nested-function shared workspace. The Python port must use
    explicit parameters (linT, N = data.shape[1]), not replicate the implicit
    dependency.
  • Add an attribution docstring/comment pointing to
    github.com/bigdelys/pre_ICA_cleaning/getMIR.m per the Apache-2.0 NOTICE
    requirement.
  • Tests: real bundled sample EEG only (NO MOCK data), checking internal
    consistency (e.g. against a literal re-derivation of the marginal-entropy
    terms), not synthetic data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or enhancement

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions