# Problems with the use of clustering algorithm functions

**URL:** <https://forum.orfeo-toolbox.org/t/problems-with-the-use-of-clustering-algorithm-functions/664>\
**Category:** OTB Usage\
**Created:** [May 5, 2020, 2:59am UTC](https://forum.orfeo-toolbox.org/t/problems-with-the-use-of-clustering-algorithm-functions/664 "2020-05-05T02:59:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ipodsky](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/i/e480ec/32.png) [@ipodsky](https://forum.orfeo-toolbox.org/u/ipodsky)\
**Post date:** [May 5, 2020, 2:59am UTC](https://forum.orfeo-toolbox.org/t/problems-with-the-use-of-clustering-algorithm-functions/664/1 "2020-05-05T02:59:38Z")

</div>

During the follow-up process of using the OTB toolbox, I have encountered the following questions.

1. After classification using the clustering algorithm ‘kmeansclassifier’ function, can kappa and classification accuracy be output directly? If not, do you need to use the ‘ComputeConfusionMatrix’ tool to generate it? If I use ‘ComputeConfusionMatrix’ tool, do I still need a truth map or shp file? If the relevant image does not have a truth map or shp file, how do I generate the overall accuracy and kappa value?
2. Spectral-based classification of remote sensing images should be implemented using the relevant functions in the OTB toolbox. How are the specific steps implemented?

---

<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:** [May 5, 2020, 5:41am UTC](https://forum.orfeo-toolbox.org/t/problems-with-the-use-of-clustering-algorithm-functions/664/2 "2020-05-05T05:41:07Z")

</div>

Hello,

> [@ipodsky](#):
>
> After classification using the clustering algorithm ‘kmeansclassifier’ function, can kappa and classification accuracy be output directly? If not, do you need to use the ‘ComputeConfusionMatrix’ tool to generate it? If I use ‘ComputeConfusionMatrix’ tool, do I still need a truth map or shp file? If the relevant image does not have a truth map or shp file, how do I generate the overall accuracy and kappa value?

How do you want to assess the performances or the Kmeans classifier if you have no reference to compare the resulting classification with ?

> [@ipodsky](#):
>
> 1. Spectral-based classification of remote sensing images should be implemented using the relevant functions in the OTB toolbox. How are the specific steps implemented?

I don’t understand if you are asking about details on the different algorithm (random forest, svm …) or how to implement a classification chain using OTB applications. In the latter case, you can find informations [here](https://www.orfeo-toolbox.org/CookBook/recipes/pbclassif.html).

Cédric
