# OTB TrainVectorClassifier 

**URL:** <https://forum.orfeo-toolbox.org/t/otb-trainvectorclassifier/519>\
**Category:** OTB Usage\
**Created:** [January 1, 2020, 8:20am UTC](https://forum.orfeo-toolbox.org/t/otb-trainvectorclassifier/519 "2020-01-01T08:20:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![parksi](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/p/d78d45/32.png) [@parksi](https://forum.orfeo-toolbox.org/u/parksi)\
**Post date:** [January 1, 2020, 8:20am UTC](https://forum.orfeo-toolbox.org/t/otb-trainvectorclassifier/519/1 "2020-01-01T08:20:48Z")

</div>

The OTB was recently updated to 7.0. “User definied input centroids” has been added.

Can you explain how to process the data?

---

<div class="post-metadata">

**Author:** ![Cedric](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/c/ecd19e/32.png) [@Cedric](https://forum.orfeo-toolbox.org/u/Cedric)\
**Post date:** [January 3, 2020, 10:22am UTC](https://forum.orfeo-toolbox.org/t/otb-trainvectorclassifier/519/2 "2020-01-03T10:22:08Z")

</div>

Hello,

I’m assuming you are using OTB through QGIS, as I can only reproduce your produce using the QGIS plugin.

I think this is a bug, this parameter should only be available when using the kmeans algorithm (the result of this algorithm are dependent on the initial centroids) and should not be mandatory anyway. I will make a fix in OTB. In the meantime you have two workaround :

1. Set a value to the “User definied input centroids” (any string will work). The application should start correctly, and the parameter will be ignored, you should have the following log :

```auto
WARNING: Parameter -classifier.sharkkm.centroids.in will be ignored because -classifier is libsvm.

```

1. Use another wrapper (monteverdi, command line, python …). I think this bug only applies on the QGIS plugin.

Hope that helps,  
Cédric
