Get a set of supported classifiers.

        Returns
        -------
        classifiers : {set}
            The set of supported classifiers.
481336
def _classifiers(self):
        

        # sklearn version < 0.18.0
        classifiers = (
            AdaBoostClassifier,
            BernoulliNB,
            DecisionTreeClassifier,
            ExtraTreesClassifier,
            GaussianNB,
            KNeighborsClassifier,
            LinearSVC,
            NuSVC,
            RandomForestClassifier,
            SVC,
        )

        # sklearn version >= 0.18.0
        if self.sklearn_ver[:2] >= (0, 18):
            from sklearn.neural_network.multilayer_perceptron \
                import MLPClassifier
            classifiers += (MLPClassifier, )

        return classifiers
1322462
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'classifier_id') and self.classifier_id is not None:
            _dict['classifier_id'] = self.classifier_id
        if hasattr(self, 'url') and self.url is not None:
            _dict['url'] = self.url
        if hasattr(self, 'collection') and self.collection is not None:
            _dict['collection'] = [x._to_dict() for x in self.collection]
        return _dict
1343585
def getVerifiersIDs(self):
        
        verifiers_ids = list()
        for brain in self.getAnalyses():
            verifiers_ids += brain.getVerificators
        return list(set(verifiers_ids))
1040133
def matchers() -> List[SimAlgorithm]:
        
        return [
            SimAlgorithm.PHENODIGM,
            SimAlgorithm.BAYES_NETWORK,
            SimAlgorithm.BAYES_VARIABLE,
            SimAlgorithm.NAIVE_BAYES_THREE_STATE,
            SimAlgorithm.NAIVE_BAYES_TWO_STATE,
            SimAlgorithm.NAIVE_BAYES_TWO_STATE_NO_BLANKET,
            SimAlgorithm.GRID,
            SimAlgorithm.GRID_NEGATED,
            SimAlgorithm.JACCARD,
            SimAlgorithm.MAX_INFORMATION
        ]
955172
def detect_converters(pattern: str,
                      converter_dict: Dict[str, Callable],
                      default: Callable = str):
    
    converters = {}
    for matched in VARS_PT.finditer(pattern):
        matchdict = matched.groupdict()
        varname = matchdict['varname']
        converter = matchdict['converter']
        converters[varname] = converter_dict.get(converter, default)
    return converters
68157
function GetFilters () {
  let result = []
  log.debug(`Fetching filters in the existing ${motionDetectors.length} detector(s)...`)
  for (let i in motionDetectors) {
    result = result.concat(motionDetectors[i].filters)
  }
  log.debug(`Getting ${result.length} filters...`)
  return result
}
1289012
def imported_classifiers_package(p: ecore.EPackage):
        """"""
        classes = {c for c in p.eClassifiers if isinstance(c, ecore.EClass)}

        references = itertools.chain(*(c.eAllReferences() for c in classes))
        references_types = (r.eType for r in references)
        imported = {c for c in references_types if getattr(c, 'ePackage', p) is not p}

        imported_dict = {}
        for classifier in imported:
            imported_dict.setdefault(classifier.ePackage, set()).add(classifier)

        return imported_dict
815688
def license_from_classifiers(self):
        
        if len(self.classifiers) > 0:
            for c in self.classifiers:
                if c.startswith("License"):
                    return c.split(" :: ")[-1]
309314
def selected_classification(self):
        
        item = self.lstClassifications.currentItem()
        try:
            return definition(item.data(QtCore.Qt.UserRole))
        except (AttributeError, NameError):
            return None
5539
def get_supported_services_uids(self, referencesample):
        
        uids = referencesample.getSupportedServices(only_uids=True)
        return list(set(uids))
224962
def get(self):
        

        pool = current_app.config['bigchain_pool']

        with pool() as bigchain:
            validators = bigchain.get_validators()

        return validators
130054
def _regressors(self):
        

        # sklearn version < 0.18.0
        regressors = ()

        # sklearn version >= 0.18.0
        if self.sklearn_ver[:2] >= (0, 18):
            from sklearn.neural_network.multilayer_perceptron \
                import MLPRegressor
            regressors += (MLPRegressor, )

        return regressors
490832
def _get_classifier(self, prefix):
        
        with self.name_scope():
            classifier = nn.Dense(2, prefix=prefix)
        return classifier
266452
def datasets(self, visible=True):
        
        if visible is not None:
            return filter(lambda x: x.isVisible(), self._datasets)
        return self._datasets[:]
1188457
def partition_version_classifiers(
        classifiers: t.Sequence[str], version_prefix: str = 'Programming Language :: Python :: ',
        only_suffix: str = ' :: Only') -> t.Tuple[t.List[str], t.List[str]]:
    """"""
    versions_min, versions_only = [], []
    for classifier in classifiers:
        version = classifier.replace(version_prefix, '')
        versions = versions_min
        if version.endswith(only_suffix):
            version = version.replace(only_suffix, '')
            versions = versions_only
        try:
            versions.append(tuple([int(_) for _ in version.split('.')]))
        except ValueError:
            pass
    return versions_min, versions_only
1114261
def features(self):
        
        if 'Features' in self._signature.subpackets:
            return next(iter(self._signature.subpackets['Features'])).flags
        return set()
426580
def get_subclasses(klass):
    
    stack = [klass]
    seen = set()
    while stack:
        klass = stack.pop()
        seen.add(klass)
        stack.extend(klass.__subclasses__())
    return seen