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 whenreturn_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_kset to a float), cells it flags carry the sentinel"Unknown"here and their original argmax label is incell_types_raw; with abstention off (the default) this equalscell_types_raw.- probabilitiesnp.ndarray, shape (n_cells, n_celltypes)
Per-cell softmax probabilities across all cell-type classes (same order as
cell_types). Columnicorresponds to cell typeiindct_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
Truefor cells whose max-softmax fell below the IQR fence (= the ones rewritten to"Unknown"incell_types). All-Falsewhenct_abstention_kis 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_typesprobabilitiescell_indicesabstainedcell_types_raw