Skip to content
Snippets Groups Projects
Commit ca871c6e authored by Ludovic Hussonnois's avatar Ludovic Hussonnois
Browse files

ENH: Change default initialization parameters.

parent 2d9554e5
No related branches found
No related tags found
No related merge requests found
......@@ -68,19 +68,9 @@ public:
{
if( HasValue( "io.vd" ) && IsParameterEnabled( "io.vd" ))
{
DisableParameter("sample.percent");
EnableParameter("sample.mv");
EnableParameter("sample.mt");
EnableParameter("sample.vfn");
UpdatePolygonClassStatisticsParameters();
}
else
{
EnableParameter("sample.percent");
DisableParameter("sample.mv");
DisableParameter("sample.mt");
DisableParameter("sample.vfn");
}
// Change mandatory of input vector depending on supervised and unsupervised mode.
if( HasValue( "classifier" ) )
......
......@@ -34,6 +34,7 @@ void TrainImagesBase::InitIO()
SetParameterDescription( "io.il", "A list of input images." );
AddParameter( ParameterType_InputVectorDataList, "io.vd", "Input Vector Data List" );
SetParameterDescription( "io.vd", "A list of vector data to select the training samples." );
MandatoryOff( "io.vd" );
AddParameter( ParameterType_Empty, "cleanup", "Temporary files cleaning" );
EnableParameter( "cleanup" );
......
......@@ -34,10 +34,10 @@ void LearningApplicationBase<TInputValue, TOutputValue>::InitSharkKMeansParams()
//MaxNumberOfIterations
AddParameter( ParameterType_Int, "classifier.sharkkm.nbmaxiter",
"Maximum number of iteration for the kmeans algorithm." );
SetParameterInt( "classifier.sharkkm.nbmaxiter", 0 );
SetParameterInt( "classifier.sharkkm.nbmaxiter", 10 );
SetMinimumParameterIntValue( "classifier.sharkkm.nbmaxiter", 0 );
SetParameterDescription( "classifier.sharkkm.nbmaxiter",
"The maximum number of iteration for the kmeans algorithm. Default set to unlimited." );
"The maximum number of iteration for the kmeans algorithm. 0=unlimited" );
//MaxNumberOfIterations
AddParameter( ParameterType_Int, "classifier.sharkkm.k", "The number of class used for the kmeans algorithm." );
......
......@@ -49,7 +49,7 @@ namespace otb
template<class TInputValue, class TOutputValue>
SharkKMeansMachineLearningModel<TInputValue, TOutputValue>
::SharkKMeansMachineLearningModel() :
m_Normalized( true ), m_K(2), m_MaximumNumberOfIterations( 0 )
m_Normalized( false ), m_K(2), m_MaximumNumberOfIterations( 10 )
{
// Default set HardClusteringModel
m_ClusteringModel = boost::shared_ptr<ClusteringModelType>(new ClusteringModelType( &m_Centroids ));
......
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