def _populate_tables(self, factors=None, backbones=None, reset=False):
     self.table_factors.clear()
     self.table_backbones.clear()
     self.send(Output.RELATION, None)
     if factors or reset:
         for otype, matrices in factors or self.fuser.factors_.items():
             M = matrices[0]
             self.table_factors.add(
                 ((rel_shape(M.data), (M, otype, None)), otype.name),
                 bold=(1, ))
     if backbones or reset:
         for relation, matrices in backbones or self.fuser.backbones_.items(
         ):
             M = matrices[0]
             self.table_backbones.add([(rel_shape(M.data),
                                        (M, None, None))] +
                                      rel_cols(relation),
                                      bold=(1, 3))
     if reset:
         self.table_completions.clear()
         self.table_completions.setRowCount(0)
         for relation, matrices in self.fuser.backbones_.items():
             M = self.fuser.complete(relation)
             self.table_completions.add(
                 [(rel_shape(M.data),
                   (M, relation.row_type, relation.col_type))] +
                 rel_cols(relation),
                 bold=(1, 3))
Пример #2
0
 def update_table(self):
     self.model.wrap([
         ([rel, rel_shape(rel.data)] + rel_cols(rel) +
          ['(not masked)' if not np.ma.is_masked(rel.data) else ''])
         for rel in self.relations
     ])
     self.table.hideColumn(0)
 def update_table(self):
     self.table.clear()
     for rel in self.relations:
         self.table.add(
             [(rel_shape(rel.data), rel)] + rel_cols(rel) +
             [('(not masked)' if not np.ma.is_masked(rel.data) else '')],
             bold=(1, 3))
Пример #4
0
 def update_table(self):
     self.table.clear()
     for rel in self.relations:
         self.table.addRow([rel_shape(rel.data)]
                           + rel_cols(rel)
                           + ['(not masked)' if not np.ma.is_masked(rel.data) else ''],
                           data=rel)
 def _populate_tables(self, factors=None, backbones=None, reset=False):
     if not self.fuser: return
     self.table_factors.clear()
     self.table_backbones.clear()
     self.send(Output.RELATION, None)
     if factors or reset:
         for otype, matrices in factors or self.fuser.factors_.items():
             M = matrices[0]
             self.table_factors.addRow((rel_shape(M.data), otype.name), data=(M, otype, None))
     if backbones or reset:
         for relation, matrices in backbones or self.fuser.backbones_.items():
             M = matrices[0]
             self.table_backbones.addRow([rel_shape(M.data)] + rel_cols(relation), data=(M, None, None))
     if reset:
         self.table_completions.clear()
         for rel, matrices in self.fuser.backbones_.items():
             M = self.fuser.complete(rel)
             self.table_completions.addRow([rel_shape(M.data)] + rel_cols(rel), data=(M, rel.row_type, rel.col_type))
 def _populate_tables(self, factors=None, backbones=None, reset=False):
     if not self.fuser: return
     self.model_factors.clear()
     self.model_backbones.clear()
     self.Outputs.relation.send(None)
     if factors or reset:
         for otype, matrices in factors or self.fuser.factors_.items():
             M = matrices[0]
             self.model_factors.append([(M, otype, None), rel_shape(M.data), otype.name])
         self.table_factors.hideColumn(0)
     if backbones or reset:
         for relation, matrices in backbones or self.fuser.backbones_.items():
             M = matrices[0]
             self.model_backbones.append([(M, None, None), rel_shape(M.data)] + rel_cols(relation))
         self.table_backbones.hideColumn(0)
     if reset:
         self.model_completions.clear()
         for rel, matrices in self.fuser.backbones_.items():
             M = self.fuser.complete(rel)
             self.model_completions.append([(M, rel.row_type, rel.col_type), rel_shape(M.data)] + rel_cols(rel))
         self.table_completions.hideColumn(0)
 def update_table(self):
     self.model.wrap([([rel, rel_shape(rel.data)] +
                       rel_cols(rel) +
                       ['(not masked)' if not np.ma.is_masked(rel.data) else ''])
                      for rel in self.relations])
     self.table.hideColumn(0)