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 StringclassificationString(boolean positive)Converts a boolean classification result to its string representation.org.anchoranalysis.experiment.task.NoSharedStateinitialize(Path pathForBinding)Initializes the labeller.Methods inherited from class org.anchoranalysis.plugin.image.task.bean.labeller.ImageLabeller
labelFor
-
Constructor Details
-
BinaryOutcomeImageLabeller
public BinaryOutcomeImageLabeller()
-
-
Method Details
-
initialize
public org.anchoranalysis.experiment.task.NoSharedState initialize(Path pathForBinding) throws org.anchoranalysis.core.exception.InitializeExceptionDescription copied from class:ImageLabellerInitializes the labeller. Should be called once before calling any other methods.- Specified by:
initializein classImageLabeller<org.anchoranalysis.experiment.task.NoSharedState>- Parameters:
pathForBinding- aPaththat 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
Description copied from class:ImageLabellerReturns a set of identifiers for all groups that can be outputted by the labeller.This method should be callable at any time.
- Specified by:
allLabelsin classImageLabeller<org.anchoranalysis.experiment.task.NoSharedState>- Parameters:
sharedState- the initialized shared-state returned byImageLabeller.initialize(Path)- Returns:
- a
SetofStringlabels
-
classificationString
Converts a boolean classification result to its string representation.- Parameters:
positive- true if the classification is positive, false if negative- Returns:
POSITIVEif true,NEGATIVEif false
-