# HMM Analysis on Wakeman & Henson Dataset
The repository contains the scripts to run two different types of Hidden Markov Model analysis on a freely available MEG dataset. The analyses are described in full in our accompanying paper
Quinn, A. J., Vidaurre, D., Abeysuriya, R., Becker, R., Nobre, A. C., & Woolrich, M. W. (2018). Task-Evoked Dynamic Network Analysis Through Hidden Markov Modeling. Frontiers in Neuroscience, 12. https://doi.org/10.3389/fnins.2018.00603
This was published as part of a Frontiers in Neuroscience special issue - "From raw MEG/EEG to publication: how to perform MEG/EEG group analysis with free academic software." (https://www.frontiersin.org/research-topics/5158/from-raw-megeeg-to-publication-how-to-perform-megeeg-group-analysis-with-free-academic-software)
### Prerequisites
To run these analyses you will require:
- A UNIX-type computer system
- FSL version 5.0.9 (https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation)
- MatLab 2014b or greater
- SPM12 MatLab Toolbox (http://www.fil.ion.ucl.ac.uk/spm/software/download/)
- OSL2 MatLab Toolbox (https://ohba-analysis.github.io/osl-docs/)
- HMM-MAR MatLab toolbox (https://github.com/OHBA-analysis/HMM-MAR)
OSL2 and HMM-MAR are provided as part of this download. SPM12 should be installed into the osl2 directory.
### Getting Started
The download containing core scripts and associated toolboxes can be found on our OSF page here: https://osf.io/ugjbr/
Please download the HMM\_Task\_Download.zip file. It is recommended to make sure the scripts subdirectory in the download folder contains the latest versions of the scripts from this repository.
Note: All folder paths referred to here are relative to the location of this download, ie all paths assume that your current directory is the top-level of this download.
Once the download is complete take a look into the toolboxes folder of this download. You will find a copy of HMM-MAR (github repo: https://github.com/OHBA-analysis/HMM-MAR) and OSL (docs: https://ohba-analysis.github.io/osl-docs/). These are the core MatLab toolboxes that will run the analyses.
Next, take a look into the scripts/ folder within the HMM download. This contains the main analysis script and a utils subfolder containing a small helper module with some useful functions used within the analysis.
Get the data:
1) Download revision 0.1.1 of the Wakeman and Henson dataset (http://doi.org/10.1038/sdata.2015.1). These files can be downloaded anywhere on your system which is convenient and that can be accessed through your MatLab file browser.
Install SPM12 and OSL (note these steps can be carried out whilst the data is downloading):
2) Download SPM12 and install into the toolboxes/osl folder, SPM is available here: http://www.fil.ion.ucl.ac.uk/spm/software/spm12/
3) Install OSL. Additional information about the dependencies and install path for OSL can be found in toolboxes/osl/README.md and toolboxes/osl/osl-core/README.md
Configure the analysis:
4) Open scripts/+utils/get\_studyinfo.m. This script defines the locations of the downloaded data, analysis scripts and the location to store results and is used throughout the analysis to load and save data. Edit the file paths to match the chosen locations on your system.
5) open scripts/hmm\_0\_initialise.m . This script adds all the relevant paths to your MatLab session and loads the information defined within get\_studyinfo.m . Edit the download\_path at the top to the location of this download.
Check installation
6) Open MatLab 2014b (or greater) and run hmm\_0\_initialise.m toolboxes to the path and load the information from get\_studyinfo.m .
7) Run utils.check\_raw\_data in your MatLab session. This should confirm that 'All raw data is found in studydir'. If not, check that the studydir path in scripts/+utils/get\_studyinfo.m matches the location of your downloaded data.
8) Run osl\_check\_installation in your MatLab session. This will print a range of information about your OSL and MatLab environment and highlight any missing dependencies.
### Main Analysis
The HMM analysis is completed in a MatLab session in which the hmm\_0\_initialise.m script has been excecuted.
The HMM analysis proceeds by following the hmm\_\* scripts within the scripts/ subfolder of this download. They should be run in order, though each script will define and load everything it needs. So you can exit matlab and start a new session in between running two of the scripts as long as hmm\_0\_initialise.m is excecuted in each new session.
The hmm\_\* scripts contain additional information and explanations which help to describe the preprocessing and analysis as it is run.
没有合适的资源?快使用搜索试试~ 我知道了~
基于隐马尔可夫模型的任务诱发动态网络分析matlab代码.zip
共20个文件
m:19个
md:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 140 浏览量
2024-02-19
00:26:19
上传
评论
收藏 44KB ZIP 举报
温馨提示
1.版本:matlab2014/2019a/2021a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
资源推荐
资源详情
资源评论
收起资源包目录
基于隐马尔可夫模型的任务诱发动态网络分析matlab代码.zip (20个子文件)
基于隐马尔可夫模型的任务诱发动态网络分析matlab代码
Quinn2018_TaskHMM-master
README.md 5KB
scripts
hmm_1_preprocessing.m 13KB
hmm_0_initialise.m 985B
+utils
run_flame.m 1021B
set_redblue_colourmap.m 1KB
get_studydetails.m 2KB
check_raw_data.m 982B
baseline_correct.m 345B
set1_cols.m 382B
merge_sessions.m 548B
run_group_glm.m 4KB
nnmf_mww.m 14KB
run_glm.m 1KB
load_epoch_results.m 1KB
check_preproc_data.m 3KB
run_nnmf.m 2KB
hmm_5_embedded_results.m 14KB
hmm_3_embedded_estimation.m 9KB
hmm_4_envelope_results.m 10KB
hmm_2_envelope_estimation.m 6KB
共 20 条
- 1
资源评论
matlab科研助手
- 粉丝: 2w+
- 资源: 2122
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功