21 #include "ui_kmeansdialog.h" 39 ui->clustersSpinBox->setRange(0, analyzer_->columns());
50 void KMeansDialog::on_buttonBox_accepted()
52 QString name = ui->nameLineEdit->text();
53 QString metric_text = ui->metricComboBox->currentText();
54 metric_text = metric_text.toLower().remove(
" ");
55 QString partition_policy = ui->partitionComboBox->currentText();
56 partition_policy = partition_policy.toLower().remove(
" ");
57 bool allow_empty = ui->emptyCheckBox->isChecked();
58 size_t clusters = ui->clustersSpinBox->value();
60 analyzer_->KMeans(name, metric_text, partition_policy, allow_empty, clusters);
62 workspace_->main_window()->DisplayExceptionWarning(e);
71 void KMeansDialog::on_buttonBox_rejected()
77 void KMeansDialog::on_predictionCheckBox_clicked(
bool checked)
79 ui->clustersSpinBox->setEnabled(!checked);
The KMeansDialog class Allows the user to create a k-means clustering map.
KMeansDialog(QWidget *parent, QSharedPointer< VespucciWorkspace > ws, QSharedPointer< AbstractDataAnalyzer > analyzer)
KMeansDialog::KMeansDialog.