[Neuroimaging] what's the problem??????

נתי שטרן nsh531 at gmail.com
Thu Jul 14 00:18:34 EDT 2022


I want to swap indexes of dict

בתאריך יום ד׳, 13 ביולי 2022, 21:51, מאת David Welch ‏<
david.m.welch at gmail.com>:

>
>>    - Describe the research *you did* to try and understand the problem
>>    *before* you asked the question.
>>    - Describe the diagnostic steps *you took* to try and pin down the
>>    problem yourself *before* you asked the question.
>>
>>
> On Wed, Jul 13, 2022 at 1:47 PM David Welch <david.m.welch at gmail.com>
> wrote:
>
>> From http://catb.org/~esr/faqs/smart-questions.html#beprecise:
>>
>>> Be precise and informative about your problem
>>>
>>>    -
>>>
>>>    Describe the symptoms of your problem or bug carefully and clearly.
>>>    -
>>>
>>>    Describe the environment in which it occurs (machine, OS,
>>>    application, whatever). Provide your vendor's distribution and release
>>>    level (e.g.: “Fedora Core 7”, “Slackware 9.1”, etc.).
>>>    -
>>>
>>>    Describe the research you did to try and understand the problem
>>>    before you asked the question.
>>>    -
>>>
>>>    Describe the diagnostic steps you took to try and pin down the
>>>    problem yourself before you asked the question.
>>>    -
>>>
>>>    Describe any possibly relevant recent changes in your computer or
>>>    software configuration.
>>>    -
>>>
>>>    If at all possible, provide a way to *reproduce the problem in a
>>>    controlled environment*.
>>>
>>> Do the best you can to anticipate the questions a hacker will ask, and
>>> answer them in advance in your request for help.
>>>
>>> Giving hackers the ability to reproduce the problem in a controlled
>>> environment is especially important if you are reporting something you
>>> think is a bug in code. When you do this, your odds of getting a useful
>>> answer and the speed with which you are likely to get that answer both
>>> improve tremendously.
>>>
>>> Simon Tatham has written an excellent essay entitled How to Report Bugs
>>> Effectively <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>. I
>>> strongly recommend that you read it.
>>>
>>>
>>
>> ---------- Forwarded message ---------
>> From: נתי שטרן <nsh531 at gmail.com>
>> Date: Wed, Jul 13, 2022 at 1:36 PM
>> Subject: Re: [Neuroimaging] what's the problem??????
>> To: Neuroimaging analysis in Python <neuroimaging at python.org>, <
>> python-list at python.org>
>>
>>
>> I want to set dict
>>
>> בתאריך יום ד׳, 13 ביולי 2022, 20:47, מאת נתי שטרן ‏<nsh531 at gmail.com>:
>>
>>> CODE:
>>>
>>> for nii in os.listdir("c:/users/administrator/desktop/nii"):
>>>
>>>     from nilearn import plotting
>>>     from nilearn import datasets
>>>     atlas = datasets.fetch_atlas_msdl()
>>>     # Loading atlas image stored in 'maps'
>>>     atlas_filename =
>>> "C:/Users/Administrator/Desktop/64/64/2mm/maps.nii.gz"
>>>     # Loading atlas data stored in 'labels'
>>>     labels = pd.read_csv(
>>> "C:/Users/Administrator/Desktop/64/64/labels_64_dictionary.csv")
>>>     a=labels.to_dict()
>>>     b=a["Difumo_names"]
>>>     from nilearn.maskers import NiftiMapsMasker
>>>     masker = NiftiMapsMasker(maps_img=atlas_filename, standardize=True,
>>>                             memory='nilearn_cache', verbose=5)
>>>
>>>     time_series = masker.fit_transform(
>>> "c:/users/administrator/desktop/nii/"+nii)
>>>     try:
>>>         from sklearn.covariance import GraphicalLassoCV
>>>     except ImportError:
>>>         # for Scitkit-Learn < v0.20.0
>>>         from sklearn.covariance import GraphLassoCV as GraphicalLassoCV
>>>
>>>     estimator = GraphicalLassoCV()
>>>     estimator.fit(time_series)
>>> # Display the covariancec
>>>     aas={}
>>>     jsa=0
>>>     for i in estimator.covariance_:
>>>         r=list(a["Difumo_names"].values())[jsa]
>>>         jsa=jsa+1
>>>         a=dict()
>>>
>>>
>>>         for x in range(64):
>>>             g=list(a["Difumo_names"].values())[x]
>>>
>>>     print(aas)
>>>     t=   nilearn.plotting.plot_img(estimator.covariance_, labels=list(a[
>>> "Difumo_names"].values()),
>>>                         figure=(9, 7), vmax=1, vmin=-1,
>>>                         title='Covariance')# The covariance can be
>>> found at estimator.covariance_
>>>
>>> # The covariance can be found at estimator.covariance_
>>>     t2=  nilearn.plotting.plot_matrix(estimator.covariance_, labels=list
>>> (a["Difumo_names"].values()),
>>>                         figure=(9, 7), vmax=1, vmin=-1,
>>>                         title='Covariance')
>>>
>>>
>>>
>>> --
>>> <https://netanel.ml>
>>>
>> _______________________________________________
>> Neuroimaging mailing list
>> Neuroimaging at python.org
>> https://mail.python.org/mailman/listinfo/neuroimaging
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/neuroimaging/attachments/20220714/3e95a4d5/attachment.html>


More information about the Neuroimaging mailing list