interfaces.afni.svm

SVMTest

Link to code

Wraps the executable command 3dsvm.

Temporally predictive modeling with the support vector machine SVM Test Only For complete details, see the 3dsvm Documentation.

Examples

>>> from nipype.interfaces import afni as afni
>>> svmTest = afni.SVMTest()
>>> svmTest.inputs.in_file= 'run2+orig'
>>> svmTest.inputs.model= 'run1+orig_model'
>>> svmTest.inputs.testlabels= 'run2_categories.1D'
>>> svmTest.inputs.out_file= 'pred2_model1'
>>> res = svmTest.run() 

Inputs:

[Mandatory]
model: (a unicode string)
        modname is the basename for the brik containing the SVM model
        argument: ``-model %s``
in_file: (an existing file name)
        A 3D or 3D+t AFNI brik dataset to be used for testing.
        argument: ``-testvol %s``

[Optional]
out_file: (a file name)
        filename for .1D prediction file(s).
        argument: ``-predictions %s``
testlabels: (an existing file name)
        *true* class category .1D labels for the test dataset. It is used to
        calculate the prediction accuracy performance
        argument: ``-testlabels %s``
classout: (a boolean)
        Flag to specify that pname files should be integer-valued,
        corresponding to class category decisions.
        argument: ``-classout``
nopredcensord: (a boolean)
        Flag to prevent writing predicted values for censored time-points
        argument: ``-nopredcensord``
nodetrend: (a boolean)
        Flag to specify that pname files should not be linearly detrended
        argument: ``-nodetrend``
multiclass: (a boolean)
        Specifies multiclass algorithm for classification
        argument: ``-multiclass %s``
options: (a unicode string)
        additional options for SVM-light
        argument: ``%s``
num_threads: (an integer (int or long), nipype default value: 1)
        set number of threads
outputtype: ('NIFTI' or 'AFNI' or 'NIFTI_GZ')
        AFNI output filetype
args: (a unicode string)
        Additional parameters to the command
        argument: ``%s``
environ: (a dictionary with keys which are a bytes or None or a value
          of class 'str' and with values which are a bytes or None or a
          value of class 'str', nipype default value: {})
        Environment variables

Outputs:

out_file: (an existing file name)
        output file

References:

None None

SVMTrain

Link to code

Wraps the executable command 3dsvm.

Temporally predictive modeling with the support vector machine SVM Train Only For complete details, see the 3dsvm Documentation.

Examples

>>> from nipype.interfaces import afni as afni
>>> svmTrain = afni.SVMTrain()
>>> svmTrain.inputs.in_file = 'run1+orig'
>>> svmTrain.inputs.trainlabels = 'run1_categories.1D'
>>> svmTrain.inputs.ttype = 'regression'
>>> svmTrain.inputs.mask = 'mask.nii'
>>> svmTrain.inputs.model = 'model_run1'
>>> svmTrain.inputs.alphas = 'alphas_run1'
>>> res = svmTrain.run() 

Inputs:

[Mandatory]
ttype: (a unicode string)
        tname: classification or regression
        argument: ``-type %s``
in_file: (an existing file name)
        A 3D+t AFNI brik dataset to be used for training.
        argument: ``-trainvol %s``

[Optional]
out_file: (a file name)
        output sum of weighted linear support vectors file name
        argument: ``-bucket %s``
model: (a file name)
        basename for the brik containing the SVM model
        argument: ``-model %s``
alphas: (a file name)
        output alphas file name
        argument: ``-alpha %s``
mask: (an existing file name)
        byte-format brik file used to mask voxels in the analysis
        argument: ``-mask %s``, position: -1
nomodelmask: (a boolean)
        Flag to enable the omission of a mask file
        argument: ``-nomodelmask``
trainlabels: (an existing file name)
        .1D labels corresponding to the stimulus paradigm for the training
        data.
        argument: ``-trainlabels %s``
censor: (an existing file name)
        .1D censor file that allows the user to ignore certain samples in
        the training data.
        argument: ``-censor %s``
kernel: (a unicode string)
        string specifying type of kernel function:linear, polynomial, rbf,
        sigmoid
        argument: ``-kernel %s``
max_iterations: (an integer (int or long))
        Specify the maximum number of iterations for the optimization.
        argument: ``-max_iterations %d``
w_out: (a boolean)
        output sum of weighted linear support vectors
        argument: ``-wout``
options: (a unicode string)
        additional options for SVM-light
        argument: ``%s``
num_threads: (an integer (int or long), nipype default value: 1)
        set number of threads
outputtype: ('NIFTI' or 'AFNI' or 'NIFTI_GZ')
        AFNI output filetype
args: (a unicode string)
        Additional parameters to the command
        argument: ``%s``
environ: (a dictionary with keys which are a bytes or None or a value
          of class 'str' and with values which are a bytes or None or a
          value of class 'str', nipype default value: {})
        Environment variables

Outputs:

out_file: (a file name)
        sum of weighted linear support vectors file name
model: (a file name)
        brik containing the SVM model file name
alphas: (a file name)
        output alphas file name

References:

None None