# TrainOGRLayersClassifier

## Brief Description

Train a SVM classifier based on labeled geometries and a list of features to consider.

## Tags

Segmentation

## Long Description

This application trains a SVM classifier based on labeled geometries and a list of features to consider for classification. This application is deprecated, prefer using TrainVectorClassifier which offers access to all the classifiers.

## Parameters

- [param] -inshp <string> Name of the input shapefile. Mandatory: True. Default Value: ""
- [param] -instats <string> XML file containing mean and variance of each feature.. Mandatory: True. Default Value: ""
- [param] -outsvm <string> Output model filename.. Mandatory: True. Default Value: ""
- [param] -cfield <string> Field containing the class id for supervision. Only geometries with this field available will be taken into account.. Mandatory: True. Default Value: "class"
- [param] -inxml <string> Load otb application from xml file. Mandatory: False. Default Value: ""
- [param] -outxml <string> Save otb application to xml file. Mandatory: False. Default Value: ""
[choice] -feat List of features to consider for classification. . Mandatory: True. Default Value: ""

## Limitations

Experimental. For now only shapefiles are supported. Tuning of SVM classifier is not available.

## Authors

David Youssefi during internship at CNES

## See Also

OGRLayerClassifier,ComputeOGRLayersFeaturesStatistics

## Example of use

- inshp: vectorData.shp

- instats: meanVar.xml

- outsvm: svmModel.svm

- feat: perimeter

- cfield: predicted