Skip to content

Data Preprocessing Code Typo Issue #19

@jungwon-choi

Description

@jungwon-choi

Hi,

I was inspired by your research and am currently conducting a follow-up study.

I am attempting to apply the Robust Scaling preprocessing described in the BrainLM paper using the provided code in BrainLM/toolkit/BrainLM_Toolkit.py on our fMRI dataset.
"Robust scaling was applied by subtracting the median and dividing by the interquartile range computed across subjects for each parcel."

However, we noticed that in line 298, the code is written as follows:

recording_mean_subtracted3 = (recording_mean_subtracted3 - data_median_per_voxel / IQR)

According to the original definition of robust scaling, the correct transformation should be:

$$ preprocessed = \frac{\text{data} - \text{median}}{\text{IQR}} $$

Wouldn't the intended implementation be:

recording_mean_subtracted3 = (recording_mean_subtracted3 - data_median_per_voxel) / IQR

It seems like a possible typo, but I wanted to check if there was a specific reason for implementing it this way.

I would appreciate a prompt response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions