@@ -56,7 +59,7 @@ public class PamAudioFileManager {
* @param soundFile - the sound file
* @return the audio file loader.
*/
- public PamAudioFileLoader getAudioLoader(File soundFile) {
+ public PamAudioFileLoader getAudioFileLoader(File soundFile) {
for (int i = 0; i < pamAudioFileTypes.size(); i++) {
if (isExtension(soundFile, pamAudioFileTypes.get(i))) {
return pamAudioFileTypes.get(i);
@@ -169,6 +172,23 @@ public class PamAudioFileManager {
public ArrayList
+ * The data selector can have different types of data selectors which can
+ * depend on the classifier used and user choice.
+ *
+ * Note that this is slightly different from DLPredicitoDecision
+ * as it deals with data units that may have a more than one prediction.
+ * i.e.
+ */
+public class DLDataSelector extends AnnotationDataSelector
+
+
+
+
+ * Note that the majority of the time this will be a simple test of the value of
+ * predictions of a model but there will be cases when a classifier implements a
+ * more complex system. For example, a implementation could save a buffer of predictions
+ * so that previous predictions inform the latest prediction. Or results may include
+ * some sort of object detection components and frequency bounds etc could be used for
+ * classification.
+ *
+ *
+ */
+public interface DLPredictionDecision {
+
+ /**
+ * Check whether a single prediction passes a binary classifier. Prediction which pass decision will be
+ * passed on to create new data units.
+ * @param result - the prediciton result to test.
+ * @return true if the result is passed.
+ */
+ public boolean isBinaryResult(PredictionResult result);
+
+}
diff --git a/src/rawDeepLearningClassifier/dlClassification/SimpleDLDecision.java b/src/rawDeepLearningClassifier/dlClassification/SimpleDLDecision.java
new file mode 100644
index 00000000..248faf4f
--- /dev/null
+++ b/src/rawDeepLearningClassifier/dlClassification/SimpleDLDecision.java
@@ -0,0 +1,49 @@
+package rawDeepLearningClassifier.dlClassification;
+
+import rawDeepLearningClassifier.dlClassification.animalSpot.StandardModelParams;
+
+/**
+ * Make a decision based on a simple binary threshold for a prediction.
+ */
+public class SimpleDLDecision implements DLPredictionDecision {
+
+ /**
+ * Reference to the parameters.
+ */
+ private StandardModelParams params;
+
+
+ @Override
+ public boolean isBinaryResult(PredictionResult modelResult) {
+ return isBinaryResult(modelResult, getParams()) ;
+ }
+
+
+ /**
+ * Check whether a model passes a binary test...
+ * @param modelResult - the model results
+ * @return the model results.
+ */
+ private static boolean isBinaryResult(PredictionResult modelResult, StandardModelParams genericModelParams) {
+ for (int i=0; i