diff --git a/statapp/_vendor/multipolyfit.py b/statapp/_vendor/multipolyfit.py
index c96b804..bcebcf9 100644
--- a/statapp/_vendor/multipolyfit.py
+++ b/statapp/_vendor/multipolyfit.py
@@ -9,8 +9,7 @@
# See the GPL-3.0 license for details.
import itertools
-import numpy as np
-from numpy import linalg, zeros, ones, hstack, asarray, diagonal
+from numpy import linalg, zeros, ones, hstack, asarray
from sympy import symbols, Mul, Add, S
@@ -90,15 +89,7 @@ def multipolyfit(xs, y, deg, full=False, modelOut=False, powersOut=False):
return beta, powers
if full:
- residues = result[1]
- dof = len(a) - len(beta)
-
- mse = residues / dof
- cov = mse * diagonal(linalg.inv(a.T @ a))
- se = np.sqrt(cov)
- tStatistics = beta / se
-
- return result, powers, tStatistics, mse
+ return result, powers, a
return beta
diff --git a/statapp/calculations.py b/statapp/calculations.py
index a16d41a..dd471f1 100644
--- a/statapp/calculations.py
+++ b/statapp/calculations.py
@@ -66,54 +66,72 @@ class RegressionResult:
Attributes:
paramsAndImportance (np.ndarray): Параметры модели. Первая колонка -
residualVariance (np.float64): Остаточная дисперсия
+ scaledResidualVariance (np.float64): Остаточная дисперсия (масштабированная)
monomials (list): Список одночленов в строковом виде без коэффициентов. Свободный член - c
"""
paramsAndImportance: np.ndarray
residualVariance: np.float64
+ scaledResidualVariance: np.float64
+ rSquared: np.float64
+ fStatistic: np.float64
monomials: list
-def linearPolynom(inputData) -> RegressionResult:
+def commonPolynom(inputData, deg) -> RegressionResult:
x = inputData[:, 1:]
y = inputData[:, 0]
- data = pd.DataFrame(x)
- data.insert(0, 'const', 1)
- # ---
- result = np.linalg.lstsq(data, y, rcond=None)
- # Коэффициенты регрессии
- params = result[0]
- # Остатки
- residues = result[1]
- dof = len(data) - len(params)
+ result, powers, data = multipolyfit(x, y, deg, full=True)
+ (out, mse, scaledResidualVariance,
+ rSquared, fStatistic) = calculateStats(data, result[0], result[1], y)
+
+ return RegressionResult(
+ out.to_numpy(),
+ np.float64(mse),
+ np.float64(scaledResidualVariance),
+ np.float64(rSquared),
+ np.float64(fStatistic),
+ ['c' if str(x) == '1' else str(x) for x in getTerms(powers)]
+ )
+
+
+def linearPolynom(inputData) -> RegressionResult:
+ return commonPolynom(inputData, 1)
+
+
+def squaredPolynom(inputData) -> RegressionResult:
+ return commonPolynom(inputData, 2)
+
+
+def calculateStats(data, params, residues, y):
+ # pylint: disable-msg=too-many-locals
+
+ k = len(params) # Количество оцениваемых параметров (коэффициентов)
+ n = len(data) # Количество наблюдений
+
+ # Степень свободы (degrees of freedom) для остатков
+ dof = n - k # Количество наблюдений минус количество оцениваемых параметров
+ # Остаточная дисперсия (Mean Squared Error, MSE)
mse = residues / dof
+ # Среднее значение остатков
+ meanResiduals = np.sum(residues) / dof
+ # Масштабированная остаточная дисперсия
+ scaledResidualVariance = residues / meanResiduals ** 2
+ # Ковариационная матрица коэффициентов
cov = mse * np.diagonal(np.linalg.inv(data.T @ data))
+ # Стандартные ошибки коэффициентов
se = np.sqrt(cov)
+ # T-статистики для каждого коэффициента регрессии
tStatistics = params / se
- # возможно стоит сделать через np.reshape + np.concatenate
+ # R-squared (коэффициент множественной детерминации)
+ sst = np.sum((y - np.mean(y)) ** 2) # Сумма квадратов отклонений
+ rSquared = 1 - (mse[0] / sst)
+
+ # F-statistic (статистика Фишера)
+ fStatistic = (rSquared / (k - 1)) / ((1 - rSquared) / (n - k))
+
out = pd.DataFrame()
out[0] = params
out[1] = tStatistics
- return RegressionResult(
- out.to_numpy(),
- np.float64(mse[0]),
- ['c'] + [f'x{i}' for i in range(1, len(params))]
- )
-
-
-def squaredPolynom(inputData):
- x = inputData[:, 1:]
- y = inputData[:, 0]
- result, powers, tStatistics, mse = multipolyfit(x, y, 2, full=True)
- betas = result[0]
-
- out = pd.DataFrame()
- out[0] = betas
- out[1] = tStatistics
-
- return RegressionResult(
- out.to_numpy(),
- np.float64(mse[0]),
- ['c' if str(x) == '1' else str(x) for x in getTerms(powers)]
- )
+ return out, mse[0], scaledResidualVariance, rSquared, fStatistic
diff --git a/statapp/main_window.py b/statapp/main_window.py
index b38132b..4839fb0 100644
--- a/statapp/main_window.py
+++ b/statapp/main_window.py
@@ -25,13 +25,13 @@ from PySide2.QtWidgets import QMainWindow, QMessageBox
from statapp.calculations import generateXValues, generateYValues
from statapp.constants import NUMBERS_PRECISION
from statapp.generate_factor_window import GenerateFactorWindow
-from statapp.linear_polynom_window import LinearPolynomWindow
+from statapp.polynoms.linear_polynom_window import LinearPolynomWindow
from statapp.mathtex_header_view import MathTexHeaderView
from statapp.models.input_values_model import InputValuesModel
from statapp.generate_window import GenerateWindow
from statapp.about_window import AboutWindow
from statapp.models.fileslc_model import FileSLCModel
-from statapp.squared_polynom_window import SquaredPolynomWindow
+from statapp.polynoms.squared_polynom_window import SquaredPolynomWindow
from statapp.ui.ui_main_window import Ui_MainWindow
from statapp.utils import buildMessageBox, addIcon, FloatDelegate
from statapp.variance_analysis import VarianceAnalysisWindow
diff --git a/statapp/polynoms/linear_polynom_window.py b/statapp/polynoms/linear_polynom_window.py
new file mode 100644
index 0000000..aa7a40f
--- /dev/null
+++ b/statapp/polynoms/linear_polynom_window.py
@@ -0,0 +1,27 @@
+#
+# 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 .
+#
+from statapp.calculations import linearPolynom
+from statapp.polynoms.polynom_window import PolynomWindow
+
+
+class LinearPolynomWindow(PolynomWindow):
+ def __init__(self, data):
+ result = linearPolynom(data)
+ super().__init__(result, "Линейный полином")
diff --git a/statapp/linear_polynom_window.py b/statapp/polynoms/polynom_window.py
similarity index 77%
rename from statapp/linear_polynom_window.py
rename to statapp/polynoms/polynom_window.py
index 6d040c0..736a8fa 100644
--- a/statapp/linear_polynom_window.py
+++ b/statapp/polynoms/polynom_window.py
@@ -18,22 +18,19 @@
# along with this program. If not, see .
#
from PySide2.QtWidgets import QDialog, QHeaderView
-
-from statapp.calculations import linearPolynom
from statapp.mathtex_header_view import MathTexHeaderView
from statapp.models.regression_result_model import RegressionResultModel
-from statapp.ui.ui_linear_polynom_window import Ui_LinearPolynomWindow
+from statapp.ui.ui_polynom_window import Ui_PolynomWindow
from statapp.utils import addIcon, FloatDelegate
-class LinearPolynomWindow(QDialog):
- def __init__(self, data):
+class PolynomWindow(QDialog):
+ def __init__(self, result, windowTitle):
super().__init__()
- self.ui = Ui_LinearPolynomWindow()
+ self.ui = Ui_PolynomWindow()
self.ui.setupUi(self)
addIcon(self)
-
- result = linearPolynom(data)
+ self.setWindowTitle(windowTitle)
self.model = RegressionResultModel(result)
self.ui.tableView.setItemDelegate(FloatDelegate())
@@ -43,3 +40,6 @@ class LinearPolynomWindow(QDialog):
header.setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
self.ui.residualVarianceValueLabel.setText(str(result.residualVariance))
+ self.ui.scaledResidualVarianceValueLabel.setText(str(result.scaledResidualVariance))
+ self.ui.fStatisticValueLabel.setText(str(result.fStatistic))
+ self.ui.rSquaredValueLabel.setText(str(result.scaledResidualVariance))
diff --git a/statapp/polynoms/squared_polynom_window.py b/statapp/polynoms/squared_polynom_window.py
new file mode 100644
index 0000000..760c3d2
--- /dev/null
+++ b/statapp/polynoms/squared_polynom_window.py
@@ -0,0 +1,27 @@
+#
+# 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 .
+#
+from statapp.calculations import squaredPolynom
+from statapp.polynoms.polynom_window import PolynomWindow
+
+
+class SquaredPolynomWindow(PolynomWindow):
+ def __init__(self, data):
+ result = squaredPolynom(data)
+ super().__init__(result, "Квадратичный полином")
diff --git a/statapp/squared_polynom_window.py b/statapp/squared_polynom_window.py
deleted file mode 100644
index ce0d63b..0000000
--- a/statapp/squared_polynom_window.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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 .
-#
-from PySide2.QtWidgets import QDialog, QHeaderView
-
-from statapp.calculations import squaredPolynom
-from statapp.mathtex_header_view import MathTexHeaderView
-from statapp.models.regression_result_model import RegressionResultModel
-from statapp.ui.ui_squared_polynom_window import Ui_SquaredPolynomWindow
-from statapp.utils import addIcon, FloatDelegate
-
-
-class SquaredPolynomWindow(QDialog):
- def __init__(self, data):
- super().__init__()
- self.ui = Ui_SquaredPolynomWindow()
- self.ui.setupUi(self)
- addIcon(self)
-
- result = squaredPolynom(data)
-
- self.model = RegressionResultModel(result)
- self.ui.tableView.setItemDelegate(FloatDelegate())
- self.ui.tableView.setModel(self.model)
- self.ui.tableView.setVerticalHeader(MathTexHeaderView(self.ui.tableView))
- header = self.ui.tableView.horizontalHeader()
- header.setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
-
- self.ui.residualVarianceValueLabel.setText(str(result.residualVariance))
diff --git a/statapp/ui/linear_polynom_window.ui b/statapp/ui/linear_polynom_window.ui
deleted file mode 100644
index 75cf5f3..0000000
--- a/statapp/ui/linear_polynom_window.ui
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
- LinearPolynomWindow
-
-
-
- 0
- 0
- 630
- 400
-
-
-
- Линейный полином
-
-
- -
-
-
-
-
-
- 40
-
-
- 40
-
-
- 40
-
-
-
- -
-
-
- 10
-
-
-
-
-
- Остаточная дисперсия:
-
-
-
- -
-
-
- undefined
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/statapp/ui/polynom_window.ui b/statapp/ui/polynom_window.ui
new file mode 100644
index 0000000..bd0a5b6
--- /dev/null
+++ b/statapp/ui/polynom_window.ui
@@ -0,0 +1,101 @@
+
+
+ PolynomWindow
+
+
+
+ 0
+ 0
+ 630
+ 400
+
+
+
+ Полином
+
+
+ -
+
+
-
+
+
+ 40
+
+
+ 40
+
+
+ 40
+
+
+
+ -
+
+
+ 10
+
+
-
+
+
+ undefined
+
+
+
+ -
+
+
+ undefined
+
+
+
+ -
+
+
+ F1 - отношение Фишера
+
+
+
+ -
+
+
+ Остаточная дисперсия:
+
+
+
+ -
+
+
+ Остаточная дисперсия (масштабированная):
+
+
+
+ -
+
+
+ Коэффициент множественной дереминизации
+
+
+
+ -
+
+
+ undefined
+
+
+
+ -
+
+
+ undefined
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/statapp/ui/squared_polynom_window.ui b/statapp/ui/squared_polynom_window.ui
deleted file mode 100644
index cafa563..0000000
--- a/statapp/ui/squared_polynom_window.ui
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
- SquaredPolynomWindow
-
-
-
- 0
- 0
- 630
- 400
-
-
-
- Квадратичный полином
-
-
- -
-
-
-
-
-
- -
-
-
- 10
-
-
-
-
-
- Остаточная дисперсия:
-
-
-
- -
-
-
- undefined
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/statapp/ui/ui_linear_polynom_window.py b/statapp/ui/ui_linear_polynom_window.py
deleted file mode 100644
index 9d76bac..0000000
--- a/statapp/ui/ui_linear_polynom_window.py
+++ /dev/null
@@ -1,82 +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 .
-#
-
-
-################################################################################
-## Form generated from reading UI file 'linear_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_LinearPolynomWindow(object):
- def setupUi(self, LinearPolynomWindow):
- if not LinearPolynomWindow.objectName():
- LinearPolynomWindow.setObjectName(u"LinearPolynomWindow")
- LinearPolynomWindow.resize(630, 400)
- self.gridLayout_2 = QGridLayout(LinearPolynomWindow)
- self.gridLayout_2.setObjectName(u"gridLayout_2")
- self.gridLayout = QGridLayout()
- self.gridLayout.setObjectName(u"gridLayout")
- self.tableView = QTableView(LinearPolynomWindow)
- 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, 0, 0, 1, 1)
-
- self.gridLayout_3 = QGridLayout()
- self.gridLayout_3.setObjectName(u"gridLayout_3")
- self.gridLayout_3.setContentsMargins(-1, 10, -1, -1)
- self.residualVarianceLabel = QLabel(LinearPolynomWindow)
- self.residualVarianceLabel.setObjectName(u"residualVarianceLabel")
-
- self.gridLayout_3.addWidget(self.residualVarianceLabel, 0, 0, 1, 1)
-
- self.residualVarianceValueLabel = QLabel(LinearPolynomWindow)
- self.residualVarianceValueLabel.setObjectName(u"residualVarianceValueLabel")
-
- self.gridLayout_3.addWidget(self.residualVarianceValueLabel, 0, 1, 1, 1)
-
-
- self.gridLayout.addLayout(self.gridLayout_3, 1, 0, 1, 1)
-
-
- self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
-
-
- self.retranslateUi(LinearPolynomWindow)
-
- QMetaObject.connectSlotsByName(LinearPolynomWindow)
- # setupUi
-
- def retranslateUi(self, LinearPolynomWindow):
- LinearPolynomWindow.setWindowTitle(QCoreApplication.translate("LinearPolynomWindow", u"\u041b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043f\u043e\u043b\u0438\u043d\u043e\u043c", None))
- self.residualVarianceLabel.setText(QCoreApplication.translate("LinearPolynomWindow", u"\u041e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f:", None))
- self.residualVarianceValueLabel.setText(QCoreApplication.translate("LinearPolynomWindow", u"undefined", None))
- # retranslateUi
diff --git a/statapp/ui/ui_polynom_window.py b/statapp/ui/ui_polynom_window.py
new file mode 100644
index 0000000..f30809b
--- /dev/null
+++ b/statapp/ui/ui_polynom_window.py
@@ -0,0 +1,118 @@
+# -*- 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 .
+#
+
+
+################################################################################
+## Form generated from reading UI file '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(630, 400)
+ self.gridLayout_2 = QGridLayout(PolynomWindow)
+ self.gridLayout_2.setObjectName(u"gridLayout_2")
+ 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, 0, 0, 1, 1)
+
+ 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.addLayout(self.polynomResult, 1, 0, 1, 1)
+
+
+ self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 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
diff --git a/statapp/ui/ui_squared_polynom_window.py b/statapp/ui/ui_squared_polynom_window.py
deleted file mode 100644
index f81373e..0000000
--- a/statapp/ui/ui_squared_polynom_window.py
+++ /dev/null
@@ -1,79 +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 .
-#
-
-
-################################################################################
-## Form generated from reading UI file 'squared_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_SquaredPolynomWindow(object):
- def setupUi(self, SquaredPolynomWindow):
- if not SquaredPolynomWindow.objectName():
- SquaredPolynomWindow.setObjectName(u"SquaredPolynomWindow")
- SquaredPolynomWindow.resize(630, 400)
- self.gridLayout_2 = QGridLayout(SquaredPolynomWindow)
- self.gridLayout_2.setObjectName(u"gridLayout_2")
- self.gridLayout = QGridLayout()
- self.gridLayout.setObjectName(u"gridLayout")
- self.tableView = QTableView(SquaredPolynomWindow)
- self.tableView.setObjectName(u"tableView")
-
- self.gridLayout.addWidget(self.tableView, 0, 0, 1, 1)
-
- self.gridLayout_3 = QGridLayout()
- self.gridLayout_3.setObjectName(u"gridLayout_3")
- self.gridLayout_3.setContentsMargins(-1, 10, -1, -1)
- self.residualVarianceLabel = QLabel(SquaredPolynomWindow)
- self.residualVarianceLabel.setObjectName(u"residualVarianceLabel")
-
- self.gridLayout_3.addWidget(self.residualVarianceLabel, 0, 0, 1, 1)
-
- self.residualVarianceValueLabel = QLabel(SquaredPolynomWindow)
- self.residualVarianceValueLabel.setObjectName(u"residualVarianceValueLabel")
-
- self.gridLayout_3.addWidget(self.residualVarianceValueLabel, 0, 1, 1, 1)
-
-
- self.gridLayout.addLayout(self.gridLayout_3, 1, 0, 1, 1)
-
-
- self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
-
-
- self.retranslateUi(SquaredPolynomWindow)
-
- QMetaObject.connectSlotsByName(SquaredPolynomWindow)
- # setupUi
-
- def retranslateUi(self, SquaredPolynomWindow):
- SquaredPolynomWindow.setWindowTitle(QCoreApplication.translate("SquaredPolynomWindow", u"\u041a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u0438\u043d\u043e\u043c", None))
- self.residualVarianceLabel.setText(QCoreApplication.translate("SquaredPolynomWindow", u"\u041e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f:", None))
- self.residualVarianceValueLabel.setText(QCoreApplication.translate("SquaredPolynomWindow", u"undefined", None))
- # retranslateUi