spacr.qt.screens.classify¶
Model-evaluation and interpretation views integrated with Classify.
The Classify masthead provides direct access to three related modules:
Classifier Evaluation reports held-out predictions, nested cross-validation, calibration, leakage checks and per-plate metrics from a saved evaluation bundle.
Explain CV Model reports feature gain, held-out permutation importance and SHAP values for classifiers trained on measured features.
Activation maps image regions associated with predictions from an image classifier.
Each module opens as a complete page beside the Classify settings. The shared
page and signal integration is implemented by
spacr.qt.screens.map_barcodes.
Classes¶
A collapsed Classify footer that pays for FlowView only when opened. |
Functions¶
|
Mount Classify's lazy FlowView box directly below its settings. |
|
Put Classify's FlowView footer and fold strip on |
Module Contents¶
- class spacr.qt.screens.classify.LazyFlowViewSection(screen: PySide6.QtWidgets.QWidget, parent: PySide6.QtWidgets.QWidget | None = None)[source]¶
Bases:
spacr.qt.widgets.collapsible_section.CollapsibleSectionA collapsed Classify footer that pays for FlowView only when opened.
The empty
contentpassed toCollapsibleSectionis deliberate: importing the graphics renderer constructs a sizeable Qt/scientific dependency tree. Classify gets only this small header on first paint; the panel, its scene and the approved preview graph arrive on the first expansion.- Parameters:
screen – the Classify screen this footer belongs to. Read on the first EXPANSION rather than here, which is the whole point of the class: nothing about FlowView is imported until someone opens it.
parent – parent widget.
Build the FlowView section’s body without building FlowView itself.
The screen is held weakly: this section outlives nothing, but a strong reference from a lazily-built child back to its screen is how a closed module stays alive.
- Parameters:
screen – the screen the section belongs to.
parent – parent widget for the body, or
None.
- hideEvent(event) None[source]¶
A cached Classify page must spend no cycles while hidden.
- Parameters:
event – the hide event; it is passed on to the base class unchanged.
- spacr.qt.screens.classify.install_flowview(screen: PySide6.QtWidgets.QWidget) LazyFlowViewSection | None[source]¶
Mount Classify’s lazy FlowView box directly below its settings.
- Parameters:
screen – the host screen; nothing is mounted unless its
app_keyis'classify_merged'and it has a_settings_contentwidget with a layout.
- spacr.qt.screens.classify.install_folds(screen: PySide6.QtWidgets.QWidget) spacr.qt.widgets.fold_strip.FoldStrip | None[source]¶
Put Classify’s FlowView footer and fold strip on
screen.- Parameters:
screen – the Classify screen that receives the FlowView section and the fold strip.