ClusteringPanel
ClusteringPanel
#include <ClusteringPanel.hpp>
Inherits from QWidget
Public Slots
| Name | |
|---|---|
| void | refreshTensorList() Refresh the list of available TensorData keys from DataManager. |
Public Signals
| Name | |
|---|---|
| void | fitRequested() Emitted when the user clicks “Fit & Assign”. |
| void | algorithmChanged(QString const & name) Emitted when the selected algorithm changes. |
| void | tensorSelectionChanged(QString const & key) Emitted when the selected tensor changes. |
| void | parametersChanged() Emitted when any parameter value changes. |
Public Functions
| Name | |
|---|---|
| ClusteringPanel(std::shared_ptr< MLCoreWidgetState > state, std::shared_ptr< DataManager > data_manager, QWidget * parent =[nullptr]) Construct the clustering panel. |
|
| ~ClusteringPanel() override | |
| std::string | selectedTensorKey() const Get the currently selected tensor key for clustering. |
| std::string | selectedAlgorithmName() const Get the currently selected clustering algorithm name. |
| std::unique_ptr< MLCore::MLModelParametersBase > | currentParameters() const Create a parameter object matching the current UI settings. |
| std::string | outputPrefix() const Get the output prefix for clustering results. |
| bool | writeIntervals() const Whether to write cluster assignments as DigitalIntervalSeries. |
| bool | writeProbabilities() const Whether to write cluster probabilities as AnalogTimeSeries. |
| bool | zscoreNormalize() const Whether to z-score normalize features before clustering. |
| bool | hasValidConfiguration() const Whether the panel has a valid configuration for running the pipeline. |
Public Slots Documentation
slot refreshTensorList
void refreshTensorList()Refresh the list of available TensorData keys from DataManager.
Called automatically on DataManager changes and via the refresh button. Preserves the current selection if still available.
Public Signals Documentation
signal fitRequested
void fitRequested()Emitted when the user clicks “Fit & Assign”.
The parent MLCoreWidget (or future wiring) should connect this signal to trigger the ClusteringPipeline.
signal algorithmChanged
void algorithmChanged(
QString const & name
)Emitted when the selected algorithm changes.
Parameters:
- name The new algorithm name (may be empty)
signal tensorSelectionChanged
void tensorSelectionChanged(
QString const & key
)Emitted when the selected tensor changes.
Parameters:
- key The new tensor key (may be empty)
signal parametersChanged
void parametersChanged()Emitted when any parameter value changes.
Public Functions Documentation
function ClusteringPanel
explicit ClusteringPanel(
std::shared_ptr< MLCoreWidgetState > state,
std::shared_ptr< DataManager > data_manager,
QWidget * parent =nullptr
)Construct the clustering panel.
Parameters:
- state Shared MLCoreWidgetState for reading/writing clustering settings
- data_manager Shared DataManager for listing TensorData keys
- parent Optional parent widget
function ~ClusteringPanel
~ClusteringPanel() overridefunction selectedTensorKey
std::string selectedTensorKey() constGet the currently selected tensor key for clustering.
Return: The DataManager key of the selected TensorData, or empty string
function selectedAlgorithmName
std::string selectedAlgorithmName() constGet the currently selected clustering algorithm name.
Return: The MLModelRegistry name (e.g. “K-Means”), or empty if none
function currentParameters
std::unique_ptr< MLCore::MLModelParametersBase > currentParameters() constCreate a parameter object matching the current UI settings.
Return: Owning pointer to the parameter object, or nullptr if no model selected
Returns a concrete MLModelParametersBase subclass populated from the current parameter form values.
function outputPrefix
std::string outputPrefix() constGet the output prefix for clustering results.
Return: The prefix string (e.g. “Cluster:”)
function writeIntervals
bool writeIntervals() constWhether to write cluster assignments as DigitalIntervalSeries.
function writeProbabilities
bool writeProbabilities() constWhether to write cluster probabilities as AnalogTimeSeries.
function zscoreNormalize
bool zscoreNormalize() constWhether to z-score normalize features before clustering.
function hasValidConfiguration
bool hasValidConfiguration() constWhether the panel has a valid configuration for running the pipeline.
Returns true if a tensor and algorithm are both selected.
Updated on 2026-11-13 at 20:25:41 +0000