Commit 954a38cd authored by Cédric Traizet's avatar Cédric Traizet
Browse files

DOC: documentation for the parameters

No related merge requests found
Showing with 22 additions and 15 deletions
+22 -15
......@@ -81,13 +81,18 @@ protected:
SetDefaultParameterInt("maxit", 1000);
MandatoryOff("maxit");
AddParameter(ParameterType_String, "inmeans", "Maximum number of iterations");
SetParameterDescription("inmeans", "Maximum number of iterations for the learning step.");
MandatoryOff("inmeans");
AddParameter( ParameterType_Group, "inmeans", "Input centroids parameters" );
SetParameterDescription( "inmeans",
"Group of parameters for used defined input centroids." );
AddParameter(ParameterType_InputFilename, "inmeans.in", "input centroids");
SetParameterDescription("inmeans.in", "Input text file containing centroid posistions.");
MandatoryOff("inmeans.in");
AddParameter(ParameterType_Bool, "normalizeinmeans", "Number of classes");
SetParameterDescription("normalizeinmeans", "Number of modes, which will be used to generate class membership.");
SetDefaultParameterInt("normalizeinmeans", true);
AddParameter(ParameterType_Bool, "inmeans.normalize", "Normalize input centroids");
SetParameterDescription("inmeans.normalize", "Normalize input centroids using the image statistics"
" computed during the execution of the application");
SetDefaultParameterInt("inmeans.normalize", true);
AddParameter(ParameterType_OutputFilename, "outmeans", "Centroid filename");
SetParameterDescription("outmeans", "Output text file containing centroid positions");
......@@ -256,11 +261,11 @@ protected:
GetParameterInt("maxit"));
GetInternalApplication("training")->SetParameterInt("classifier.sharkkm.k",
GetParameterInt("nc"));
if(IsParameterEnabled("inmeans") && HasValue("inmeans"))
if(IsParameterEnabled("inmeans.in") && HasValue("inmeans.in"))
{
GetInternalApplication("training")->SetParameterString("classifier.sharkkm.centroids",
GetParameterString("inmeans"));
if(GetParameterInt("normalizeinmeans"))
GetParameterString("inmeans.in"));
if(GetParameterInt("inmeans.normalize"))
GetInternalApplication("training")->SetParameterString("classifier.sharkkm.centroidstats",
GetInternalApplication("imgstats")->GetParameterString("out"));
}
......
......@@ -45,16 +45,18 @@ void LearningApplicationBase<TInputValue, TOutputValue>::InitSharkKMeansParams()
SetParameterInt("classifier.sharkkm.k", 2);
SetParameterDescription("classifier.sharkkm.k", "The number of classes used for the kmeans algorithm. Default set to 2 class");
SetMinimumParameterIntValue("classifier.sharkkm.k", 2);
// Input centroids
AddParameter(ParameterType_InputFilename, "classifier.sharkkm.centroids", "input centroids");
SetParameterDescription("classifier.sharkkm.centroids", "Text file containing input centroids.");
MandatoryOff("classifier.sharkkm.centroids");
// Centroid statistics
AddParameter(ParameterType_InputFilename, "classifier.sharkkm.centroidstats", "Statistics file");
SetParameterDescription("classifier.sharkkm.centroidstats", "A XML file containing mean and standard deviation to center"
"and reduce the centroids before classification, produced by ComputeImagesStatistics application.");
"and reduce the centroids before the KMeans algorithm, produced by ComputeImagesStatistics application.");
MandatoryOff("classifier.sharkkm.centroidstats");
// Number of classes
AddParameter(ParameterType_InputFilename, "classifier.sharkkm.centroids", "Number of classes for the kmeans algorithm");
SetParameterDescription("classifier.sharkkm.centroids", "The number of classes used for the kmeans algorithm. Default set to 2 class");
MandatoryOff("classifier.sharkkm.centroids");
}
template<class TInputValue, class TOutputValue>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment