Class BinaryOutcomeImageLabeller

Object
org.anchoranalysis.bean.AnchorBean<ImageLabeller<T>>
org.anchoranalysis.plugin.image.task.bean.labeller.ImageLabeller<org.anchoranalysis.experiment.task.NoSharedState>
org.anchoranalysis.plugin.image.task.bean.labeller.BinaryOutcomeImageLabeller
Direct Known Subclasses:
BinaryClassifierImageLabeller, DescriptiveNameContainsImageLabeller

public abstract class BinaryOutcomeImageLabeller
extends ImageLabeller<org.anchoranalysis.experiment.task.NoSharedState>
Abstract base class for image labellers that produce binary outcomes (positive or negative).
Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    BinaryOutcomeImageLabeller()  
  • Method Summary

    Modifier and Type Method Description
    Set<String> allLabels​(org.anchoranalysis.experiment.task.NoSharedState sharedState)
    Returns a set of identifiers for all groups that can be outputted by the labeller.
    protected static String classificationString​(boolean positive)
    Converts a boolean classification result to its string representation.
    org.anchoranalysis.experiment.task.NoSharedState initialize​(Path pathForBinding)
    Initializes the labeller.

    Methods inherited from class org.anchoranalysis.plugin.image.task.bean.labeller.ImageLabeller

    labelFor

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • initialize

      public org.anchoranalysis.experiment.task.NoSharedState initialize​(Path pathForBinding) throws org.anchoranalysis.core.exception.InitializeException
      Description copied from class: ImageLabeller
      Initializes the labeller. Should be called once before calling any other methods.
      Specified by:
      initialize in class ImageLabeller<org.anchoranalysis.experiment.task.NoSharedState>
      Parameters:
      pathForBinding - a Path that can be used by the labeller to make file path decisions
      Returns:
      the initialized shared-state of type T
      Throws:
      org.anchoranalysis.core.exception.InitializeException - if initialization fails
    • allLabels

      public Set<String> allLabels​(org.anchoranalysis.experiment.task.NoSharedState sharedState)
      Description copied from class: ImageLabeller
      Returns a set of identifiers for all groups that can be outputted by the labeller.

      This method should be callable at any time.

      Specified by:
      allLabels in class ImageLabeller<org.anchoranalysis.experiment.task.NoSharedState>
      Parameters:
      sharedState - the initialized shared-state returned by ImageLabeller.initialize(Path)
      Returns:
      a Set of String labels
    • classificationString

      protected static String classificationString​(boolean positive)
      Converts a boolean classification result to its string representation.
      Parameters:
      positive - true if the classification is positive, false if negative
      Returns:
      POSITIVE if true, NEGATIVE if false