Commit 95be5429 authored by Manuel Grizonnet's avatar Manuel Grizonnet

BUG: clear temporary validation filename when validation ratio is set to 0

parent 9bff5f85
......@@ -118,19 +118,20 @@ public:
ComputePolygonStatistics( imageList, validationVectorFileList, fileNames.polyStatValidOutputs );
ComputeSamplingRate( fileNames.polyStatValidOutputs, fileNames.rateValidOut, rates.fmv );
SelectAndExtractValidationSamples( fileNames, imageList, validationVectorFileList );
// if( HasInputVector ) // if input vector is provided the sampleTrainOutputs is the previously extracted sampleOutputs
fileNames.sampleTrainOutputs = fileNames.sampleOutputs;
}
else if(GetParameterFloat("sample.vtr") != 0.0)// Split training data to validation
{
// if( !HasInputVector ) // Compute one class statistics and sampling rate for the generated vector.
// ComputePolygonStatistics( imageList, fileNames.sampleOutputs, fileNames.polyStatTrainOutputs );
// ComputeSamplingRate( fileNames.polyStatTrainOutputs, fileNames.rateTrainOut, rates.fmt );
SplitTrainingToValidationSamples( fileNames, imageList );
}
else // nothing to do, except update fileNames
else // Update sampleTrainOutputs and clear sampleValidOutputs
{
fileNames.sampleTrainOutputs = fileNames.sampleOutputs;
// Corner case where no dedicated validation set is provided and split ratio is set to 0 (all samples for training)
// In this case SampleValidOutputs should be cleared
fileNames.sampleValidOutputs.clear();
}
}
......
......@@ -234,7 +234,6 @@ protected:
sampleTrainOutputs.push_back( outModel + "_samplesTrain_" + strIndex + ".shp" );
sampleValidOutputs.push_back( outModel + "_samplesValid_" + strIndex + ".shp" );
}
}
void clear()
......
Markdown is supported
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