mirror of
https://github.com/shizand/statapp.git
synced 2024-12-23 12:12:59 +03:00
parent
51fc413fca
commit
8ea3cffa7e
@ -1,15 +1,15 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="statapp" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
<configuration default="false" name="statapp" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
||||||
<module name="stat" />
|
<module name="stat" />
|
||||||
|
<option name="ENV_FILES" value="" />
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
<option name="PARENT_ENVS" value="true" />
|
<option name="PARENT_ENVS" value="true" />
|
||||||
<envs>
|
<envs>
|
||||||
<env name="PYTHONUNBUFFERED" value="1" />
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
</envs>
|
</envs>
|
||||||
<option name="SDK_HOME" value="" />
|
<option name="SDK_HOME" value="" />
|
||||||
<option name="SDK_NAME" value="Poetry (statapp)" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
<option name="WORKING_DIRECTORY" value="" />
|
||||||
<option name="IS_MODULE_SDK" value="false" />
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<option name="SCRIPT_NAME" value="statapp" />
|
<option name="SCRIPT_NAME" value="statapp" />
|
||||||
|
@ -39,5 +39,6 @@ def main():
|
|||||||
window.show()
|
window.show()
|
||||||
return app.exec_()
|
return app.exec_()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
@ -21,6 +21,7 @@ from dataclasses import dataclass
|
|||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
import sympy as sp
|
||||||
from statapp._vendor.multipolyfit import multipolyfit, getTerms
|
from statapp._vendor.multipolyfit import multipolyfit, getTerms
|
||||||
|
|
||||||
DIRECT_LINK = 0
|
DIRECT_LINK = 0
|
||||||
@ -135,3 +136,39 @@ def calculateStats(data, params, residues, y):
|
|||||||
out[1] = tStatistics
|
out[1] = tStatistics
|
||||||
|
|
||||||
return out, mse[0], scaledResidualVariance, rSquared, fStatistic
|
return out, mse[0], scaledResidualVariance, rSquared, fStatistic
|
||||||
|
|
||||||
|
|
||||||
|
def prediction(inputData, result: RegressionResult):
|
||||||
|
inputs = inputData[:, 1:]
|
||||||
|
outputs = inputData[:, 0]
|
||||||
|
|
||||||
|
params = result.paramsAndImportance[:, 0]
|
||||||
|
|
||||||
|
expr = sp.sympify(' '.join(
|
||||||
|
[
|
||||||
|
f'{param}' if m == 'c' else f' + ({param}) * {m}'
|
||||||
|
for param, m in zip(params, result.monomials)
|
||||||
|
]
|
||||||
|
))
|
||||||
|
|
||||||
|
results = []
|
||||||
|
|
||||||
|
for y, xValues in zip(outputs, inputs):
|
||||||
|
subsDict = dict(zip(expr.free_symbols, xValues))
|
||||||
|
predictedResult = expr.subs(subsDict)
|
||||||
|
difference = predictedResult - y
|
||||||
|
|
||||||
|
results.append([y, predictedResult, difference, 0.0])
|
||||||
|
|
||||||
|
results = np.array(results, dtype=np.float32)
|
||||||
|
|
||||||
|
# Расчет среднего значения и стандартного отклонения разностей
|
||||||
|
meanDifference = np.mean(results[:, 2])
|
||||||
|
stdDifference = np.std(results[:, 2])
|
||||||
|
|
||||||
|
# Установка флага 1.0, если разность выходит за пределы 3 стандартных отклонений
|
||||||
|
for row in results:
|
||||||
|
if abs(row[2] - meanDifference) > 3 * stdDifference:
|
||||||
|
row[3] = 1.0
|
||||||
|
|
||||||
|
return results
|
||||||
|
33
statapp/models/prediction_table_model.py
Normal file
33
statapp/models/prediction_table_model.py
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
from PySide2.QtCore import Qt
|
||||||
|
|
||||||
|
from statapp.models.ro_table_model import ROTableModel
|
||||||
|
|
||||||
|
|
||||||
|
class PreditionTableModel(ROTableModel):
|
||||||
|
def getHorizontalHeader(self):
|
||||||
|
return ['Отклик', 'Прогноз', 'Отклонение', '1-3 сигмовые зоны']
|
||||||
|
|
||||||
|
def data(self, index, role):
|
||||||
|
if role == Qt.DisplayRole and index.column() == 3:
|
||||||
|
value = super().data(index, role)
|
||||||
|
return 'x' if value == 1 else ''
|
||||||
|
return super().data(index, role)
|
@ -24,4 +24,4 @@ from statapp.polynoms.polynom_window import PolynomWindow
|
|||||||
class LinearPolynomWindow(PolynomWindow):
|
class LinearPolynomWindow(PolynomWindow):
|
||||||
def __init__(self, data):
|
def __init__(self, data):
|
||||||
result = linearPolynom(data)
|
result = linearPolynom(data)
|
||||||
super().__init__(result, "Линейный полином")
|
super().__init__(data, result, "Линейный полином")
|
||||||
|
@ -18,14 +18,17 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
from PySide2.QtWidgets import QDialog, QHeaderView
|
from PySide2.QtWidgets import QDialog, QHeaderView
|
||||||
|
|
||||||
|
from statapp.calculations import prediction
|
||||||
from statapp.mathtex_header_view import MathTexHeaderView
|
from statapp.mathtex_header_view import MathTexHeaderView
|
||||||
|
from statapp.models.prediction_table_model import PreditionTableModel
|
||||||
from statapp.models.regression_result_model import RegressionResultModel
|
from statapp.models.regression_result_model import RegressionResultModel
|
||||||
from statapp.ui.ui_polynom_window import Ui_PolynomWindow
|
from statapp.ui.ui_polynom_window import Ui_PolynomWindow
|
||||||
from statapp.utils import addIcon, FloatDelegate
|
from statapp.utils import addIcon, FloatDelegate
|
||||||
|
|
||||||
|
|
||||||
class PolynomWindow(QDialog):
|
class PolynomWindow(QDialog):
|
||||||
def __init__(self, result, windowTitle):
|
def __init__(self, data, result, windowTitle):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.ui = Ui_PolynomWindow()
|
self.ui = Ui_PolynomWindow()
|
||||||
self.ui.setupUi(self)
|
self.ui.setupUi(self)
|
||||||
@ -43,3 +46,8 @@ class PolynomWindow(QDialog):
|
|||||||
self.ui.scaledResidualVarianceValueLabel.setText(str(result.scaledResidualVariance))
|
self.ui.scaledResidualVarianceValueLabel.setText(str(result.scaledResidualVariance))
|
||||||
self.ui.fStatisticValueLabel.setText(str(result.fStatistic))
|
self.ui.fStatisticValueLabel.setText(str(result.fStatistic))
|
||||||
self.ui.rSquaredValueLabel.setText(str(result.scaledResidualVariance))
|
self.ui.rSquaredValueLabel.setText(str(result.scaledResidualVariance))
|
||||||
|
|
||||||
|
self.predictionModel = PreditionTableModel(prediction(data, result))
|
||||||
|
self.ui.predictionTableView.setModel(self.predictionModel)
|
||||||
|
header = self.ui.predictionTableView.horizontalHeader()
|
||||||
|
header.setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
|
||||||
|
@ -24,4 +24,4 @@ from statapp.polynoms.polynom_window import PolynomWindow
|
|||||||
class SquaredPolynomWindow(PolynomWindow):
|
class SquaredPolynomWindow(PolynomWindow):
|
||||||
def __init__(self, data):
|
def __init__(self, data):
|
||||||
result = squaredPolynom(data)
|
result = squaredPolynom(data)
|
||||||
super().__init__(result, "Квадратичный полином")
|
super().__init__(data, result, "Квадратичный полином")
|
||||||
|
@ -21,11 +21,12 @@ import numpy as np
|
|||||||
from PySide2.QtCore import Qt
|
from PySide2.QtCore import Qt
|
||||||
from PySide2.QtWidgets import QDialog, QHeaderView
|
from PySide2.QtWidgets import QDialog, QHeaderView
|
||||||
|
|
||||||
from statapp.calculations import linearPolynom
|
from statapp.calculations import linearPolynom, prediction
|
||||||
from statapp.combo_delegate import ComboDelegate
|
from statapp.combo_delegate import ComboDelegate
|
||||||
from statapp.mathtex_header_view import MathTexHeaderView
|
from statapp.mathtex_header_view import MathTexHeaderView
|
||||||
|
from statapp.models.prediction_table_model import PreditionTableModel
|
||||||
from statapp.models.transform_polynom_model import TransformPolynomModel, TRANSFORMS
|
from statapp.models.transform_polynom_model import TransformPolynomModel, TRANSFORMS
|
||||||
from statapp.ui.ui_transform_polynom_window import Ui_PolynomWindow
|
from statapp.ui.ui_polynom_window import Ui_PolynomWindow
|
||||||
from statapp.utils import addIcon
|
from statapp.utils import addIcon
|
||||||
|
|
||||||
|
|
||||||
@ -40,6 +41,11 @@ class TransformPolynomWindow(QDialog):
|
|||||||
self.data = data
|
self.data = data
|
||||||
result = linearPolynom(data)
|
result = linearPolynom(data)
|
||||||
|
|
||||||
|
self.predictionModel = PreditionTableModel(prediction(data, result))
|
||||||
|
self.ui.predictionTableView.setModel(self.predictionModel)
|
||||||
|
header = self.ui.predictionTableView.horizontalHeader()
|
||||||
|
header.setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
|
||||||
|
|
||||||
# Создание столбца из нулей
|
# Создание столбца из нулей
|
||||||
zeroCol = np.zeros((result.paramsAndImportance.shape[0], 1))
|
zeroCol = np.zeros((result.paramsAndImportance.shape[0], 1))
|
||||||
# Добавление столбца к исходному массиву
|
# Добавление столбца к исходному массиву
|
||||||
@ -78,6 +84,7 @@ class TransformPolynomWindow(QDialog):
|
|||||||
|
|
||||||
def rebuildData(self, data):
|
def rebuildData(self, data):
|
||||||
result = linearPolynom(data)
|
result = linearPolynom(data)
|
||||||
|
self.predictionModel.updateAllData(prediction(data, result))
|
||||||
zeroCol = np.zeros((result.paramsAndImportance.shape[0], 1))
|
zeroCol = np.zeros((result.paramsAndImportance.shape[0], 1))
|
||||||
result.paramsAndImportance = np.column_stack((zeroCol, result.paramsAndImportance))
|
result.paramsAndImportance = np.column_stack((zeroCol, result.paramsAndImportance))
|
||||||
self.model.updateAllData(result)
|
self.model.updateAllData(result)
|
||||||
|
@ -6,93 +6,121 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>630</width>
|
<width>537</width>
|
||||||
<height>400</height>
|
<height>444</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Полином</string>
|
<string>Полином</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0">
|
<item row="0" column="6">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<item row="0" column="0">
|
<property name="currentIndex">
|
||||||
<widget class="QTableView" name="tableView">
|
<number>0</number>
|
||||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
</property>
|
||||||
<number>40</number>
|
<widget class="QWidget" name="model">
|
||||||
</attribute>
|
<attribute name="title">
|
||||||
<attribute name="verticalHeaderMinimumSectionSize">
|
<string>Модель</string>
|
||||||
<number>40</number>
|
</attribute>
|
||||||
</attribute>
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<attribute name="verticalHeaderDefaultSectionSize">
|
|
||||||
<number>40</number>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<layout class="QGridLayout" name="polynomResult">
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="residualVarianceValueLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>undefined</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="scaledResidualVarianceValueLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>undefined</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="fStatisticLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>F1 - отношение Фишера</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="residualVarianceLabel">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="text">
|
<item row="1" column="3">
|
||||||
<string>Остаточная дисперсия:</string>
|
<widget class="QTableView" name="tableView">
|
||||||
</property>
|
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||||
</widget>
|
<number>40</number>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="verticalHeaderMinimumSectionSize">
|
||||||
|
<number>40</number>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="verticalHeaderDefaultSectionSize">
|
||||||
|
<number>40</number>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3">
|
||||||
|
<layout class="QGridLayout" name="polynomResult">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="residualVarianceValueLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>undefined</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="scaledResidualVarianceValueLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>undefined</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="fStatisticLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>F1 - отношение Фишера</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="residualVarianceLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Остаточная дисперсия:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="scaledResidualVarianceLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Остаточная дисперсия (масштабированная):</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="rSquaredLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Коэффициент множественной дереминизации</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLabel" name="fStatisticValueLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>undefined</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLabel" name="rSquaredValueLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>undefined</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
</layout>
|
||||||
<widget class="QLabel" name="scaledResidualVarianceLabel">
|
</widget>
|
||||||
<property name="text">
|
<widget class="QWidget" name="prediction">
|
||||||
<string>Остаточная дисперсия (масштабированная):</string>
|
<attribute name="title">
|
||||||
</property>
|
<string>Прогноз</string>
|
||||||
</widget>
|
</attribute>
|
||||||
</item>
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
<item row="3" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="rSquaredLabel">
|
<widget class="QTableView" name="predictionTableView">
|
||||||
<property name="text">
|
<attribute name="verticalHeaderVisible">
|
||||||
<string>Коэффициент множественной дереминизации</string>
|
<bool>false</bool>
|
||||||
</property>
|
</attribute>
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLabel" name="fStatisticValueLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>undefined</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLabel" name="rSquaredValueLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>undefined</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</widget>
|
||||||
</layout>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -1,101 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>PolynomWindow</class>
|
|
||||||
<widget class="QDialog" name="PolynomWindow">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>537</width>
|
|
||||||
<height>444</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Полином</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="1" column="6">
|
|
||||||
<layout class="QGridLayout" name="polynomResult">
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="residualVarianceValueLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>undefined</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="scaledResidualVarianceValueLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>undefined</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="fStatisticLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>F1 - отношение Фишера</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="residualVarianceLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Остаточная дисперсия:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="scaledResidualVarianceLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Остаточная дисперсия (масштабированная):</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="rSquaredLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Коэффициент множественной дереминизации</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLabel" name="fStatisticValueLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>undefined</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLabel" name="rSquaredValueLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>undefined</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="6">
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="1" column="3">
|
|
||||||
<widget class="QTableView" name="tableView">
|
|
||||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
|
||||||
<number>40</number>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="verticalHeaderMinimumSectionSize">
|
|
||||||
<number>40</number>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="verticalHeaderDefaultSectionSize">
|
|
||||||
<number>40</number>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
52
statapp/ui/ui_polynom_window.py
generated
52
statapp/ui/ui_polynom_window.py
generated
@ -37,71 +37,95 @@ class Ui_PolynomWindow(object):
|
|||||||
def setupUi(self, PolynomWindow):
|
def setupUi(self, PolynomWindow):
|
||||||
if not PolynomWindow.objectName():
|
if not PolynomWindow.objectName():
|
||||||
PolynomWindow.setObjectName(u"PolynomWindow")
|
PolynomWindow.setObjectName(u"PolynomWindow")
|
||||||
PolynomWindow.resize(630, 400)
|
PolynomWindow.resize(537, 444)
|
||||||
self.gridLayout_2 = QGridLayout(PolynomWindow)
|
self.gridLayout_2 = QGridLayout(PolynomWindow)
|
||||||
self.gridLayout_2.setObjectName(u"gridLayout_2")
|
self.gridLayout_2.setObjectName(u"gridLayout_2")
|
||||||
|
self.tabWidget = QTabWidget(PolynomWindow)
|
||||||
|
self.tabWidget.setObjectName(u"tabWidget")
|
||||||
|
self.model = QWidget()
|
||||||
|
self.model.setObjectName(u"model")
|
||||||
|
self.gridLayout_3 = QGridLayout(self.model)
|
||||||
|
self.gridLayout_3.setObjectName(u"gridLayout_3")
|
||||||
self.gridLayout = QGridLayout()
|
self.gridLayout = QGridLayout()
|
||||||
self.gridLayout.setObjectName(u"gridLayout")
|
self.gridLayout.setObjectName(u"gridLayout")
|
||||||
self.tableView = QTableView(PolynomWindow)
|
self.tableView = QTableView(self.model)
|
||||||
self.tableView.setObjectName(u"tableView")
|
self.tableView.setObjectName(u"tableView")
|
||||||
self.tableView.horizontalHeader().setMinimumSectionSize(40)
|
self.tableView.horizontalHeader().setMinimumSectionSize(40)
|
||||||
self.tableView.verticalHeader().setMinimumSectionSize(40)
|
self.tableView.verticalHeader().setMinimumSectionSize(40)
|
||||||
self.tableView.verticalHeader().setDefaultSectionSize(40)
|
self.tableView.verticalHeader().setDefaultSectionSize(40)
|
||||||
|
|
||||||
self.gridLayout.addWidget(self.tableView, 0, 0, 1, 1)
|
self.gridLayout.addWidget(self.tableView, 1, 3, 1, 1)
|
||||||
|
|
||||||
self.polynomResult = QGridLayout()
|
self.polynomResult = QGridLayout()
|
||||||
self.polynomResult.setObjectName(u"polynomResult")
|
self.polynomResult.setObjectName(u"polynomResult")
|
||||||
self.polynomResult.setContentsMargins(-1, 10, -1, -1)
|
self.polynomResult.setContentsMargins(-1, 10, -1, -1)
|
||||||
self.residualVarianceValueLabel = QLabel(PolynomWindow)
|
self.residualVarianceValueLabel = QLabel(self.model)
|
||||||
self.residualVarianceValueLabel.setObjectName(u"residualVarianceValueLabel")
|
self.residualVarianceValueLabel.setObjectName(u"residualVarianceValueLabel")
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.residualVarianceValueLabel, 0, 1, 1, 1)
|
self.polynomResult.addWidget(self.residualVarianceValueLabel, 0, 1, 1, 1)
|
||||||
|
|
||||||
self.scaledResidualVarianceValueLabel = QLabel(PolynomWindow)
|
self.scaledResidualVarianceValueLabel = QLabel(self.model)
|
||||||
self.scaledResidualVarianceValueLabel.setObjectName(u"scaledResidualVarianceValueLabel")
|
self.scaledResidualVarianceValueLabel.setObjectName(u"scaledResidualVarianceValueLabel")
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.scaledResidualVarianceValueLabel, 1, 1, 1, 1)
|
self.polynomResult.addWidget(self.scaledResidualVarianceValueLabel, 1, 1, 1, 1)
|
||||||
|
|
||||||
self.fStatisticLabel = QLabel(PolynomWindow)
|
self.fStatisticLabel = QLabel(self.model)
|
||||||
self.fStatisticLabel.setObjectName(u"fStatisticLabel")
|
self.fStatisticLabel.setObjectName(u"fStatisticLabel")
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.fStatisticLabel, 2, 0, 1, 1)
|
self.polynomResult.addWidget(self.fStatisticLabel, 2, 0, 1, 1)
|
||||||
|
|
||||||
self.residualVarianceLabel = QLabel(PolynomWindow)
|
self.residualVarianceLabel = QLabel(self.model)
|
||||||
self.residualVarianceLabel.setObjectName(u"residualVarianceLabel")
|
self.residualVarianceLabel.setObjectName(u"residualVarianceLabel")
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.residualVarianceLabel, 0, 0, 1, 1)
|
self.polynomResult.addWidget(self.residualVarianceLabel, 0, 0, 1, 1)
|
||||||
|
|
||||||
self.scaledResidualVarianceLabel = QLabel(PolynomWindow)
|
self.scaledResidualVarianceLabel = QLabel(self.model)
|
||||||
self.scaledResidualVarianceLabel.setObjectName(u"scaledResidualVarianceLabel")
|
self.scaledResidualVarianceLabel.setObjectName(u"scaledResidualVarianceLabel")
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.scaledResidualVarianceLabel, 1, 0, 1, 1)
|
self.polynomResult.addWidget(self.scaledResidualVarianceLabel, 1, 0, 1, 1)
|
||||||
|
|
||||||
self.rSquaredLabel = QLabel(PolynomWindow)
|
self.rSquaredLabel = QLabel(self.model)
|
||||||
self.rSquaredLabel.setObjectName(u"rSquaredLabel")
|
self.rSquaredLabel.setObjectName(u"rSquaredLabel")
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.rSquaredLabel, 3, 0, 1, 1)
|
self.polynomResult.addWidget(self.rSquaredLabel, 3, 0, 1, 1)
|
||||||
|
|
||||||
self.fStatisticValueLabel = QLabel(PolynomWindow)
|
self.fStatisticValueLabel = QLabel(self.model)
|
||||||
self.fStatisticValueLabel.setObjectName(u"fStatisticValueLabel")
|
self.fStatisticValueLabel.setObjectName(u"fStatisticValueLabel")
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.fStatisticValueLabel, 2, 1, 1, 1)
|
self.polynomResult.addWidget(self.fStatisticValueLabel, 2, 1, 1, 1)
|
||||||
|
|
||||||
self.rSquaredValueLabel = QLabel(PolynomWindow)
|
self.rSquaredValueLabel = QLabel(self.model)
|
||||||
self.rSquaredValueLabel.setObjectName(u"rSquaredValueLabel")
|
self.rSquaredValueLabel.setObjectName(u"rSquaredValueLabel")
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.rSquaredValueLabel, 3, 1, 1, 1)
|
self.polynomResult.addWidget(self.rSquaredValueLabel, 3, 1, 1, 1)
|
||||||
|
|
||||||
|
|
||||||
self.gridLayout.addLayout(self.polynomResult, 1, 0, 1, 1)
|
self.gridLayout.addLayout(self.polynomResult, 2, 3, 1, 1)
|
||||||
|
|
||||||
|
|
||||||
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
|
self.gridLayout_3.addLayout(self.gridLayout, 0, 0, 1, 1)
|
||||||
|
|
||||||
|
self.tabWidget.addTab(self.model, "")
|
||||||
|
self.prediction = QWidget()
|
||||||
|
self.prediction.setObjectName(u"prediction")
|
||||||
|
self.gridLayout_4 = QGridLayout(self.prediction)
|
||||||
|
self.gridLayout_4.setObjectName(u"gridLayout_4")
|
||||||
|
self.predictionTableView = QTableView(self.prediction)
|
||||||
|
self.predictionTableView.setObjectName(u"predictionTableView")
|
||||||
|
self.predictionTableView.verticalHeader().setVisible(False)
|
||||||
|
|
||||||
|
self.gridLayout_4.addWidget(self.predictionTableView, 0, 0, 1, 1)
|
||||||
|
|
||||||
|
self.tabWidget.addTab(self.prediction, "")
|
||||||
|
|
||||||
|
self.gridLayout_2.addWidget(self.tabWidget, 0, 6, 1, 1)
|
||||||
|
|
||||||
|
|
||||||
self.retranslateUi(PolynomWindow)
|
self.retranslateUi(PolynomWindow)
|
||||||
|
|
||||||
|
self.tabWidget.setCurrentIndex(0)
|
||||||
|
|
||||||
|
|
||||||
QMetaObject.connectSlotsByName(PolynomWindow)
|
QMetaObject.connectSlotsByName(PolynomWindow)
|
||||||
# setupUi
|
# setupUi
|
||||||
|
|
||||||
@ -115,4 +139,6 @@ class Ui_PolynomWindow(object):
|
|||||||
self.rSquaredLabel.setText(QCoreApplication.translate("PolynomWindow", u"\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0434\u0435\u0440\u0435\u043c\u0438\u043d\u0438\u0437\u0430\u0446\u0438\u0438", None))
|
self.rSquaredLabel.setText(QCoreApplication.translate("PolynomWindow", u"\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0434\u0435\u0440\u0435\u043c\u0438\u043d\u0438\u0437\u0430\u0446\u0438\u0438", None))
|
||||||
self.fStatisticValueLabel.setText(QCoreApplication.translate("PolynomWindow", u"undefined", None))
|
self.fStatisticValueLabel.setText(QCoreApplication.translate("PolynomWindow", u"undefined", None))
|
||||||
self.rSquaredValueLabel.setText(QCoreApplication.translate("PolynomWindow", u"undefined", None))
|
self.rSquaredValueLabel.setText(QCoreApplication.translate("PolynomWindow", u"undefined", None))
|
||||||
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.model), QCoreApplication.translate("PolynomWindow", u"\u041c\u043e\u0434\u0435\u043b\u044c", None))
|
||||||
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.prediction), QCoreApplication.translate("PolynomWindow", u"\u041f\u0440\u043e\u0433\u043d\u043e\u0437", None))
|
||||||
# retranslateUi
|
# retranslateUi
|
||||||
|
118
statapp/ui/ui_transform_polynom_window.py
generated
118
statapp/ui/ui_transform_polynom_window.py
generated
@ -1,118 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
|
||||||
#
|
|
||||||
# This file is part of Statapp
|
|
||||||
# (see https://github.com/shizand/statapp).
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
## Form generated from reading UI file 'transform_polynom_window.ui'
|
|
||||||
##
|
|
||||||
## Created by: Qt User Interface Compiler version 5.15.2
|
|
||||||
##
|
|
||||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
from PySide2.QtCore import *
|
|
||||||
from PySide2.QtGui import *
|
|
||||||
from PySide2.QtWidgets import *
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_PolynomWindow(object):
|
|
||||||
def setupUi(self, PolynomWindow):
|
|
||||||
if not PolynomWindow.objectName():
|
|
||||||
PolynomWindow.setObjectName(u"PolynomWindow")
|
|
||||||
PolynomWindow.resize(537, 444)
|
|
||||||
self.gridLayout_2 = QGridLayout(PolynomWindow)
|
|
||||||
self.gridLayout_2.setObjectName(u"gridLayout_2")
|
|
||||||
self.polynomResult = QGridLayout()
|
|
||||||
self.polynomResult.setObjectName(u"polynomResult")
|
|
||||||
self.polynomResult.setContentsMargins(-1, 10, -1, -1)
|
|
||||||
self.residualVarianceValueLabel = QLabel(PolynomWindow)
|
|
||||||
self.residualVarianceValueLabel.setObjectName(u"residualVarianceValueLabel")
|
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.residualVarianceValueLabel, 0, 1, 1, 1)
|
|
||||||
|
|
||||||
self.scaledResidualVarianceValueLabel = QLabel(PolynomWindow)
|
|
||||||
self.scaledResidualVarianceValueLabel.setObjectName(u"scaledResidualVarianceValueLabel")
|
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.scaledResidualVarianceValueLabel, 1, 1, 1, 1)
|
|
||||||
|
|
||||||
self.fStatisticLabel = QLabel(PolynomWindow)
|
|
||||||
self.fStatisticLabel.setObjectName(u"fStatisticLabel")
|
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.fStatisticLabel, 2, 0, 1, 1)
|
|
||||||
|
|
||||||
self.residualVarianceLabel = QLabel(PolynomWindow)
|
|
||||||
self.residualVarianceLabel.setObjectName(u"residualVarianceLabel")
|
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.residualVarianceLabel, 0, 0, 1, 1)
|
|
||||||
|
|
||||||
self.scaledResidualVarianceLabel = QLabel(PolynomWindow)
|
|
||||||
self.scaledResidualVarianceLabel.setObjectName(u"scaledResidualVarianceLabel")
|
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.scaledResidualVarianceLabel, 1, 0, 1, 1)
|
|
||||||
|
|
||||||
self.rSquaredLabel = QLabel(PolynomWindow)
|
|
||||||
self.rSquaredLabel.setObjectName(u"rSquaredLabel")
|
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.rSquaredLabel, 3, 0, 1, 1)
|
|
||||||
|
|
||||||
self.fStatisticValueLabel = QLabel(PolynomWindow)
|
|
||||||
self.fStatisticValueLabel.setObjectName(u"fStatisticValueLabel")
|
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.fStatisticValueLabel, 2, 1, 1, 1)
|
|
||||||
|
|
||||||
self.rSquaredValueLabel = QLabel(PolynomWindow)
|
|
||||||
self.rSquaredValueLabel.setObjectName(u"rSquaredValueLabel")
|
|
||||||
|
|
||||||
self.polynomResult.addWidget(self.rSquaredValueLabel, 3, 1, 1, 1)
|
|
||||||
|
|
||||||
|
|
||||||
self.gridLayout_2.addLayout(self.polynomResult, 1, 6, 1, 1)
|
|
||||||
|
|
||||||
self.gridLayout = QGridLayout()
|
|
||||||
self.gridLayout.setObjectName(u"gridLayout")
|
|
||||||
self.tableView = QTableView(PolynomWindow)
|
|
||||||
self.tableView.setObjectName(u"tableView")
|
|
||||||
self.tableView.horizontalHeader().setMinimumSectionSize(40)
|
|
||||||
self.tableView.verticalHeader().setMinimumSectionSize(40)
|
|
||||||
self.tableView.verticalHeader().setDefaultSectionSize(40)
|
|
||||||
|
|
||||||
self.gridLayout.addWidget(self.tableView, 1, 3, 1, 1)
|
|
||||||
|
|
||||||
|
|
||||||
self.gridLayout_2.addLayout(self.gridLayout, 0, 6, 1, 1)
|
|
||||||
|
|
||||||
|
|
||||||
self.retranslateUi(PolynomWindow)
|
|
||||||
|
|
||||||
QMetaObject.connectSlotsByName(PolynomWindow)
|
|
||||||
# setupUi
|
|
||||||
|
|
||||||
def retranslateUi(self, PolynomWindow):
|
|
||||||
PolynomWindow.setWindowTitle(QCoreApplication.translate("PolynomWindow", u"\u041f\u043e\u043b\u0438\u043d\u043e\u043c", None))
|
|
||||||
self.residualVarianceValueLabel.setText(QCoreApplication.translate("PolynomWindow", u"undefined", None))
|
|
||||||
self.scaledResidualVarianceValueLabel.setText(QCoreApplication.translate("PolynomWindow", u"undefined", None))
|
|
||||||
self.fStatisticLabel.setText(QCoreApplication.translate("PolynomWindow", u"F1 - \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0424\u0438\u0448\u0435\u0440\u0430", None))
|
|
||||||
self.residualVarianceLabel.setText(QCoreApplication.translate("PolynomWindow", u"\u041e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f:", None))
|
|
||||||
self.scaledResidualVarianceLabel.setText(QCoreApplication.translate("PolynomWindow", u"\u041e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f (\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f):", None))
|
|
||||||
self.rSquaredLabel.setText(QCoreApplication.translate("PolynomWindow", u"\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0434\u0435\u0440\u0435\u043c\u0438\u043d\u0438\u0437\u0430\u0446\u0438\u0438", None))
|
|
||||||
self.fStatisticValueLabel.setText(QCoreApplication.translate("PolynomWindow", u"undefined", None))
|
|
||||||
self.rSquaredValueLabel.setText(QCoreApplication.translate("PolynomWindow", u"undefined", None))
|
|
||||||
# retranslateUi
|
|
Loading…
Reference in New Issue
Block a user