Skip to main content

PredictionPanel

PredictionPanel

#include <PredictionPanel.hpp>

Inherits from QWidget

Public Slots

Name
void refreshRegionList()
Refresh the list of available DigitalIntervalSeries keys.

Public Signals

Name
void predictRequested()
Emitted when the user clicks the Predict button.
void regionChanged(QString const & key)
Emitted when the selected prediction region changes.
void thresholdChanged(double value)
Emitted when the decision threshold changes.
void outputConfigChanged()
Emitted when any output configuration changes.
void validityChanged(bool valid)
Emitted when the overall validity of the configuration changes.

Public Functions

Name
PredictionPanel(std::shared_ptr< MLCoreWidgetState > state, std::shared_ptr< DataManager > data_manager, QWidget * parent =[nullptr])
Construct the prediction panel.
~PredictionPanel() override
bool hasValidConfiguration() const
Whether a valid prediction configuration is ready.
std::string selectedRegionKey() const
Get the currently selected prediction region key.
bool isAllFramesChecked() const
Whether the “All remaining frames” checkbox is checked.
double threshold() const
Get the current decision threshold.
std::string outputPrefix() const
Get the output prefix string.
bool outputPredictions() const
Whether prediction output (DigitalIntervalSeries) is enabled.
bool outputProbabilities() const
Whether probability output (AnalogTimeSeries) is enabled.
bool constrainedDecoding() const
Whether constrained decoding is enabled.
void setSequenceModelActive(bool active)
Show or hide the constrained decoding checkbox.

Public Slots Documentation

slot refreshRegionList

void refreshRegionList()

Refresh the list of available DigitalIntervalSeries keys.

Called automatically on DataManager changes and on the refresh button. Preserves the current selection if still available.

Public Signals Documentation

signal predictRequested

void predictRequested()

Emitted when the user clicks the Predict button.

The parent widget should connect this to trigger prediction via the trained model on the configured region.

signal regionChanged

void regionChanged(
    QString const & key
)

Emitted when the selected prediction region changes.

Parameters:

  • key The new region key (empty if “All remaining frames”)

signal thresholdChanged

void thresholdChanged(
    double value
)

Emitted when the decision threshold changes.

Parameters:

  • value The new threshold value (0.01–0.99)

signal outputConfigChanged

void outputConfigChanged()

Emitted when any output configuration changes.

signal validityChanged

void validityChanged(
    bool valid
)

Emitted when the overall validity of the configuration changes.

Parameters:

  • valid Whether the current configuration is valid for prediction

Public Functions Documentation

function PredictionPanel

explicit PredictionPanel(
    std::shared_ptr< MLCoreWidgetState > state,
    std::shared_ptr< DataManager > data_manager,
    QWidget * parent =nullptr
)

Construct the prediction panel.

Parameters:

function ~PredictionPanel

~PredictionPanel() override

function hasValidConfiguration

bool hasValidConfiguration() const

Whether a valid prediction configuration is ready.

Returns true when a prediction region is configured (or “All remaining frames” is checked) and at least one output type is selected.

function selectedRegionKey

std::string selectedRegionKey() const

Get the currently selected prediction region key.

Return: The DataManager key of the selected DigitalIntervalSeries, or empty string if “All remaining frames” is checked

function isAllFramesChecked

bool isAllFramesChecked() const

Whether the “All remaining frames” checkbox is checked.

function threshold

double threshold() const

Get the current decision threshold.

function outputPrefix

std::string outputPrefix() const

Get the output prefix string.

function outputPredictions

bool outputPredictions() const

Whether prediction output (DigitalIntervalSeries) is enabled.

function outputProbabilities

bool outputProbabilities() const

Whether probability output (AnalogTimeSeries) is enabled.

function constrainedDecoding

bool constrainedDecoding() const

Whether constrained decoding is enabled.

function setSequenceModelActive

void setSequenceModelActive(
    bool active
)

Show or hide the constrained decoding checkbox.

Parameters:

  • active true to show the checkbox, false to hide it

Called when the selected model changes. The checkbox is only relevant for sequence models (e.g., HMM).


Updated on 2026-11-13 at 20:25:40 +0000