Ejemplo n.º 1
0
    def __init__(self, items, indices, classes, title="", exclude_training_data=True, *args, **kw):
        super(BoxPlot, self).__init__(*args, **kw)
        loadUI(splitext(__file__)[0]+'.ui', self)
        self.setWindowTitle(title)
        self._exclude_td = exclude_training_data

        self._tabs = dict()
        self._items = items

        values = lambda: defaultdict(list)
        data = defaultdict(values)

        for ch, idx in indices.iteritems():
            for item in self._items:
                if self._exclude_td and item.isTrainingSample():
                    continue
                value = item.features[idx]
                data[item.treatment][item.class_.name].append(value)

            self._plot(cn.from_abreviation(ch), title, data, classes)
Ejemplo n.º 2
0
 def setChannelNames(self, channels, colors):
     self.colors = colors
     self.enhancer.clear()
     for channel in channels:
         self.enhancer.addChannel(cn.display(channel), no_auto_button=True)
Ejemplo n.º 3
0
 def setChannelNames(self, channels, colors):
     self.colors = colors
     self.enhancer.clear()
     for channel in channels:
         self.enhancer.addChannel(cn.display(channel), no_auto_button=True)
Ejemplo n.º 4
0
 def setChannelNames(self, channels, colors):
     self.enhancer.clear()
     for channel, color in zip(channels, colors):
         self.enhancer.addChannel(cn.display(channel), color,
                                  no_auto_button=True)