Hi,
I have a trouble running decode.Decoder with neurosynth-topics. If aynbody has experience on this and help me, I would really appreciate.
I can run Decoder with single neurosynth-term as described in the python-neurosynth tutorial:
from neurosynth import Dataset
from neurosynth import meta, decode, network
import pandas as pd
dataset = Dataset.load('dataset.pkl')
decoder = decode.Decoder(dataset, features=['emotion'])
res = decoder.decode(['tmp_1.nii.gz'])But, cannot do it with python-code below, it takes more than 1 hour on a computer (), and crashes later:
dataset = Dataset.load('dataset.pkl')
# importing topics file
features = pd.read_csv('v4-topics-50.txt', sep='\t', index_col=0)
# take the first topic, name it with a label
topics_to_keep = [0]
labels = ['blabla']
features = features.iloc[:, topics_to_keep]
features.columns = labels
dataset.add_features(features, append=False)
# here we go
decoder = decode.Decoder(dataset, method='roi')
data = decoder.decode(['tmp_1.nii.gz'])Is there any idea why it would crash? (Unfortunately cannot post the error message now).
# the current data downloaded from:
#
https://github.com/neurosynth/neurosynth-data# dataset = Dataset('/data/pt_mar006/data/database.txt')
# dataset.add_features('/data/pt_mar006/data/features.txt')
# dataset.save('/data/pt_mar006/data/dataset.pkl')
# topic terms under this link:
#
https://figshare.com/articles/Neurosynth_LDA_topics_v4_/4893353# 'tmp.nii.gz' is a nifti image of shape (91, 109, 91)
Best,
Şeyma