v2.0.0
Loading...
Searching...
No Matches
MNELIB::MNEMneData Class Reference

Data associated with MNE computations for each mneMeasDataSet. More...

#include <mne_mne_data.h>

Public Types

typedef QSharedPointer< MNEMneData > SPtr
typedef QSharedPointer< const MNEMneData > ConstSPtr

Public Member Functions

 MNEMneData ()=default
 ~MNEMneData ()=default
void computeRegularization (const MNEInverseOperator &inv, const Eigen::MatrixXd &data)
void selectRegularization (const MNEInverseOperator &inv, double snr)
void computePredicted (const MNEInverseOperator &inv)

Static Public Member Functions

static MNEMneData compute (const MNEInverseOperator &inv, const Eigen::MatrixXd &data, double snr)

Public Attributes

Eigen::MatrixXd datap
Eigen::MatrixXd predicted
Eigen::VectorXd SNR
Eigen::VectorXd lambda2_est
Eigen::VectorXd lambda2

Detailed Description

Data associated with MNE computations for each mneMeasDataSet.

Implements MNE Mne Data (Replaces *mneMneData,mneMneDataRec; struct of MNE-C mne_types.h).

Definition at line 57 of file mne_mne_data.h.

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const MNEMneData> MNELIB::MNEMneData::ConstSPtr

Const shared pointer type for MNEMneData.

Definition at line 61 of file mne_mne_data.h.

◆ SPtr

typedef QSharedPointer<MNEMneData> MNELIB::MNEMneData::SPtr

Shared pointer type for MNEMneData.

Definition at line 60 of file mne_mne_data.h.

Constructor & Destructor Documentation

◆ MNEMneData()

MNELIB::MNEMneData::MNEMneData ( )
default

Constructs the MNEMneData.

◆ ~MNEMneData()

MNELIB::MNEMneData::~MNEMneData ( )
default

Destroys the MNEMneData.

Member Function Documentation

◆ compute()

MNEMneData MNEMneData::compute ( const MNEInverseOperator & inv,
const Eigen::MatrixXd & data,
double snr )
static

Fills all fields for one data set: projects it on the eigenfields, estimates the SNR and lambda2 per time point, selects the lambda2 to use and computes the predicted data.

Parameters
[in]invAn inverse operator prepared with MNEInverseOperator::prepare_inverse_operator.
[in]dataMeasured data, one row per channel of inv in its order, one column per time.
[in]snrPower SNR for a fixed lambda2 (see selectRegularization), <= 0 to use lambda2_est.
Returns
The MNE data.

Definition at line 40 of file mne_mne_data.cpp.

◆ computePredicted()

void MNEMneData::computePredicted ( const MNEInverseOperator & inv)

Computes the data the minimum-norm estimate predicts with the selected lambda2, colored back to the sensors (MNE-C compute_predicted_data; the data part of mne.minimum_norm.apply_inverse's residual).

Parameters
[in]invThe prepared inverse operator used for computeRegularization.

Definition at line 95 of file mne_mne_data.cpp.

◆ computeRegularization()

void MNEMneData::computeRegularization ( const MNEInverseOperator & inv,
const Eigen::MatrixXd & data )

Projects the whitened data on the eigenfields (MNE-C mne_project_to_eigen_fields) and estimates SNR and lambda2_est per time point (MNE-C compute_regularization, noise method).

SNR is the power of the whitened data per non-zero noise eigenvalue (the square of mne.minimum_norm.estimate_snr's snr). lambda2_est is 100 where SNR < 1; elsewhere it starts at 10 and shrinks by 0.9 until the squared prediction error of the whitened data falls below the chi^2 point at p = 0.001 with one degree of freedom less than the components used.

Parameters
[in]invA prepared inverse operator.
[in]dataMeasured data, one row per channel of inv, one column per time.

Definition at line 51 of file mne_mne_data.cpp.

◆ selectRegularization()

void MNEMneData::selectRegularization ( const MNEInverseOperator & inv,
double snr )

Selects lambda2 per time point (MNE-C select_regularization): trace_ratio / snr for a positive power SNR, lambda2_est otherwise. trace_ratio is the mean squared singular value.

Parameters
[in]invThe prepared inverse operator used for computeRegularization.
[in]snrPower SNR, <= 0 to use lambda2_est.

Definition at line 84 of file mne_mne_data.cpp.

Member Data Documentation

◆ datap

Eigen::MatrixXd MNELIB::MNEMneData::datap

Projection of the whitened data onto the eigenfields, components x times.

Definition at line 124 of file mne_mne_data.h.

◆ lambda2

Eigen::VectorXd MNELIB::MNEMneData::lambda2

Regularization parameter to be used (as a function of time).

Definition at line 128 of file mne_mne_data.h.

◆ lambda2_est

Eigen::VectorXd MNELIB::MNEMneData::lambda2_est

Regularization parameter estimated from available data.

Definition at line 127 of file mne_mne_data.h.

◆ predicted

Eigen::MatrixXd MNELIB::MNEMneData::predicted

The predicted data, channels x times.

Definition at line 125 of file mne_mne_data.h.

◆ SNR

Eigen::VectorXd MNELIB::MNEMneData::SNR

Estimated power SNR as a function of time.

Definition at line 126 of file mne_mne_data.h.


The documentation for this class was generated from the following files: