Skip to content

Commit

Permalink
#512 - Check logging in TC
Browse files Browse the repository at this point in the history
  • Loading branch information
Horsmann committed Oct 4, 2018
1 parent 58dbc62 commit 90fe41b
Showing 1 changed file with 9 additions and 2 deletions.
Expand Up @@ -25,6 +25,7 @@
import java.util.Map;

import org.apache.commons.collections4.map.HashedMap;
import org.apache.commons.logging.LogFactory;
import org.apache.uima.analysis_engine.AnalysisEngineDescription;
import org.apache.uima.collection.CollectionReaderDescription;
import org.apache.uima.fit.factory.CollectionReaderFactory;
Expand Down Expand Up @@ -502,9 +503,14 @@ protected void sanityCheckTrainTestExperiment()

protected int getCvFolds()
{
if (numFolds == -1) {
numFolds = 10;
// -1 defines leave one out and is, thus, valid as parameter. Any lower number
// is not
if (numFolds < -1) {
throw new IllegalArgumentException("Specified number of folds [" + numFolds
+ "] is invlaid, set either [-1] for LEAVE-ONE-OUT or a positive value");
}

LogFactory.getLog(getClass()).debug("Number of folds set to ["+numFolds+"]");

return numFolds;
}
Expand Down Expand Up @@ -538,6 +544,7 @@ public ExperimentBuilder reports(ReportBase... reports)
{
this.reports = new ArrayList<>();
for (ReportBase r : reports) {
LogFactory.getLog(getClass()).debug("Add report ["+r.getClass().getSimpleName()+"] to experimental setup");
this.reports.add(r);
}

Expand Down

0 comments on commit 90fe41b

Please sign in to comment.