@@ -37,14 +37,19 @@ class SVMTrainInputSpec(AFNICommandInputSpec):
37
37
copyfile = False )
38
38
out_file = File (name_template = "%s_vectors" ,
39
39
desc = 'output sum of weighted linear support vectors file name' ,
40
- argstr = '-bucket %s' ,
40
+ argstr = '-bucket %s' ,
41
+ suffix = '_bucket' ,
41
42
name_source = "in_file" )
42
- model = traits .Str (name_template = "%s_model" ,
43
- desc = 'modname is the basename for the brik containing the SVM model' ,
44
- argstr = '-model %s' )
45
- alphas = traits .Str (name_template = "%s_alphas" ,
43
+ model = File (name_template = "%s_model" ,
44
+ desc = 'basename for the brik containing the SVM model' ,
45
+ argstr = '-model %s' ,
46
+ suffix = '_model' ,
47
+ name_source = "in_file" )
48
+ alphas = File (name_template = "%s_alphas" ,
46
49
desc = 'output alphas file name' ,
47
- argstr = '-alpha %s' )
50
+ argstr = '-alpha %s' ,
51
+ suffix = '_alphas' ,
52
+ name_source = "in_file" )
48
53
mask = File (desc = 'byte-format brik file used to mask voxels in the analysis' ,
49
54
argstr = '-mask %s' ,
50
55
position = - 1 ,
@@ -66,6 +71,11 @@ class SVMTrainInputSpec(AFNICommandInputSpec):
66
71
argstr = '-wout' )
67
72
options = traits .Str (desc = 'additional options for SVM-light' , argstr = '%s' )
68
73
74
+ class SVMTrainOutputSpec (TraitedSpec ):
75
+ out_file = File (desc = 'sum of weighted linear support vectors file name' )
76
+ model = File (desc = 'brik containing the SVM model file name' )
77
+ alphas = File (desc = 'output alphas file name' )
78
+
69
79
class SVMTrain (AFNICommand ):
70
80
"""Temporally predictive modeling with the support vector machine
71
81
SVM Train Only
@@ -89,7 +99,11 @@ class SVMTrain(AFNICommand):
89
99
90
100
_cmd = '3dsvm'
91
101
input_spec = SVMTrainInputSpec
92
- output_spec = AFNICommandOutputSpec
102
+ output_spec = SVMTrainOutputSpec
103
+ _additional_metadata = ['suffix' ]
104
+
105
+ def _format_arg (self , name , trait_spec , value ):
106
+ return super (SVMTrain , self )._format_arg (name , trait_spec , value )
93
107
94
108
class SVMTestInputSpec (AFNICommandInputSpec ):
95
109
#testing options
0 commit comments