#NEWLINE# def train( self , C = None , Gamma = None , ilog = None , callback = None ) : #NEWLINE# #INDENT# self . svm = SVM ( svm_type = TYPE_C_SVC ) #NEWLINE# for ( sub_id , tiles ) in self . training_data . iteritems ( ) : #NEWLINE# #INDENT# for tile in tiles : #NEWLINE# #INDENT# self . svm . addTraining ( ilog , tile ) #NEWLINE# #UNINDENT# #UNINDENT# if ( ( C != None ) and ( Gamma != None ) ) : #NEWLINE# #INDENT# self . svm . train ( C_range = C , G_range = Gamma , verbose = True , callback = callback ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . svm . train ( verbose = True , callback = callback )