mirror of
https://github.com/dgirardeau/q3DMASC.git
synced 2026-08-29 08:34:48 +08:00
display scales
This commit is contained in:
@@ -110,13 +110,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="testLabel">
|
||||
<property name="text">
|
||||
<string>TEST on (optional)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QComboBox" name="cloud4ComboBox"/>
|
||||
</item>
|
||||
@@ -198,6 +191,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QLabel" name="testLabel">
|
||||
<property name="text">
|
||||
<string>TEST on (optional)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
+28
-6
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>550</height>
|
||||
<width>834</width>
|
||||
<height>795</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -185,15 +185,15 @@
|
||||
<property name="title">
|
||||
<string>Results</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="1,0">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="resultLabel">
|
||||
<property name="text">
|
||||
<string>correct = 0/0 - accuracy = 0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="0" rowspan="2">
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOn</enum>
|
||||
@@ -228,7 +228,29 @@
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QTableWidget" name="tableWidgetScales">
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Scales</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>190</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QToolButton" name="exportToolButton">
|
||||
<property name="text">
|
||||
<string>export</string>
|
||||
|
||||
+1
-1
@@ -444,7 +444,7 @@ void q3DMASCPlugin::doTrainAction()
|
||||
float previousTestSubsetRatio = -1.0f;
|
||||
SFCollector generatedScalarFields, generatedScalarFieldsTest;
|
||||
|
||||
//we will train + evaluate the classifier, then display the reuslts
|
||||
//we will train + evaluate the classifier, then display the results
|
||||
//then let the user change parameters and (potentially) start again
|
||||
for (int iteration = 0; ; ++iteration)
|
||||
{
|
||||
|
||||
+3
-2
@@ -700,11 +700,12 @@ bool Tools::LoadFile( const QString& filename,
|
||||
bool badFeatures = false;
|
||||
for (int lineNumber = 1; ; ++lineNumber)
|
||||
{
|
||||
if (stream.atEnd())
|
||||
break;
|
||||
QString line = stream.readLine();
|
||||
if (line.isNull())
|
||||
{
|
||||
//eof
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (line.startsWith("#"))
|
||||
|
||||
@@ -111,6 +111,7 @@ Classify3DMASCDialog::Classify3DMASCDialog(ccMainAppInterface* app, bool trainMo
|
||||
{
|
||||
label->setText(tr("Trainer file"));
|
||||
warningLabel->setVisible(false);
|
||||
warningLabel->setText("Assign each role to the right cloud, and select the cloud on which to train the classifier");
|
||||
}
|
||||
|
||||
onCloudChanged(0);
|
||||
|
||||
+13
-1
@@ -63,6 +63,18 @@ int Train3DMASCDialog::addFeature(QString name, float importance, bool isChecked
|
||||
return index;
|
||||
}
|
||||
|
||||
int Train3DMASCDialog::addScale(double scale, bool isChecked/*=true*/)
|
||||
{
|
||||
int index = tableWidget->rowCount();
|
||||
tableWidget->setRowCount(index + 1);
|
||||
|
||||
QTableWidgetItem* nameItem = new QTableWidgetItem(QString::number(scale));
|
||||
nameItem->setCheckState(isChecked ? Qt::Checked : Qt::Unchecked);
|
||||
tableWidget->setItem(index, 0, nameItem);
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
void Train3DMASCDialog::setResultText(QString text)
|
||||
{
|
||||
resultLabel->setText(text);
|
||||
@@ -153,4 +165,4 @@ void Train3DMASCDialog::onExportResults()
|
||||
QString importance = tableWidget->item(index, FeatureImportanceColumn)->text();
|
||||
stream << featureName << ";" << importance << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
/** \return the row index
|
||||
**/
|
||||
int addFeature(QString name, float importance, bool isChecked = true);
|
||||
|
||||
int addScale(double scale, bool isChecked = true);
|
||||
void setResultText(QString text);
|
||||
void setFirstRunDone();
|
||||
inline void setClassifierSaved() { classifierSaved = true; saveRequested = false; }
|
||||
|
||||
Reference in New Issue
Block a user