Skip to content
Snippets Groups Projects
Commit 9d66a51f authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: fix confidence index in SharkKMeans

parent d0e2ae71
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@ SharkKMeansMachineLearningModel<TInputValue, TOutputValue>
m_Normalized( false ), m_K(2), m_MaximumNumberOfIterations( 10 )
{
// Default set HardClusteringModel
this->m_ConfidenceIndex = true;
m_ClusteringModel = boost::make_shared<ClusteringModelType>( &m_Centroids );
}
......@@ -174,7 +175,7 @@ SharkKMeansMachineLearningModel<TInputValue, TOutputValue>
// Change quality measurement only if SoftClustering or other clustering method is used.
if( quality != ITK_NULLPTR )
{
for( unsigned int qid = startIndex; qid < size; ++qid )
for( unsigned int qid = startIndex; qid < startIndex+size; ++qid )
{
quality->SetMeasurementVector( qid, static_cast<ConfidenceValueType>(1.) );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment