Module ImportFrom alias Assign NameStore Str TryExcept body ImportFrom alias alias alias alias ImportFrom alias alias alias alias alias ImportFrom alias alias alias alias alias handlers ExceptHandler type NameLoad body Raise Call NameLoad Str ImportFrom alias Import alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Dict Str NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr If NameLoad body Assign NameStore Call NameLoad BinOpAdd NameLoad Str orelse Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str If CompareIn Str NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index Str Call NameLoad SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index Str BinOpPow Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Str If CompareIn Str NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index Str BinOpPow Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Str If CompareIn Str NameLoad body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad Assign NameStore ListLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad Num Str kwarg body Expr Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Import alias identifier Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword ListLoad Num Num Assert Call NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str If CompareIn Str NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index Str Call NameLoad SubscriptLoad NameLoad Index Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body For TupleStore NameStore NameStore NameLoad body Expr Call AttributeLoad NameLoad attr keyword BinOpPow Num NameLoad keyword BinOpPow Num NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign TupleStore NameStore Call NameLoad CompareEq NameLoad AttributeLoad NameLoad attr Assign NameStore TupleLoad NameLoad NameLoad BinOpDiv Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad ExtSlice Index Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index Num attr Slice Num Expr Call AttributeLoad NameLoad attr keyword BinOpPow Num SubscriptLoad NameLoad Index Num keyword BinOpPow Num SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If CompareLtE NameLoad Num body Return NameLoad Assign NameStore Call NameLoad BinOpDiv NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num Assign NameStore ListLoad SubscriptLoad NameLoad Index NameLoad While BoolOpOr NameLoad NameLoad body If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore ListLoad While Num body If BoolOpAnd CompareGt NameLoad Num CompareGt NameLoad NameLoad body Break If BoolOpAnd CompareLt NameLoad Num CompareLt NameLoad NameLoad body Break Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Global identifier Assign NameStore BinOpMult BinOpAdd NameLoad Num NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore ListLoad While BoolOpOr CompareLt NameLoad NameLoad CompareLt NameLoad NameLoad body If CompareLt BinOpDiv NameLoad NameLoad BinOpDiv NameLoad NameLoad body Assign NameStore ListLoad For NameStore Call NameLoad Num NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore ListLoad For NameStore Call NameLoad Num NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad body Expr Str Import alias identifier If BoolOpOr CompareLtE Call NameLoad NameLoad Num UnaryOpNot AttributeLoad NameLoad attr body Return Assign NameStore Num FunctionDef arguments args NameParam NameParam defaults body If CompareLt SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Return Num If CompareGt SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Return Num If CompareGt SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Return Num If CompareLt SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Return Num Return Num decorator_list Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Index Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Index CompareEq NameLoad SubscriptLoad NameLoad Index Num Assign NameStore BinOpDiv AttributeLoad NameLoad attr NameLoad Expr Call NameLoad TupleLoad Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index Num attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad ListLoad ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num Assign NameStore Num Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareGt AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr ExtSlice Index Call AttributeLoad AttributeLoad NameLoad attr attr Slice Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr keyword BinOpPow Num SubscriptLoad NameLoad Index Num keyword BinOpPow Num SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Return NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore ListLoad Assign NameStore Call NameLoad BinOpMult ListLoad NameLoad AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Index NameLoad Slice If CompareGtE NameLoad Num body Assign SubscriptStore NameLoad Index NameLoad NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Expr Call AttributeLoad NameLoad attr keyword BinOpPow Num SubscriptLoad NameLoad Index TupleLoad NameLoad Num keyword BinOpPow Num SubscriptLoad NameLoad Index TupleLoad NameLoad Num Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign TupleStore NameStore Call NameLoad CompareEq NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpDiv Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad NameLoad Index TupleLoad NameLoad Num SubscriptLoad NameLoad Index TupleLoad NameLoad Num NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad ExtSlice Index Call AttributeLoad NameLoad attr Slice attr Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad Num For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad ListLoad Call NameLoad ListLoad SubscriptLoad NameLoad Index NameLoad BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad NameLoad Index NameLoad BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr Call AttributeLoad SubscriptLoad NameLoad ExtSlice Index NameLoad Slice attr Assign AttributeStore NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr orelse Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Index NameLoad Slice keyword Num Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad keyword Num If AttributeLoad NameLoad attr body Import alias identifier If CompareEq AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Num SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Num Str Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Num SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Num Expr Call AttributeLoad NameLoad attr AugAssignAdd AttributeStore NameLoad attr Num Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad BinOpMult Call AttributeLoad BinOpSub NameLoad NameLoad attr AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return BinOpAdd BinOpMult AttributeLoad NameLoad attr NameLoad Call AttributeLoad Call NameLoad BinOpMult Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr Num body Return Num Assign NameStore CompareEq SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Num SubscriptLoad NameLoad Index Num For NameStore Call NameLoad Num AttributeLoad NameLoad attr body Assign NameStore BinOpBitAnd NameLoad CompareEq SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign TupleStore NameStore Call NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr Num body Return Num orelse If CompareGt AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Raise orelse Return SubscriptLoad NameLoad Index Num decorator_list decorator_list
N/A __future__ print_function N/A __author__ Martin Felder, felder@in.tum.de N/A N/A svm svm_model svm_parameter svm_problem cross_validation svm C_SVC NU_SVC ONE_CLASS EPSILON_SVR NU_SVR svm LINEAR POLY RBF SIGMOID PRECOMPUTED N/A N/A N/A ImportError N/A N/A N/A ImportError Cannot find LIBSVM installation. Make sure svm.py and svmc.* are in the PYTHONPATH! numpy * N/A logging SVMTrainer N/A object N/A N/A A class performing supervised learning of a DataSet by an SVM unit. See 
    the remarks on :class:`SVMUnit` above. This whole class is a bit of a hack,
    and provided mostly for convenience of comparisons. __init__ N/A N/A self svmunit dataset modelfile plot N/A None False N/A N/A  Initialize data and unit to be trained, and load the model, if 
        provided.
        
        The passed `svmunit` has to be an object of class :class:`SVMUnit` 
        that is going to be trained on the :class:`ClassificationDataSet` object
        dataset. 
        Compared to FNN training we do not use a test data set, instead 5-fold 
        cross-validation is performed if needed.
        
        If `modelfile` is provided, this model is loaded instead of training.
        If `plot` is True, a grid search is performed and the resulting pattern
        is plotted. N/A N/A self svm svmunit N/A N/A self ds dataset N/A N/A self svmtarget N/A N/A N/A dataset N/A target flatten N/A N/A self plot plot N/A N/A self searchlog gridsearch_results.txt N/A N/A self params N/A kernel_type RBF N/A N/A modelfile None N/A N/A N/A N/A self load modelfile N/A train N/A N/A self search N/A False kwargs N/A N/A  Train the SVM on the dataset. For RBF kernels (the default), an optional meta-parameter search can be performed.

        :key search: optional name of grid search class to use for RBF kernels: 'GridSearch' or 'GridSearchDOE' 
        :key log2g: base 2 log of the RBF width parameter
        :key log2C: base 2 log of the slack parameter
        :key searchlog: filename into which to dump the search log
        :key others: ...are passed through to the grid search and/or libsvm 
         N/A N/A N/A self setParams kwargs N/A problem N/A svm_problem N/A N/A N/A N/A self ds N/A target flatten N/A N/A N/A N/A self ds N/A input tolist N/A search N/A N/A model N/A eval N/A search (problem, self.svmtarget, cmin=[0,-7],cmax=[25,1], cstep=[0.5,0.2],plotflag=self.plot,searchlog=self.searchlog,**self.params) N/A N/A param N/A svm_parameter N/A self params N/A model N/A svm_model problem param N/A N/A N/A logging info Training completed with parameters: N/A N/A N/A logging info N/A repr param N/A N/A N/A N/A self svm setModel model N/A save N/A N/A self filename N/A N/A N/A  save the trained SVM  N/A N/A N/A N/A self svm saveModel filename N/A load N/A N/A self filename N/A N/A N/A  no training at all - just load the SVM model from a file  N/A N/A N/A N/A self svm loadModel filename N/A setParams N/A N/A self N/A kwargs N/A N/A  Set parameters for SVM training. Apart from the ones below, you can use all parameters 
        defined for the LIBSVM svm_model class, see their documentation.

        :key searchlog: Save a list of coordinates and the achieved CV accuracy to this file. N/A N/A weight kwargs N/A N/A N/A N/A self params N/A nr_weight N/A len N/A kwargs N/A weight N/A N/A log2C kwargs N/A N/A N/A N/A self params N/A C N/A 2 N/A kwargs N/A log2C N/A N/A N/A kwargs pop log2C N/A N/A log2g kwargs N/A N/A N/A N/A self params N/A gamma N/A 2 N/A kwargs N/A log2g N/A N/A N/A kwargs pop log2g N/A N/A searchlog kwargs N/A N/A N/A self searchlog N/A kwargs N/A searchlog N/A N/A N/A kwargs pop searchlog N/A N/A N/A N/A self params update kwargs N/A N/A GridSearch N/A svm_model N/A N/A Helper class used by :class:`SVMTrainer` to perform an exhaustive grid search, and plot the
    resulting accuracy surface, if desired. Adapted from the LIBSVM python toolkit. N/A allPts N/A N/A allScores N/A __init__ N/A N/A self problem targets cmin cmax cstep crossval plotflag maxdepth searchlog N/A None 5 False 8 gridsearch_results.txt params N/A N/A  Set up (log) grid search over the two RBF kernel parameters C and gamma.

        :arg problem: the LIBSVM svm_problem to be optimized, ie. the input and target data
        :arg targets: unfortunately, the targets used in the problem definition have to be given again here
        :arg cmin: lower left corner of the log2C/log2gamma window to search
        :arg cmax: upper right corner of the log2C/log2gamma window to search
        :key cstep: step width for log2C and log2gamma (ignored for DOE search)
        :key crossval: split dataset into this many parts for cross-validation
        :key plotflag: if True, plot the error surface contour (regular) or search pattern (DOE)
        :key maxdepth: maximum window bisection depth (DOE only)
        :key searchlog: Save a list of coordinates and the achieved CV accuracy to this file
        :key others: ...are passed through to the cross_validation method of LIBSVM
         N/A N/A self nPars N/A len cmin N/A N/A self usermin cmin N/A N/A self usermax cmax N/A N/A self userstep cstep N/A N/A self crossval crossval N/A N/A self plotflag plotflag N/A N/A self maxdepth maxdepth N/A N/A self params params N/A N/A self plotflag N/A N/A pylab p N/A N/A N/A p ion N/A N/A N/A p figure figsize N/A 12 8 N/A N/A isinstance problem svm_problem N/A N/A self problem problem N/A N/A self targets targets N/A N/A self resfile N/A open searchlog w N/A param N/A N/A self search N/A N/A self plotflag N/A N/A N/A N/A p ioff N/A N/A N/A p show N/A N/A N/A N/A self resfile close N/A N/A N/A svm_model __init__ self problem param N/A setParams N/A N/A self N/A kwargs N/A N/A  set parameters for SVM training  N/A N/A weight kwargs N/A N/A N/A N/A self params N/A nr_weight N/A len N/A kwargs N/A weight N/A N/A N/A N/A self params update kwargs N/A search N/A N/A self N/A N/A N/A  iterate successive parameter grid refinement and evaluation; adapted from LIBSVM grid search tool  N/A jobs N/A N/A self calculate_jobs N/A scores N/A N/A line jobs N/A N/A N/A c g line N/A N/A N/A N/A self setParams C N/A 2 c gamma N/A 2 g N/A param N/A svm_parameter N/A self params N/A cvresult N/A array N/A cross_validation N/A self problem param N/A self crossval N/A N/A corr N/A where N/A cvresult N/A self targets N/A res N/A c g N/A N/A float N/A corr size N/A N/A self targets size N/A N/A N/A scores append res N/A N/A N/A self _save_points res N/A N/A N/A self _redraw scores N/A scores N/A array scores N/A best N/A scores N/A N/A N/A N/A N/A scores N/A N/A N/A 0 argmax N/A 1 N/A N/A N/A self setParams C N/A 2 N/A best N/A 0 gamma N/A 2 N/A best N/A 1 N/A N/A N/A logging info N/A best log2C=%12.7g, log2g=%11.7g  N/A N/A best N/A 0 N/A best N/A 1 N/A param N/A svm_parameter N/A self params N/A param N/A _permute_sequence N/A N/A self seq N/A N/A N/A  helper function to create a nice sequence of refined regular grids; from LIBSVM grid search tool  N/A n N/A len seq N/A N/A n 1 N/A N/A seq N/A mid N/A int N/A n 2 N/A left N/A N/A self _permute_sequence N/A seq N/A mid N/A right N/A N/A self _permute_sequence N/A seq N/A N/A mid 1 N/A ret N/A N/A seq N/A mid N/A N/A left right N/A N/A left N/A N/A N/A N/A ret append N/A N/A left pop 0 N/A right N/A N/A N/A N/A ret append N/A N/A right pop 0 N/A ret N/A _range_f N/A N/A self begin end step N/A N/A N/A  like range, but works on non-integer too; from LIBSVM grid search tool  N/A seq N/A N/A 1 N/A N/A N/A N/A step 0 N/A begin end N/A N/A N/A N/A N/A step 0 N/A begin end N/A N/A N/A N/A N/A seq append begin N/A begin N/A begin step N/A seq N/A calculate_jobs N/A N/A self N/A N/A N/A  like range, but works on non-integer too; from LIBSVM grid search tool  N/A c_seq N/A N/A self _permute_sequence N/A N/A self _range_f N/A N/A self usermin N/A 0 N/A N/A self usermax N/A 0 N/A N/A self userstep N/A 0 N/A g_seq N/A N/A self _permute_sequence N/A N/A self _range_f N/A N/A self usermin N/A 1 N/A N/A self usermax N/A 1 N/A N/A self userstep N/A 1 N/A nr_c N/A float N/A len c_seq N/A nr_g N/A float N/A len g_seq N/A total_points N/A total_points N/A N/A nr_g 1 nr_g N/A i 0 N/A j 0 N/A jobs N/A N/A N/A N/A i nr_c N/A j nr_g N/A N/A N/A N/A i nr_c N/A j nr_g N/A N/A line N/A N/A k N/A range 0 j N/A N/A N/A N/A line append N/A N/A c_seq N/A i N/A g_seq N/A k N/A i N/A i 1 N/A N/A N/A jobs append line N/A N/A line N/A N/A k N/A range 0 i N/A N/A N/A N/A line append N/A N/A c_seq N/A k N/A g_seq N/A j N/A j N/A j 1 N/A N/A N/A jobs append line N/A jobs N/A _save_points N/A N/A self res N/A N/A N/A  save the list of points and corresponding scores into a file  N/A N/A N/A N/A self resfile write N/A %g, %g, %g
 res N/A N/A N/A logging info N/A log2C=%g, log2g=%g, res=%g res N/A N/A N/A N/A self resfile flush N/A _redraw N/A N/A self db tofile eta N/A 0 None N/A N/A  redraw the updated grid interactively  N/A pylab p N/A N/A N/A N/A len db 3 N/A N/A self plotflag N/A N/A N/A nContours 25 cmp N/A N/A x y N/A N/A N/A N/A N/A x N/A 0 N/A y N/A 0 N/A N/A -1 N/A N/A N/A x N/A 0 N/A y N/A 0 N/A N/A 1 N/A N/A N/A x N/A 1 N/A y N/A 1 N/A N/A -1 N/A N/A N/A x N/A 1 N/A y N/A 1 N/A N/A 1 N/A 0 N/A N/A N/A N/A db sort cmp N/A dbarr N/A N/A p asarray db N/A x N/A dbarr N/A N/A N/A 0 N/A dimy N/A len N/A x N/A N/A x N/A x N/A 0 N/A dimx N/A N/A x size dimy N/A N/A print N/A plotting:  dimx dimy N/A x N/A N/A x reshape dimx dimy N/A y N/A dbarr N/A N/A N/A 1 N/A y N/A N/A y reshape dimx dimy N/A z N/A N/A N/A dbarr N/A N/A N/A 2 reshape dimx dimy N/A N/A N/A p ioff N/A N/A N/A p clf N/A N/A N/A p contourf x y z nContours N/A N/A N/A p hsv N/A N/A N/A p colorbar N/A N/A N/A p xlim N/A N/A self usermin N/A 0 N/A N/A self usermax N/A 0 N/A N/A N/A p ylim N/A N/A self usermin N/A 1 N/A N/A self usermax N/A 1 N/A N/A N/A p xlabel $\rm{log}_2(C)$ N/A N/A N/A p ylabel $\rm{log}_2(\gamma)$ N/A N/A N/A p ion N/A N/A N/A p draw_if_interactive N/A N/A GridSearchDOE N/A GridSearch N/A N/A  Same as GridSearch, but implements a design-of-experiments based search pattern, as
    described by C. Staelin, http://www.hpl.hp.com/techreports/2002/HPL-2002-354R1.pdf  N/A doepat N/A array N/A N/A 0.5 1 N/A 0.25 0.75 N/A 0.75 0.75 N/A 0 0.5 N/A 1 0.5 N/A 0.25 0.25 N/A 0.75 0.25 N/A 0.5 0 N/A 0 1 N/A 1 1 N/A 0.5 0.5 N/A 0 0 N/A 1 0 N/A nPts 13 N/A depth 0 search N/A N/A self cmin cmax N/A None None N/A N/A  iterate parameter grid refinement and evaluation recursively  N/A N/A N/A self depth N/A self maxdepth N/A N/A best N/A N/A self allPts N/A N/A N/A N/A N/A self allScores argmax N/A N/A N/A N/A logging info N/A best log2C=%12.7g, log2g=%11.7g  N/A N/A best N/A 0 N/A best N/A 1 N/A N/A N/A self setParams C N/A 2 N/A best N/A 0 gamma N/A 2 N/A best N/A 1 N/A param N/A svm_parameter N/A self params N/A N/A N/A logging info Grid search completed! Final parameters: N/A N/A N/A logging info N/A repr param N/A param N/A N/A cmin None N/A N/A cmin N/A array N/A self usermin N/A cmax N/A array N/A self usermax N/A points N/A N/A self refineGrid cmin cmax N/A scores N/A N/A isnew N/A array N/A N/A True N/A self nPts N/A i N/A range N/A self nPts N/A N/A idx N/A N/A self _findIndex N/A points N/A N/A i N/A N/A N/A idx 0 N/A N/A N/A isnew N/A i False N/A N/A N/A scores append N/A N/A self allScores N/A idx N/A N/A N/A N/A self setParams C N/A 2 N/A points N/A N/A i 0 gamma N/A 2 N/A points N/A N/A i 1 N/A param N/A svm_parameter N/A self params N/A cvresult N/A array N/A cross_validation N/A self problem param N/A self crossval N/A N/A corr N/A where N/A cvresult N/A self targets N/A corr N/A N/A float N/A corr size N/A N/A self targets size N/A N/A N/A scores append corr N/A N/A N/A self _save_points N/A N/A points N/A N/A i 0 N/A points N/A N/A i 1 corr N/A scores N/A array scores N/A newctr N/A N/A N/A points N/A N/A N/A N/A scores argmax N/A copy N/A newdiff N/A N/A cmax cmin 4.0 N/A i N/A range N/A self nPars N/A N/A N/A newctr N/A i N/A min N/A N/A max N/A N/A newctr N/A i N/A N/A N/A self usermin N/A i N/A newdiff N/A i N/A N/A N/A self usermax N/A i N/A newdiff N/A i N/A cmin N/A newctr newdiff N/A cmax N/A newctr newdiff N/A N/A N/A logging info N/A depth:	%3d	crange:	%g	score:	%g N/A N/A self depth N/A N/A cmax N/A 0 N/A cmin N/A 0 N/A N/A scores max N/A N/A N/A self depth 0 N/A N/A N/A self allPts N/A N/A N/A points N/A N/A isnew N/A copy N/A N/A self allScores N/A N/A N/A scores N/A isnew copy N/A N/A N/A self allPts N/A append N/A self allPts N/A points N/A N/A isnew N/A axis 0 N/A N/A self allScores N/A append N/A self allScores N/A scores N/A isnew axis 0 N/A N/A self plotflag N/A N/A pylab p N/A N/A N/A self depth 0 N/A N/A N/A self oPlot N/A N/A N/A p plot N/A N/A self allPts N/A N/A N/A 0 N/A N/A self allPts N/A N/A N/A 1 o N/A 0 N/A N/A N/A N/A self oPlot set_data N/A N/A self allPts N/A N/A N/A 0 N/A N/A self allPts N/A N/A N/A 1 N/A N/A N/A p draw N/A N/A self depth 1 N/A N/A N/A self search cmin cmax N/A refineGrid N/A N/A self cmin cmax N/A N/A N/A  given grid boundaries, generate the corresponding DOE pattern from template N/A diff N/A N/A N/A array N/A N/A N/A N/A cmax cmin tolist N/A self nPts reshape N/A self nPts N/A self nPars N/A N/A N/A N/A self doepat diff N/A N/A N/A array N/A N/A N/A cmin tolist N/A self nPts reshape N/A self nPts N/A self nPars N/A _findIndex N/A N/A self point N/A N/A N/A  determines whether given point already exists in list of all calculated points.
        raises exception if more than one point is found, returns -1 if no point is found  N/A N/A N/A self depth 0 N/A N/A -1 N/A check N/A N/A N/A self allPts N/A N/A N/A 0 N/A point N/A 0 N/A i N/A range 1 N/A point size N/A N/A check N/A check N/A N/A N/A self allPts N/A N/A N/A i N/A point N/A i N/A N/A idx N/A where check N/A N/A N/A idx size 0 N/A N/A -1 N/A N/A N/A N/A idx size 1 N/A N/A N/A N/A logging error Something went wrong - found more than one matching point! N/A N/A N/A logging error N/A str point N/A N/A N/A logging error N/A str N/A self allPts N/A N/A N/A N/A idx N/A 0 N/A N/A