mirror of
https://github.com/shizand/statapp.git
synced 2025-10-30 19:57:12 +03:00
@@ -17,15 +17,18 @@
|
||||
# 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 QModelIndex
|
||||
|
||||
from statapp.calculations import RegressionResult
|
||||
from statapp.models.ro_table_model import ROTableModel
|
||||
|
||||
|
||||
class LinearPolynomModel(ROTableModel):
|
||||
class RegressionResultModel(ROTableModel):
|
||||
def __init__(self, result: RegressionResult):
|
||||
data = result.paramsAndImportance
|
||||
super().__init__(data)
|
||||
self._monomials = result.monomials
|
||||
|
||||
def getHorizontalHeader(self):
|
||||
return ['Коэффициент регрессии', 'Коэффициент значимости']
|
||||
|
||||
def getVerticalHeader(self):
|
||||
count = (self.rowCount(QModelIndex()))
|
||||
return ['Свободный член'] + [f'X{i}' for i in range(1, count)]
|
||||
return self._monomials
|
||||
@@ -18,4 +18,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
def yxHeader(count):
|
||||
return ['Y'] + [f'X{i}' for i in range(1, count)]
|
||||
return ['y'] + [f'x{i}' for i in range(1, count)]
|
||||
|
||||
Reference in New Issue
Block a user