258 lines
17 KiB
Python
258 lines
17 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
# Form implementation generated from reading ui file '/Users/lennlouis/lenn_ws/python_ws/pyqt_data_analysis/MainWindow.ui'
|
|
#
|
|
# Created by: PyQt5 UI code generator 5.15.9
|
|
#
|
|
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
|
# run again. Do not edit this file unless you know what you are doing.
|
|
|
|
|
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
|
|
|
|
|
class Ui_MainWindow(object):
|
|
def setupUi(self, MainWindow):
|
|
MainWindow.setObjectName("MainWindow")
|
|
MainWindow.resize(800, 600)
|
|
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
|
self.centralwidget.setObjectName("centralwidget")
|
|
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralwidget)
|
|
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
|
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
|
self.horizontalLayout.setObjectName("horizontalLayout")
|
|
self.lineEdit_filepath = QtWidgets.QLineEdit(self.centralwidget)
|
|
self.lineEdit_filepath.setObjectName("lineEdit_filepath")
|
|
self.horizontalLayout.addWidget(self.lineEdit_filepath)
|
|
self.pushButton_filepath = QtWidgets.QPushButton(self.centralwidget)
|
|
self.pushButton_filepath.setObjectName("pushButton_filepath")
|
|
self.horizontalLayout.addWidget(self.pushButton_filepath)
|
|
self.pushButton_filepath_clear = QtWidgets.QPushButton(self.centralwidget)
|
|
self.pushButton_filepath_clear.setObjectName("pushButton_filepath_clear")
|
|
self.horizontalLayout.addWidget(self.pushButton_filepath_clear)
|
|
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
|
self.widget = QtWidgets.QWidget(self.centralwidget)
|
|
self.widget.setObjectName("widget")
|
|
self.verticalLayout = QtWidgets.QVBoxLayout(self.widget)
|
|
self.verticalLayout.setObjectName("verticalLayout")
|
|
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
|
|
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
|
self.pushButton_linear_regression = QtWidgets.QPushButton(self.widget)
|
|
self.pushButton_linear_regression.setObjectName("pushButton_linear_regression")
|
|
self.horizontalLayout_2.addWidget(self.pushButton_linear_regression)
|
|
self.pushButton_Kmeans = QtWidgets.QPushButton(self.widget)
|
|
self.pushButton_Kmeans.setObjectName("pushButton_Kmeans")
|
|
self.horizontalLayout_2.addWidget(self.pushButton_Kmeans)
|
|
self.verticalLayout.addLayout(self.horizontalLayout_2)
|
|
self.stackedWidget = QtWidgets.QStackedWidget(self.widget)
|
|
self.stackedWidget.setObjectName("stackedWidget")
|
|
self.page = QtWidgets.QWidget()
|
|
self.page.setObjectName("page")
|
|
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.page)
|
|
self.verticalLayout_5.setObjectName("verticalLayout_5")
|
|
self.tableWidget_linear_regression = QtWidgets.QTableWidget(self.page)
|
|
self.tableWidget_linear_regression.setObjectName("tableWidget_linear_regression")
|
|
self.tableWidget_linear_regression.setColumnCount(0)
|
|
self.tableWidget_linear_regression.setRowCount(0)
|
|
self.verticalLayout_5.addWidget(self.tableWidget_linear_regression)
|
|
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
|
|
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
|
self.verticalLayout_4 = QtWidgets.QVBoxLayout()
|
|
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
|
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
|
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
|
self.groupBox = QtWidgets.QGroupBox(self.page)
|
|
self.groupBox.setObjectName("groupBox")
|
|
self.gridLayout = QtWidgets.QGridLayout(self.groupBox)
|
|
self.gridLayout.setObjectName("gridLayout")
|
|
self.label_linear_regression_original = QtWidgets.QLabel(self.groupBox)
|
|
self.label_linear_regression_original.setObjectName("label_linear_regression_original")
|
|
self.gridLayout.addWidget(self.label_linear_regression_original, 0, 0, 1, 1)
|
|
self.lineEdit_linear_regression_original = QtWidgets.QLineEdit(self.groupBox)
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
|
|
sizePolicy.setHorizontalStretch(0)
|
|
sizePolicy.setVerticalStretch(0)
|
|
sizePolicy.setHeightForWidth(self.lineEdit_linear_regression_original.sizePolicy().hasHeightForWidth())
|
|
self.lineEdit_linear_regression_original.setSizePolicy(sizePolicy)
|
|
self.lineEdit_linear_regression_original.setObjectName("lineEdit_linear_regression_original")
|
|
self.gridLayout.addWidget(self.lineEdit_linear_regression_original, 0, 1, 1, 1)
|
|
self.label_linear_regression_target = QtWidgets.QLabel(self.groupBox)
|
|
self.label_linear_regression_target.setObjectName("label_linear_regression_target")
|
|
self.gridLayout.addWidget(self.label_linear_regression_target, 1, 0, 1, 1)
|
|
self.lineEdit_linear_regression_target = QtWidgets.QLineEdit(self.groupBox)
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
|
|
sizePolicy.setHorizontalStretch(0)
|
|
sizePolicy.setVerticalStretch(0)
|
|
sizePolicy.setHeightForWidth(self.lineEdit_linear_regression_target.sizePolicy().hasHeightForWidth())
|
|
self.lineEdit_linear_regression_target.setSizePolicy(sizePolicy)
|
|
self.lineEdit_linear_regression_target.setObjectName("lineEdit_linear_regression_target")
|
|
self.gridLayout.addWidget(self.lineEdit_linear_regression_target, 1, 1, 1, 1)
|
|
self.horizontalLayout_3.addWidget(self.groupBox)
|
|
self.groupBox_2 = QtWidgets.QGroupBox(self.page)
|
|
self.groupBox_2.setObjectName("groupBox_2")
|
|
self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_2)
|
|
self.gridLayout_2.setObjectName("gridLayout_2")
|
|
self.label_linear_regression_iter = QtWidgets.QLabel(self.groupBox_2)
|
|
self.label_linear_regression_iter.setObjectName("label_linear_regression_iter")
|
|
self.gridLayout_2.addWidget(self.label_linear_regression_iter, 0, 0, 1, 1)
|
|
self.label_linear_regression_rate = QtWidgets.QLabel(self.groupBox_2)
|
|
self.label_linear_regression_rate.setObjectName("label_linear_regression_rate")
|
|
self.gridLayout_2.addWidget(self.label_linear_regression_rate, 1, 0, 1, 1)
|
|
self.spinBox_linear_regression_iter = QtWidgets.QSpinBox(self.groupBox_2)
|
|
self.spinBox_linear_regression_iter.setMinimum(1)
|
|
self.spinBox_linear_regression_iter.setMaximum(10000)
|
|
self.spinBox_linear_regression_iter.setProperty("value", 500)
|
|
self.spinBox_linear_regression_iter.setObjectName("spinBox_linear_regression_iter")
|
|
self.gridLayout_2.addWidget(self.spinBox_linear_regression_iter, 0, 1, 1, 1)
|
|
self.doubleSpinBox_linear_regression_rate = QtWidgets.QDoubleSpinBox(self.groupBox_2)
|
|
self.doubleSpinBox_linear_regression_rate.setMaximum(1.0)
|
|
self.doubleSpinBox_linear_regression_rate.setSingleStep(0.01)
|
|
self.doubleSpinBox_linear_regression_rate.setProperty("value", 0.03)
|
|
self.doubleSpinBox_linear_regression_rate.setObjectName("doubleSpinBox_linear_regression_rate")
|
|
self.gridLayout_2.addWidget(self.doubleSpinBox_linear_regression_rate, 1, 1, 1, 1)
|
|
self.horizontalLayout_3.addWidget(self.groupBox_2)
|
|
self.groupBox_3 = QtWidgets.QGroupBox(self.page)
|
|
self.groupBox_3.setObjectName("groupBox_3")
|
|
self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox_3)
|
|
self.gridLayout_3.setObjectName("gridLayout_3")
|
|
self.label_linear_regression_ploynmial = QtWidgets.QLabel(self.groupBox_3)
|
|
self.label_linear_regression_ploynmial.setObjectName("label_linear_regression_ploynmial")
|
|
self.gridLayout_3.addWidget(self.label_linear_regression_ploynmial, 1, 0, 1, 1)
|
|
self.label_linear_regression_sinusoid = QtWidgets.QLabel(self.groupBox_3)
|
|
self.label_linear_regression_sinusoid.setObjectName("label_linear_regression_sinusoid")
|
|
self.gridLayout_3.addWidget(self.label_linear_regression_sinusoid, 0, 0, 1, 1)
|
|
self.spinBox_linear_regression_sinusoid = QtWidgets.QSpinBox(self.groupBox_3)
|
|
self.spinBox_linear_regression_sinusoid.setObjectName("spinBox_linear_regression_sinusoid")
|
|
self.gridLayout_3.addWidget(self.spinBox_linear_regression_sinusoid, 0, 1, 1, 1)
|
|
self.spinBox_linear_regression_ploynmial = QtWidgets.QSpinBox(self.groupBox_3)
|
|
self.spinBox_linear_regression_ploynmial.setObjectName("spinBox_linear_regression_ploynmial")
|
|
self.gridLayout_3.addWidget(self.spinBox_linear_regression_ploynmial, 1, 1, 1, 1)
|
|
self.horizontalLayout_3.addWidget(self.groupBox_3)
|
|
self.verticalLayout_4.addLayout(self.horizontalLayout_3)
|
|
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
|
|
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
|
|
self.label_linear_regression_train_percent = QtWidgets.QLabel(self.page)
|
|
self.label_linear_regression_train_percent.setObjectName("label_linear_regression_train_percent")
|
|
self.horizontalLayout_4.addWidget(self.label_linear_regression_train_percent)
|
|
self.doubleSpinBox_linear_regression_train_percent = QtWidgets.QDoubleSpinBox(self.page)
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
|
|
sizePolicy.setHorizontalStretch(0)
|
|
sizePolicy.setVerticalStretch(0)
|
|
sizePolicy.setHeightForWidth(self.doubleSpinBox_linear_regression_train_percent.sizePolicy().hasHeightForWidth())
|
|
self.doubleSpinBox_linear_regression_train_percent.setSizePolicy(sizePolicy)
|
|
self.doubleSpinBox_linear_regression_train_percent.setMinimum(0.1)
|
|
self.doubleSpinBox_linear_regression_train_percent.setMaximum(1.0)
|
|
self.doubleSpinBox_linear_regression_train_percent.setSingleStep(0.1)
|
|
self.doubleSpinBox_linear_regression_train_percent.setProperty("value", 0.8)
|
|
self.doubleSpinBox_linear_regression_train_percent.setObjectName("doubleSpinBox_linear_regression_train_percent")
|
|
self.horizontalLayout_4.addWidget(self.doubleSpinBox_linear_regression_train_percent)
|
|
self.pushButton_linear_regression_begin = QtWidgets.QPushButton(self.page)
|
|
self.pushButton_linear_regression_begin.setObjectName("pushButton_linear_regression_begin")
|
|
self.horizontalLayout_4.addWidget(self.pushButton_linear_regression_begin)
|
|
self.progressBar_linear_regression = QtWidgets.QProgressBar(self.page)
|
|
self.progressBar_linear_regression.setProperty("value", 24)
|
|
self.progressBar_linear_regression.setObjectName("progressBar_linear_regression")
|
|
self.horizontalLayout_4.addWidget(self.progressBar_linear_regression)
|
|
self.verticalLayout_4.addLayout(self.horizontalLayout_4)
|
|
self.horizontalLayout_5.addLayout(self.verticalLayout_4)
|
|
self.groupBox_4 = QtWidgets.QGroupBox(self.page)
|
|
self.groupBox_4.setObjectName("groupBox_4")
|
|
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox_4)
|
|
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
|
self.pushButton_linear_regression_preview = QtWidgets.QPushButton(self.groupBox_4)
|
|
self.pushButton_linear_regression_preview.setObjectName("pushButton_linear_regression_preview")
|
|
self.verticalLayout_3.addWidget(self.pushButton_linear_regression_preview)
|
|
self.pushButton_linear_regression_show = QtWidgets.QPushButton(self.groupBox_4)
|
|
self.pushButton_linear_regression_show.setObjectName("pushButton_linear_regression_show")
|
|
self.verticalLayout_3.addWidget(self.pushButton_linear_regression_show)
|
|
self.pushButton_linear_regression_save = QtWidgets.QPushButton(self.groupBox_4)
|
|
self.pushButton_linear_regression_save.setObjectName("pushButton_linear_regression_save")
|
|
self.verticalLayout_3.addWidget(self.pushButton_linear_regression_save)
|
|
self.horizontalLayout_5.addWidget(self.groupBox_4)
|
|
self.verticalLayout_5.addLayout(self.horizontalLayout_5)
|
|
self.stackedWidget.addWidget(self.page)
|
|
self.page_2 = QtWidgets.QWidget()
|
|
self.page_2.setObjectName("page_2")
|
|
self.stackedWidget.addWidget(self.page_2)
|
|
self.page_3 = QtWidgets.QWidget()
|
|
self.page_3.setObjectName("page_3")
|
|
self.stackedWidget.addWidget(self.page_3)
|
|
self.page_4 = QtWidgets.QWidget()
|
|
self.page_4.setObjectName("page_4")
|
|
self.stackedWidget.addWidget(self.page_4)
|
|
self.verticalLayout.addWidget(self.stackedWidget)
|
|
self.verticalLayout_2.addWidget(self.widget)
|
|
MainWindow.setCentralWidget(self.centralwidget)
|
|
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
|
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 24))
|
|
self.menubar.setObjectName("menubar")
|
|
self.menu_file = QtWidgets.QMenu(self.menubar)
|
|
self.menu_file.setObjectName("menu_file")
|
|
self.menu_about = QtWidgets.QMenu(self.menubar)
|
|
self.menu_about.setObjectName("menu_about")
|
|
self.menu = QtWidgets.QMenu(self.menubar)
|
|
self.menu.setObjectName("menu")
|
|
MainWindow.setMenuBar(self.menubar)
|
|
self.statusbar = QtWidgets.QStatusBar(MainWindow)
|
|
self.statusbar.setObjectName("statusbar")
|
|
MainWindow.setStatusBar(self.statusbar)
|
|
self.actionOpen = QtWidgets.QAction(MainWindow)
|
|
self.actionOpen.setObjectName("actionOpen")
|
|
self.actionClear = QtWidgets.QAction(MainWindow)
|
|
self.actionClear.setObjectName("actionClear")
|
|
self.actionAbout_At = QtWidgets.QAction(MainWindow)
|
|
self.actionAbout_At.setObjectName("actionAbout_At")
|
|
self.actionAbout = QtWidgets.QAction(MainWindow)
|
|
self.actionAbout.setObjectName("actionAbout")
|
|
self.actionExit = QtWidgets.QAction(MainWindow)
|
|
self.actionExit.setObjectName("actionExit")
|
|
self.actionNumber_Head = QtWidgets.QAction(MainWindow)
|
|
self.actionNumber_Head.setObjectName("actionNumber_Head")
|
|
self.menu_file.addAction(self.actionOpen)
|
|
self.menu_file.addAction(self.actionClear)
|
|
self.menu_file.addAction(self.actionExit)
|
|
self.menu_about.addAction(self.actionAbout_At)
|
|
self.menu_about.addAction(self.actionAbout)
|
|
self.menu.addAction(self.actionNumber_Head)
|
|
self.menubar.addAction(self.menu_file.menuAction())
|
|
self.menubar.addAction(self.menu.menuAction())
|
|
self.menubar.addAction(self.menu_about.menuAction())
|
|
|
|
self.retranslateUi(MainWindow)
|
|
self.stackedWidget.setCurrentIndex(0)
|
|
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
|
|
|
def retranslateUi(self, MainWindow):
|
|
_translate = QtCore.QCoreApplication.translate
|
|
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
|
|
self.pushButton_filepath.setText(_translate("MainWindow", "打开数据"))
|
|
self.pushButton_filepath_clear.setText(_translate("MainWindow", "清除"))
|
|
self.pushButton_linear_regression.setText(_translate("MainWindow", "线性回归"))
|
|
self.pushButton_Kmeans.setText(_translate("MainWindow", "聚类算法"))
|
|
self.groupBox.setTitle(_translate("MainWindow", "标签"))
|
|
self.label_linear_regression_original.setText(_translate("MainWindow", "原始数据"))
|
|
self.lineEdit_linear_regression_original.setPlaceholderText(_translate("MainWindow", "原始数据Title"))
|
|
self.label_linear_regression_target.setText(_translate("MainWindow", "目标数据"))
|
|
self.lineEdit_linear_regression_target.setPlaceholderText(_translate("MainWindow", "目标数据Title"))
|
|
self.groupBox_2.setTitle(_translate("MainWindow", "学习参数"))
|
|
self.label_linear_regression_iter.setText(_translate("MainWindow", "迭代次数"))
|
|
self.label_linear_regression_rate.setText(_translate("MainWindow", "学习率"))
|
|
self.groupBox_3.setTitle(_translate("MainWindow", "特征变换"))
|
|
self.label_linear_regression_ploynmial.setText(_translate("MainWindow", "多项式变换"))
|
|
self.label_linear_regression_sinusoid.setText(_translate("MainWindow", "正弦变换"))
|
|
self.label_linear_regression_train_percent.setText(_translate("MainWindow", "学习数据比例"))
|
|
self.pushButton_linear_regression_begin.setText(_translate("MainWindow", "开始拟合"))
|
|
self.groupBox_4.setTitle(_translate("MainWindow", "结果处理"))
|
|
self.pushButton_linear_regression_preview.setText(_translate("MainWindow", "开始预测"))
|
|
self.pushButton_linear_regression_show.setText(_translate("MainWindow", "显示结果"))
|
|
self.pushButton_linear_regression_save.setText(_translate("MainWindow", "保存数据"))
|
|
self.menu_file.setTitle(_translate("MainWindow", "文件"))
|
|
self.menu_about.setTitle(_translate("MainWindow", "关于"))
|
|
self.menu.setTitle(_translate("MainWindow", "设置"))
|
|
self.actionOpen.setText(_translate("MainWindow", "Open"))
|
|
self.actionClear.setText(_translate("MainWindow", "Clear"))
|
|
self.actionAbout_At.setText(_translate("MainWindow", "About At"))
|
|
self.actionAbout.setText(_translate("MainWindow", "About"))
|
|
self.actionExit.setText(_translate("MainWindow", "Exit"))
|
|
self.actionNumber_Head.setText(_translate("MainWindow", "Number Head"))
|