organoid_tracker.comparison.report module

class organoid_tracker.comparison.report.Category(name: str)

Bases: object

property name
class organoid_tracker.comparison.report.ComparisonReport(**parameters: Union[float, int, str, bool, List[float], List[int], List[str], List[bool]])

Bases: object

add_data(category: Category, position: Position, *details: Union[str, Position])

Adds a data point. The

calculate_time_statistics(true_positives_cat: Category, false_positives_cat: Category, false_negatives_cat: Category) Statistics

Calculate statistics using the given categories as false/true positives/negatives.

calculate_z_statistics(true_positives_cat: Category, false_positives_cat: Category, false_negatives_cat: Category) Statistics

Calculate statistics using the given categories as false/true positives/negatives.

count_positions(category: Category, *, time_point: Optional[TimePoint] = None, z: Optional[int] = None) int

Gets how many entries there are in the given category, optionally at the given time point. Returns 0 if the given category is not used.

delete_data(category: Category, position: Position)

Deletes all data of the given position.

first_time_point_number() Optional[int]

Gets the first time point number at which data exits for at least one category. Returns None if therea is no data at all in this object.

get_categories() Iterable[Category]

Gets all categories that are used in this report.

get_category_by_name(name: str) Optional[Category]

Gets the category with the given name.

get_entries(category: Category) Iterable[Tuple[Position, Details]]

Gets all entries for the given category.

get_positions(category: Category, *, time_point: Optional[TimePoint]) Iterable[Position]

Gets all positions in the given category, optionally filtered to the given time point.

last_time_point_number() Optional[int]

Gets the first time point number at which data exits for at least one category. Returns None if therea is no data at all in this object.

recorded_parameters() Iterable[Tuple[str, Union[float, int, str, bool, List[float], List[int], List[str], List[bool]]]]

Gets all parameters set for this comparison. Useful for reproducing this comparison.

summary: str = ''
time_points() Iterable[TimePoint]

Returns all time points from the first to the last, inclusive. Time points in between might not have data attached to them.

title: str = 'Comparison'
class organoid_tracker.comparison.report.Details(*detail: Union[str, Position])

Bases: object

Represents the details of a certain entry in the report.

property details: Tuple[Union[str, Position]]

The details, cannot be modified.

class organoid_tracker.comparison.report.Statistics(first_x_axis_number: int, x_label: str, true_positives: ndarray, false_positives: ndarray, false_negatives: ndarray)

Bases: object

Used to plot the true positives, false positives, false negatives, recall, precisiion and F1

debug_plot()

Shows a Matplotlib plot. Must only be called from the command line.

f1_score: ndarray
f1_score_overall: float
false_negatives: ndarray
false_positives: ndarray
precision: ndarray
precision_overall: float
recall: ndarray
recall_overall: float
true_positives: ndarray
x_axis_numbers: ndarray
x_label: str