Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voxel regression Error message #13

Open
NitramNimod opened this issue Jul 5, 2019 · 1 comment
Open

Voxel regression Error message #13

NitramNimod opened this issue Jul 5, 2019 · 1 comment

Comments

@NitramNimod
Copy link

Hi!

I'm trying to follow your examples, using the following data:
4D image containing 50 FA images
whole brain mask file
regressor.csv - 1 column, 50 rows of income data for the 50 subjects
covariates.csv - 2 comma-separated columns, 50 rows age and sex

The loading of the data works ok, python_temp is created.
When I try
tfce_mediation step1-voxel-regress -i SSAGA_Income.csv covariates_SEX_AGE.csv
a "ValueError: all the input array dimensions except for the concatenation axis must match exactly" error occurs, obviously connected to x_covars = np.column_stack([np.ones(n),covars]) in STEP_1_voxel_tfce_multiple_regression.py

I'm using the most recent version of TFCE_mediation (1.6.1), Python 2.7 on a Ubuntu 16.04. I installed your toolbox via the third option in the wiki, direct download from GitHub and execution of the provided setup.

Thank you very much in advance for your help!

Best,
Martin

@NitramNimod
Copy link
Author

A short update, my initial problems stemmed from missing values in the regressor/covariate files. Empty cells in a csv are not a missing value in a statistical sense, they are discarded during reading the data and therefore different input array dimensions occur.

But, there are some other issues I discovered so far:

Numpy versions above 1.16.2 produce an "ValueError: Object arrays cannot be loaded when allow_pickle=False", so a downgrade to 1.16.2 is helpful (pip install numpy==1.16.2).

If the mask during initial import of voxel data contains voxels where no data is associated with, the script returns with an error. The error message is not really helpful. The corrected mask file that is created in the process could be immediately used instead to import the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant