Beispiel #1
0
 def setup_classifiers(self):
     sttg = self.settings
     # processing channel, color channel
     for p_channel, c_channel in self.ch_mapping.iteritems():
         self.settings.set_section('Processing')
         if sttg.get2(self._resolve_name(p_channel, 'classification')):
             sttg.set_section('Classification')
             clf = CommonClassPredictor(
                 clf_dir=sttg.get2(self._resolve_name(p_channel,
                                                      'classification_envpath')),
                 name=p_channel,
                 channels=self._channel_regions(p_channel),
                 color_channel=c_channel)
             clf.importFromArff()
             clf.loadClassifier()
             self.classifiers[p_channel] = clf
Beispiel #2
0
 def setup_classifiers(self):
     sttg = self.settings
     # processing channel, color channel
     for p_channel, c_channel in self.ch_mapping.iteritems():
         self.settings.set_section('Processing')
         if sttg.get2(self._resolve_name(p_channel, 'classification')):
             sttg.set_section('Classification')
             clf = CommonClassPredictor(
                 clf_dir=sttg.get2(
                     self._resolve_name(p_channel,
                                        'classification_envpath')),
                 name=p_channel,
                 channels=self._channel_regions(p_channel),
                 color_channel=c_channel)
             clf.importFromArff()
             clf.loadClassifier()
             self.classifiers[p_channel] = clf
Beispiel #3
0
    def setup_classifiers(self):
        sttg = self.settings

        # processing channel, color channel
        for p_channel, c_channel in self.ch_mapping.iteritems():
            self.settings.set_section('Processing')
            if sttg.get2(self._resolve_name(p_channel, 'classification')):
                chreg = self._channel_regions(p_channel)
                if sttg("EventSelection", "unsupervised_event_selection"):
                    nclusters = sttg("EventSelection", "num_clusters")
                    self.classifiers[p_channel] = ClassDefinitionUnsup( \
                        nclusters, chreg)
                else:
                    sttg.set_section('Classification')
                    clf = CommonClassPredictor(
                        clf_dir=sttg.get2(self._resolve_name(p_channel,
                                                             'classification_envpath')),
                        name=p_channel,
                        channels=chreg,
                        color_channel=c_channel)
                    clf.importFromArff()
                    clf.loadClassifier()
                    self.classifiers[p_channel] = clf
Beispiel #4
0
    def setup_classifiers(self):
        sttg = self.settings

        # processing channel, color channel
        for p_channel, c_channel in self.ch_mapping.iteritems():
            self.settings.set_section('Processing')
            if sttg.get2(self._resolve_name(p_channel, 'classification')):
                chreg = self._channel_regions(p_channel)
                if sttg("EventSelection", "unsupervised_event_selection"):
                    nclusters = sttg("EventSelection", "num_clusters")
                    self.classifiers[p_channel] = ClassDefinitionUnsup( \
                        nclusters, chreg)
                else:
                    sttg.set_section('Classification')
                    clf = CommonClassPredictor(
                        clf_dir=sttg.get2(self._resolve_name(p_channel,
                                                             'classification_envpath')),
                        name=p_channel,
                        channels=chreg,
                        color_channel=c_channel)
                    clf.importFromArff()
                    clf.loadClassifier()
                    self.classifiers[p_channel] = clf