Skip to content

wanirepo/SAS2015_PatRec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAS2015 Pattern Recognition

This github repository includes a walk-through example to help people get hands-on experience of using CANLab MVPA tools. This github is coupled with this hackpad.

Installation

You can download the CANLab core tools (written in MATLAB) using the following command line. You can also fork the CanlabCore repository.

$ git clone https://github.com/canlab/CanlabCore.git

You can also download this SAS2015_PatRec github repository using the following command line.

$ git clone https://github.com/wanirepo/SAS2015_PatRec.git

Overview

The main MATLAB function we will use for our purpose is fmri_data.predict, which is a method of the fmri_data object. You can read a brief overview of our object-oriented tools for fMRI analysis here. (We're sorry that documentations in that page are incomplete, but you will be able to get all the information you need for our purpose).

fmri_data object

This object is a child of the image_vector object. fmri_data stores 4-D data from a series of one or more images. It has special data fields for predictors, outcome data, and other associated information. It inherits all the methods from image_vector (e.g., fmri_data.orthviews), but also has special methods for data analysis, including fmri_data.predict, fmri_data.preprocess, fmri_data.rescale, and others.

fmri_data.predict

Using this function, you will be able to run many different machine learning algorithms on your data. The algorithms include multiple regression, LASSO regression, LASSO-PCR, SVMs, SVR, etc. To run all of these algorithms, you may need basic MATLAB toolboxes provided by MathWorks. In addition, you need a couple of external toolboxes (see dependency below).

Dependency

Our core toolbox has these external toolboxes within a directory called "External", and you can also download them from their website directly.

1. Spider toolbox for SVMs

http://people.kyb.tuebingen.mpg.de/spider/download_frames.html

2. Lasso toolbox by Rocha and Zhao

http://www.stat.berkeley.edu/~yugroup/downloads/

If you downloaded this, please change lasso.m into lasso_rocha.m. to avoid a name conflict with the lasso function provided by MathWorks.

For your note, our fmri_data.predict has both options for Rocha and Zhao's lasso function ('cv_lassopcr') and MATLAB lasso function ('cv_lassopcrmatlab'). This is because we started to use lasso methods before MATLAB provided the lasso function. You can use one of them.

Getting started

predict_example.m has all the codes you need for the hands-on experience. The output figures and detailed explanations can be found here.

About

SAS 2015 Pattern Recognition preconference

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages