deepsulci.pattern_classification.capsul.svm_training.PatternSVMTraining

PatternSVMTraining

Process to train a Support Vector Machine (SVM) classifier to recognize a searched fold pattern.

This process consists of three steps. Each step depends on the previous step. However, they can be started independently if the previous steps have already been completed.

The first step is to extract from the graphs the data useful for training the SVM-based model (buckets and labels). These data are stored in Jason files (traindata_file).

The second step allows to set the hyperparameters (C, gamma and translations applied to the patches before their registration with the Iterative Closest Point (ICP) algorithm) by 3-fold cross-validation. These hyperparameters are saved in the Jason file param_file.

The third step is to train the SVM on the data. The model is saved in clf_file and the scaler allowing to standardize the features in scaler_file.

Warning: The searched pattern must have been manually labeled on the graphs of the training database containing it.

Note

  • Type ‘PatternSVMTraining.help()’ for a full description of this process parameters.
  • Type ‘<PatternSVMTraining>.get_input_spec()’ for a full description of this process input trait types.
  • Type ‘<PatternSVMTraining>.get_output_spec()’ for a full description of this process output trait types.

Inputs

[Mandatory]

graphs: a legal value ([‘List_File’] - mandatory)
training base graphs
pattern: a unicode string ([‘Str’] - mandatory)
vertex name representing the searched pattern
names_filter: a legal value ([‘List_Bytes’] - mandatory)
list of vertex names used for the registration of the patches

[Optional]

step_1: a boolean ([‘Bool’] - optional)
perform the data extraction step from the graphs
step_2: a boolean ([‘Bool’] - optional)
perform the hyperparameter tuning step (C, gamma, initial translations)
step_3: a boolean ([‘Bool’] - optional)
perform the model training step

Outputs

traindata_file: a file name ([‘File (filename: input)’] - mandatory)
file (.json) storing the data extracted from the training base graphs
param_file: a file name ([‘File (filename: input)’] - mandatory)
file (.json) storing the hyperparameters (C, gamma, initial tranlations)
clf_file: a file name ([‘File (filename: input)’] - mandatory)
file (.sav) storing the trained SVM classifier
scaler_file: a file name ([‘File (filename: input)’] - mandatory)
file (.sav) storing the scaler