Skip to content

config.ini

This file is intended to be modifiable by the user of the package to suit his intents and purposes when it comes to the configuration and the parameters of the real-time DecNef training.

experiment

  • n_heatup_vols = 4 Number of volumes needed for heating up MRI scanner (heatup duration = TR * n_heatup_vols).

  • n_baseline_vols = 20 Number of baseline volumes after heatup to sample before beggining with the experimental task (baseline duration = TR * n_baseline_vols).

  • HRF_peak_onset = 5 HRF peak onset threshold (seconds from trial onset). Default HRF_peak_onset = 5 for decoding procedure = 'average_hrf_peak_vols' or 'average_probs'.

  • HRF_peak_offset = 11 HRF peak offset threshold (seconds from trial onset). Default HRF_peak_offset = 11 for decoding procedure = 'average_hrf_peak_vols' or 'average_probs'.

  • TR = 2 Repetition time. Volumes sampling rate (in seconds).

  • first_vol_idx = 1 First volume index to track in EXP.raw_volumes_folder.

  • index_format = 04d How volumes indexes are left-zero padded in fMRI cls.raw_volumes_folder folder? (ex., index_format = '04d' for IM-0001.dcm).

  • zscoring_procedure = to_timeseries

    • 'to_baseline' (each task volume will be z-scored relative to data from that run baseline in specific R.O.I. For example, volumes 51 will be z-scored to n_baseline_vols data)
    • 'to_timeseries' (each task volume will be z-scored relative to that run previous volumes in specific R.O.I.. For example, volume 51 will be z-scored using data from volume 0 to that volume)
    • 'to_model_session' (default) (each task volume will be z-scored relative to model construction session data in specific R.O.I. using its mean and standard deviation).
  • decoding_procedure = average_probs

    • 'average_hrf_peak_vols' (average volumes within a trial HRF peak before decoding a single averaged volume to increase signal-to-noise ratio)
    • 'average_probs' (default) (average decoding probabilities of volumes within a trial HRF peak to increase feedbacks variability)
    • 'dynamic' (all volumes within a trial HRF peak, will be decoded independently and sent individually to experimental software as feedback)
  • coadaptation_active = True activating co-adaptation, a.k.a real time training of the decoder while conducting the DecNef.

  • coadaptation_background_warmup = True Only relevant if "coadaptation_active = False". Training the coadaptation decoder with the DecNef data but not in real time and without using it in predictions and participants feedback (the predictions are made with the original decoder).

  • coadaptation_vol_acceptance_criteria = 0.65 The threshold of decoder prediction in selecting the volumes used for co-adapatation.

  • classifier_type = logisticregression The classifier used (must be the same as the one used for the training process) [logisticregression, svmlinear, decisiontree, extratree, randomforest, extratrees, bagging, gradientboosting, adaboost, naivebayes, kneighbors, mlp, sgd].

  • simulated_experiment = False Whether doing Real-time DecNef or simulated experiment.

files_and_dir

  • raw_volumes_folder_path = /firmm/20240903.test The path to the raw volumes folder generated by the MRI scanner.

  • model_name = sklearn_decoder The model file name in the required_resources folder.

  • mask_name = example_func_deoblique_brainmask.nii The mask file name in the required_resources folder.

  • ref_vol_name = example_func_deoblique_brain.nii The reference volume file name in the required_resources folder.

  • zscoring_mean_file_name = zscoring_mean_array.npyi The zscore mean file name in the required_resources folder.

  • zscoring_std_file_name = zscoring_std_array.npy The zscore std file name in the required_resources folder.

  • coadaptation_base_training_data_dir_name = co_adaptation_base_training_stacked_vols_of_interest The directory used to dump the preprocessed data and construct the dataset for the co-adaptation.

  • coadaptation_training_data_file_name = detrended_zscored_stacked_vols_of_interest.nii.gz The file name of the original decoder training data to be used for co-adaptation.

  • coadaptation_training_data_labels_file_name = detrended_zscored_stacked_vols_of_interest_labels.csv The file name of the original decoder training labels to be used for co-adaptation.