Bug fix for click train logging

The size of the string classifers field was dynamically set - this was a bug.
This commit is contained in:
Jamie Mac 2022-08-17 09:07:01 +01:00
parent 16a3210424
commit 252cb30d67

View File

@ -133,12 +133,15 @@ public class ClickTrainDetLogging extends SuperDetLogging {
String classificationData = getClassifierData(ctDataUnit);
// Debug.out.println("Classifier Save: " + classificationData);
System.out.println("Classifier Save: " + classificationData);
if (classificationData.length()>0) {
classifiers.setLength(classificationData.length());
//classifiers.setLength(classificationData.length());
classifiers.setValue(classificationData);
}
else {
classifiers.setValue(null);
}
if (ctDataUnit.getClassificationIndex()>=0) {
speciesFlag.setValue(ctDataUnit.getCtClassifications().
@ -301,8 +304,8 @@ public class ClickTrainDetLogging extends SuperDetLogging {
}
}
catch (Exception e) {
Debug.err.println("ClickTrainDetLogging: BAD JSON CLASSIFIER STRING: " + classifiersDatas[i]);
Debug.err.println(classifiersData);
System.err.println("ClickTrainDetLogging: BAD JSON CLASSIFIER STRING: " + classifiersDatas[i]);
System.err.println(classifiersData);
e.printStackTrace();
}
}