public class VariationOfInformation extends Metrics
originalLabels, proposedLabels, verbose
Constructor and Description |
---|
VariationOfInformation(ij.ImagePlus originalLabels,
ij.ImagePlus proposedLabels)
Initialize variation of information metric
|
Modifier and Type | Method and Description |
---|---|
double |
foregroundRestrictedFscore(ij.process.ShortProcessor cluster1,
ij.process.ShortProcessor cluster2)
Calculate the F-score of the variation of information between two clusters
using the foreground restriction, i.e.
|
double |
foregroundRestrictedFScoreN2(ij.process.ImageProcessor label,
ij.process.ImageProcessor proposal,
double binaryThreshold)
Calculate F-score of foreground-restricted variation of
information with N^2 normalization
|
double |
foregroundRestrictedScoreAfterThinningN2(ij.process.ImageProcessor label,
ij.process.ImageProcessor proposal,
double binaryThreshold)
Calculate foreground-restricted information theoretic score with N^2
normalization after border thinning
|
InformationStatistics |
foregroundRestrictedStats(ij.process.ImageProcessor gt,
ij.process.ImageProcessor proposal,
double binaryThreshold)
Get the foreground-restricted variation of information
statistics (entropy values, F-score, etc)
|
InformationStatistics |
foregroundRestrictedStats(ij.process.ShortProcessor cluster1,
ij.process.ShortProcessor cluster2)
Calculate the variation of information statistics (entropy values, F-score,
etc) between two clusters using the foreground restriction, i.e.
|
double |
foregroundRestrictedVI(ij.process.ShortProcessor cluster1,
ij.process.ShortProcessor cluster2)
Calculate the variation of information between two clusters using
the foreground restriction, i.e.
|
double |
foregroundRestrictedVIN2(ij.process.ImageProcessor label,
ij.process.ImageProcessor proposal,
double binaryThreshold)
Calculate foreground-restricted variation of information
with N^2 normalization
|
double |
fscore(ij.process.ShortProcessor cluster1,
ij.process.ShortProcessor cluster2)
Calculate the F-score of the variation of information between two clusters
A and B ( harmonic mean of C(A|B) and C(B|A) )
|
double |
fScoreN2(ij.process.ImageProcessor label,
ij.process.ImageProcessor proposal,
double binaryThreshold)
Calculate F-score of variation of information with N^2 normalization
|
double |
getForegroundRestrictedFscore(double th)
Get F-score of the foreground-restricted variation of information for a
given threshold of the proposal labels.
|
Callable<Double> |
getforegroundRestrictedFscoreConcurrent(ij.process.ImageProcessor image1,
ij.process.ImageProcessor image2,
double binaryThreshold)
Get F-score of the foreground-restricted variation of information
in a concurrent way.
|
ArrayList<Double> |
getForegroundRestrictedFscores(double minThreshold,
double maxThreshold,
double stepThreshold)
Get foreground-restricted F-score of the variation of
information over a set of thresholds
|
double[] |
getForegroundRestrictedGroundTruthDisagreements(ij.process.ShortProcessor cluster1,
ij.process.ShortProcessor cluster2)
Get foreground-restricted disagreements between prediction and
ground truth labels with N^2 normalization (mergers).
|
double |
getForegroundRestrictedMaximalFScore(double minThreshold,
double maxThreshold,
double stepThreshold)
Get the best F-score of the foreground-restricted variation of information
over a set of thresholds
|
double |
getForegroundRestrictedMetricValue(double binaryThreshold)
Get foreground-restricted variation of information between original
and proposed labels for a given threshold
|
double[] |
getForegroundRestrictedPredictionDisagreements(ij.process.ShortProcessor cluster1,
ij.process.ShortProcessor cluster2)
Get foreground-restricted disagreements between ground truth and
prediction labels with N^2 normalization (splits).
|
double |
getForegroundRestrictedScoreAfterThinning(double th)
Get foreground-restricted information theoretic score after border
thinning for a given threshold of the proposal labels.
|
Callable<Double> |
getforegroundRestrictedScoreAfterThinningConcurrent(ij.process.ImageProcessor image1,
ij.process.ImageProcessor image2,
double binaryThreshold)
Get foreground-restricted information theoretic score after border
thinning in a concurrent way.
|
ArrayList<Double> |
getForegroundRestrictedScoresAfterThinning(double minThreshold,
double maxThreshold,
double stepThreshold)
Get foreground-restricted information theoretic score after thinning
over a set of thresholds
|
InformationStatistics[] |
getForegroundRestrictedStatsPerSlice(double binaryThreshold)
Get the foreground-restricted variation of information
statistics (entropy values, F-score, etc) per slice and
for a given threshold value.
|
Callable<Double> |
getForegroundRestrictedVIConcurrent(ij.process.ImageProcessor image1,
ij.process.ImageProcessor image2,
double binaryThreshold)
Calculate foreground-restricted variation of information
between two images in a concurrent way (to be submitted
to an Executor Service).
|
double |
getFscore(double th)
Get F-score of the variation of information for a
given threshold of the proposal labels.
|
Callable<Double> |
getFscoreConcurrent(ij.process.ImageProcessor image1,
ij.process.ImageProcessor image2,
double binaryThreshold)
Get F-score of the variation of information in a concurrent way.
|
ArrayList<Double> |
getFscores(double minThreshold,
double maxThreshold,
double stepThreshold)
Get F-score of the variation of
information over a set of thresholds
|
double |
getMaximalFScore(double minThreshold,
double maxThreshold,
double stepThreshold)
Get the best F-score of the variation of information
over a set of thresholds
|
double |
getMaximalVInfoAfterThinning(double minThreshold,
double maxThreshold,
double stepThreshold)
Get the best V_Info after thinning over a set of thresholds.
|
double |
getMetricValue(double binaryThreshold)
Get variation of information between original
and proposed labels for a given threshold
|
double |
getMinimumForegroundRestrictedMetricValue(double minThreshold,
double maxThreshold,
double stepThreshold)
Get the minimum foreground-restricted metric value over a set of thresholds
|
double |
getVI(ij.process.ShortProcessor cluster1,
ij.process.ShortProcessor cluster2)
Calculate the variation of information between two clusters
(N^2 normalization)
|
Callable<Double> |
getVIConcurrent(ij.process.ImageProcessor image1,
ij.process.ImageProcessor image2,
double binaryThreshold)
Calculate variation of information between two images in
a concurrent way (to be submitted to an Executor Service).
|
double |
variationOfInformationN2(ij.process.ImageProcessor label,
ij.process.ImageProcessor proposal,
double binaryThreshold)
Calculate variation of information with N^2 normalization
|
getMinimumMetricValue, setVerboseMode
public VariationOfInformation(ij.ImagePlus originalLabels, ij.ImagePlus proposedLabels)
originalLabels
- original labels (single 2D image or stack)proposedLabels
- proposed new labels (single 2D image or stack of the same as as the original labels)public double getMetricValue(double binaryThreshold)
getMetricValue
in class Metrics
binaryThreshold
- threshold value to binarize labelspublic double getForegroundRestrictedMetricValue(double binaryThreshold)
binaryThreshold
- threshold value to binarize labelspublic double getMinimumForegroundRestrictedMetricValue(double minThreshold, double maxThreshold, double stepThreshold)
minThreshold
- minimum threshold value to binarize the input imagesmaxThreshold
- maximum threshold value to binarize the input imagesstepThreshold
- threshold step value to use during binarizationpublic Callable<Double> getVIConcurrent(ij.process.ImageProcessor image1, ij.process.ImageProcessor image2, double binaryThreshold)
image1
- first imageimage2
- second imagebinaryThreshold
- threshold to apply to both imagespublic Callable<Double> getForegroundRestrictedVIConcurrent(ij.process.ImageProcessor image1, ij.process.ImageProcessor image2, double binaryThreshold)
image1
- first imageimage2
- second imagebinaryThreshold
- threshold to apply to both imagespublic double variationOfInformationN2(ij.process.ImageProcessor label, ij.process.ImageProcessor proposal, double binaryThreshold)
label
- original labelsproposal
- proposed labels (usually a probability image to be thresholded)binaryThreshold
- threshold value to binarize proposalpublic double foregroundRestrictedVIN2(ij.process.ImageProcessor label, ij.process.ImageProcessor proposal, double binaryThreshold)
label
- original labelsproposal
- proposed labels (usually a probability image to be thresholded)binaryThreshold
- threshold value to binarize proposalpublic double getVI(ij.process.ShortProcessor cluster1, ij.process.ShortProcessor cluster2)
cluster1
- labels of cluster 1 (ground truth)cluster2
- labels of cluster 2 (proposal)public double foregroundRestrictedVI(ij.process.ShortProcessor cluster1, ij.process.ShortProcessor cluster2)
cluster1
- labels of cluster 1 (ground truth)cluster2
- labels of cluster 2 (proposal)public double[] getForegroundRestrictedGroundTruthDisagreements(ij.process.ShortProcessor cluster1, ij.process.ShortProcessor cluster2)
cluster1
- ground truth clustercluster2
- proposed clusterpublic double[] getForegroundRestrictedPredictionDisagreements(ij.process.ShortProcessor cluster1, ij.process.ShortProcessor cluster2)
cluster1
- ground truth clustercluster2
- proposed clusterpublic double getForegroundRestrictedMaximalFScore(double minThreshold, double maxThreshold, double stepThreshold)
minThreshold
- minimum threshold value to binarize the input imagesmaxThreshold
- maximum threshold value to binarize the input imagesstepThreshold
- threshold step value to use during binarizationpublic double getMaximalVInfoAfterThinning(double minThreshold, double maxThreshold, double stepThreshold)
minThreshold
- minimum threshold value to binarize the input imagesmaxThreshold
- maximum threshold value to binarize the input imagesstepThreshold
- threshold step value to use during binarizationpublic double getMaximalFScore(double minThreshold, double maxThreshold, double stepThreshold)
minThreshold
- minimum threshold value to binarize the input imagesmaxThreshold
- maximum threshold value to binarize the input imagesstepThreshold
- threshold step value to use during binarizationpublic ArrayList<Double> getForegroundRestrictedFscores(double minThreshold, double maxThreshold, double stepThreshold)
minThreshold
- minimum threshold value to check (included)maxThreshold
- maximum threshold value to check (included)stepThreshold
- step threshold valuepublic ArrayList<Double> getForegroundRestrictedScoresAfterThinning(double minThreshold, double maxThreshold, double stepThreshold)
minThreshold
- minimum threshold value to check (included)maxThreshold
- maximum threshold value to check (included)stepThreshold
- step threshold valuepublic ArrayList<Double> getFscores(double minThreshold, double maxThreshold, double stepThreshold)
minThreshold
- minimum threshold value to check (included)maxThreshold
- maximum threshold value to check (included)stepThreshold
- step threshold valuepublic double getForegroundRestrictedFscore(double th)
th
- threshold value to binarize proposalpublic double getForegroundRestrictedScoreAfterThinning(double th)
th
- threshold value to binarize proposalpublic InformationStatistics[] getForegroundRestrictedStatsPerSlice(double binaryThreshold)
binaryThreshold
- threshold value to binarize proposal ([0 1])public InformationStatistics foregroundRestrictedStats(ij.process.ImageProcessor gt, ij.process.ImageProcessor proposal, double binaryThreshold)
gt
- 2D image with the original labelsproposal
- 2D image with the proposed labelsbinaryThreshold
- threshold value to binarize the input imagespublic double getFscore(double th)
th
- threshold value to binarize proposalpublic Callable<Double> getFscoreConcurrent(ij.process.ImageProcessor image1, ij.process.ImageProcessor image2, double binaryThreshold)
image1
- ground truth (usually binary labels)image2
- proposed labels (usually a probability map to binarize)binaryThreshold
- threshold value to binarize proposalpublic Callable<Double> getforegroundRestrictedFscoreConcurrent(ij.process.ImageProcessor image1, ij.process.ImageProcessor image2, double binaryThreshold)
image1
- ground truth (usually binary labels)image2
- proposed labels (usually a probability map to binarize)binaryThreshold
- threshold value to binarize proposalpublic Callable<Double> getforegroundRestrictedScoreAfterThinningConcurrent(ij.process.ImageProcessor image1, ij.process.ImageProcessor image2, double binaryThreshold)
image1
- ground truth (usually binary labels)image2
- proposed labels (usually a probability map to binarize)binaryThreshold
- threshold value to binarize proposalpublic double fScoreN2(ij.process.ImageProcessor label, ij.process.ImageProcessor proposal, double binaryThreshold)
label
- original labelsproposal
- proposed labels (usually a probability image to be thresholded)binaryThreshold
- threshold value to binarize proposalpublic double foregroundRestrictedFScoreN2(ij.process.ImageProcessor label, ij.process.ImageProcessor proposal, double binaryThreshold)
label
- original labelsproposal
- proposed labels (usually a probability image to be thresholded)binaryThreshold
- threshold value to binarize proposalpublic double foregroundRestrictedScoreAfterThinningN2(ij.process.ImageProcessor label, ij.process.ImageProcessor proposal, double binaryThreshold)
label
- original labelsproposal
- proposed labels (usually a probability image to be thresholded)binaryThreshold
- threshold value to binarize proposalpublic double foregroundRestrictedFscore(ij.process.ShortProcessor cluster1, ij.process.ShortProcessor cluster2)
cluster1
- labels of cluster 1 (ground truth)cluster2
- labels of cluster 2 (proposal)public InformationStatistics foregroundRestrictedStats(ij.process.ShortProcessor cluster1, ij.process.ShortProcessor cluster2)
cluster1
- labels of cluster 1 (ground truth)cluster2
- labels of cluster 2 (proposal)public double fscore(ij.process.ShortProcessor cluster1, ij.process.ShortProcessor cluster2)
cluster1
- labels of cluster 1 (ground truth)cluster2
- labels of cluster 2 (proposal)Copyright © 2015–2021 Fiji. All rights reserved.