deepcell_types.PredictionResult#

class deepcell_types.PredictionResult(cell_types: List[str], probabilities: ndarray, cell_indices: ndarray, abstained: ndarray, cell_types_raw: List[str])#

Structured predict() output when return_probabilities=True.

cell_typeslist[str]

Predicted cell-type name for each unique cell index in mask, ordered by ascending cell index. When the opt-in IQR-fence abstention is enabled (ct_abstention_k set to a float), cells it flags carry the sentinel "Unknown" here and their original argmax label is in cell_types_raw; with abstention off (the default) this equals cell_types_raw.

probabilitiesnp.ndarray, shape (n_cells, n_celltypes)

Per-cell softmax probabilities across all cell-type classes (same order as cell_types). Column i corresponds to cell type i in dct_config.ct2idx.

cell_indicesnp.ndarray, shape (n_cells,)

The unique mask indices, in the same order as cell_types.

abstainednp.ndarray, shape (n_cells,), dtype=bool

True for cells whose max-softmax fell below the IQR fence (= the ones rewritten to "Unknown" in cell_types). All-False when ct_abstention_k is disabled or when the FOV has fewer than 4 cells (IQR is undefined on a tiny sample).

cell_types_rawlist[str]

Pre-abstention argmax label for every cell — useful when callers want to inspect what abstained cells would have been classified as.

__init__(cell_types: List[str], probabilities: ndarray, cell_indices: ndarray, abstained: ndarray, cell_types_raw: List[str]) None#

Methods

__init__(cell_types, probabilities, ...)

Attributes

cell_types

probabilities

cell_indices

abstained

cell_types_raw