OutputSystemTemplate#

class myogestic.gui.widgets.templates.OutputSystemTemplate(main_window=None, prediction_is_classification=None)[source]#

Represents a base class handling initialization of main window and prediction type for classification or regression tasks. Determines the appropriate method for processing predictions based on the given prediction type.

Parameters:
  • main_window (Any) – The main application window instance. Cannot be None.

  • prediction_is_classification (bool) – Indicates whether the prediction task is classification or regression. Cannot be None.

_main_window#

A reference to the main application window instance.

Type:

Any

_prediction_is_classification#

Specifies whether the prediction task is classification.

Type:

bool

process_prediction#

Function pointer to the appropriate method for processing predictions, defined based on _prediction_is_classification.

Type:

Callable

Methods

__init__([main_window, ...])

_process_prediction__classification(prediction)

An abstract method that processes classification predictions.

_process_prediction__regression(prediction)

Process regression prediction abstract method.

close_event(event)

Close event handler for the widget or window.

send_prediction(prediction)

An abstract method meant to be implemented by subclasses for the purpose of sending prediction values to a specific destination.

abstract close_event(event)[source]#

Close event handler for the widget or window.

This method is meant to be implemented in custom subclasses to handle the close event, which occurs when the widget or window is about to be closed. It serves as a central point to define tasks or behavior that should be executed during the closing process, such as cleanup operations, saving data, or confirming user actions.

Parameters:

event (QCloseEvent) – The close event object that contains information about the close action and provides options for accepting or ignoring the event.

abstract send_prediction(prediction)[source]#

An abstract method meant to be implemented by subclasses for the purpose of sending prediction values to a specific destination. The method is designed to handle any type of prediction and does not return a value.

Parameters:

prediction (Any) – The prediction value or object to be sent. The type of this parameter can vary depending on the specific implementation, allowing flexibility for various use cases.

Return type:

None