# 7. Collectors & Extractors — MIPLearn 0.3

# 7. Collectors & Extractors

## 7.1. miplearn.classifiers.minprob

class `miplearn.classifiers.minprob.``MinProbabilityClassifier`(base_clf: Any, thresholds: List[float], clone_fn: Callable[[Any], Any] = <function clone>)

  Bases: `sklearn.base.BaseEstimator`

  Meta-classifier that returns NaN for predictions made by a base classifier that have probability below a given threshold. More specifically, this meta-classifier calls base_clf.predict_proba and compares the result against the provided thresholds. If the probability for one of the classes is above its threshold, the meta-classifier returns that prediction. Otherwise, it returns NaN.

  `fit`(x: numpy.ndarray, y: numpy.ndarray) → None
  `predict`(x: numpy.ndarray) → numpy.ndarray

## 7.2. miplearn.classifiers.singleclass

class `miplearn.classifiers.singleclass.``SingleClassFix`(base_clf: sklearn.base.BaseEstimator, clone_fn: Callable = <function clone>)

  Bases: `sklearn.base.BaseEstimator`

  Some sklearn classifiers, such as logistic regression, have issues with datasets that contain a single class. This meta-classifier fixes the issue. If the training data contains a single class, this meta-classifier always returns that class as a prediction. Otherwise, it fits the provided base classifier, and returns its predictions instead.

  `fit`(x: numpy.ndarray, y: numpy.ndarray) → None
  `predict`(x: numpy.ndarray) → numpy.ndarray

## 7.3. miplearn.collectors.basic

class `miplearn.collectors.basic.``BasicCollector`(*, time_limit_sec: float = inf)

  Bases: `object`

  `collect`(filenames: List[str], build_model: Callable, n_jobs: int = 1, progress: bool = False) → None

## 7.4. miplearn.features.fields

## 7.5. miplearn.features.AlvLouWeh2017

6. Benchmark Problems 8. Components