Classifier

PoniardClassifier inherits from PoniardBaseEstimator, which sets up most of the funcionality, so you should probably read the those docs first.

source

PoniardClassifier

 PoniardClassifier (estimators:Union[Dict[str,sklearn.base.ClassifierMixin
                    ],Sequence[sklearn.base.ClassifierMixin],NoneType]=Non
                    e, metrics:Union[str,Dict[str,Callable],Sequence[str],
                    NoneType]=None, preprocess:bool=True, custom_preproces
                    sor:Union[NoneType,sklearn.pipeline.Pipeline,sklearn.b
                    ase.TransformerMixin]=None, cv:Union[int,sklearn.model
                    _selection._split.BaseCrossValidator,sklearn.model_sel
                    ection._split.BaseShuffleSplit,Sequence]=None,
                    verbose:int=0, random_state:Optional[int]=None,
                    n_jobs:Optional[int]=None,
                    plugins:Optional[Sequence[Any]]=None, plot_options:Opt
                    ional[poniard.plot.plot_factory.PoniardPlotFactory]=No
                    ne)

Cross validate multiple classifiers, rank them, fine tune them and ensemble them.

PoniardClassifier takes a list/dict of scikit-learn estimators and compares their performance on a list/dict of scikit-learn metrics using a predefined scikit-learn cross-validation strategy.

Type Default Details
estimators typing.Union[typing.Dict[str, sklearn.base.ClassifierMixin], typing.Sequence[sklearn.base.ClassifierMixin], NoneType] None Estimators to evaluate.
metrics typing.Union[str, typing.Dict[str, typing.Callable], typing.Sequence[str], NoneType] None Metrics to compute for each estimator. This is more restrictive than sklearn’s scoring
parameter, as it does not allow callable scorers. Single strings are cast to lists
automatically.
preprocess bool True If True, impute missing values, standard scale numeric data and one-hot or ordinal
encode categorical data.
custom_preprocessor typing.Union[NoneType, sklearn.pipeline.Pipeline, sklearn.base.TransformerMixin] None Preprocessor used instead of the default preprocessing pipeline. It must be able to be
included directly in a scikit-learn Pipeline.
cv typing.Union[int, sklearn.model_selection._split.BaseCrossValidator, sklearn.model_selection._split.BaseShuffleSplit, typing.Sequence] None Cross validation strategy. Either an integer, a scikit-learn cross validation object,
or an iterable.
verbose int 0 Verbosity level. Propagated to every scikit-learn function and estimator.
random_state typing.Optional[int] None RNG. Propagated to every scikit-learn function and estimator. The default None sets
random_state to 0 so that cross_validate results are comparable.
n_jobs typing.Optional[int] None Controls parallel processing. -1 uses all cores. Propagated to every scikit-learn
function.
plugins typing.Optional[typing.Sequence[typing.Any]] None Plugin instances that run in set moments of setup, fit and plotting.
plot_options typing.Optional[poniard.plot.plot_factory.PoniardPlotFactory] None :class:poniard.plot.plot_factory.PoniardPlotFactory instance specifying Plotly format
options or None, which sets the default factory.

PoniardClassifier implements PoniardClassifier._build_cv, PoniardClassifier._build_metrics and PoniardClassifier._default_estimators.


source

PoniardClassifier._build_cv

 PoniardClassifier._build_cv ()

source

PoniardClassifier._build_metrics

 PoniardClassifier._build_metrics ()

Build metrics.


source

PoniardClassifier._default_estimators

 PoniardClassifier._default_estimators ()