sklearn_pmml_model.ensemble#

The sklearn_pmml_model.ensemble module includes ensemble-based methods for classification, regression and anomaly detection.

Submodules#

Package Contents#

Classes#

PMMLForestClassifier

A random forest classifier.

PMMLForestRegressor

A random forest regressor.

PMMLGradientBoostingClassifier

Gradient Boosting for classification.

PMMLGradientBoostingRegressor

Gradient Boosting for regression.

class sklearn_pmml_model.ensemble.PMMLForestClassifier(pmml, n_jobs=None)#

Bases: sklearn_pmml_model.base.IntegerEncodingMixin, sklearn_pmml_model.base.PMMLBaseClassifier, sklearn.ensemble.RandomForestClassifier

A random forest classifier.

A random forest is a meta estimator that fits a number of decision tree classifiers on various sub-samples of the dataset and uses averaging to improve the predictive accuracy and control over-fitting.

The PMML model consists out of a <Segmentation> element, that contains various <Segment> elements. Each segment contains it’s own <TreeModel>. For Random Forests, only segments with a <True/> predicate are supported.

Parameters:
pmmlstr, object

Filename or file object containing PMML data.

n_jobsint or None, optional (default=None)

The number of jobs to run in parallel for the predict method. None means 1 unless in a joblib.parallel_backend context. -1 means using all processors.

Notes

Specification: http://dmg.org/pmml/v4-3/MultipleModels.html

fit(x, y)#

Not supported: PMML models are already fitted.

_more_tags()#
class sklearn_pmml_model.ensemble.PMMLForestRegressor(pmml, n_jobs=None)#

Bases: sklearn_pmml_model.base.IntegerEncodingMixin, sklearn_pmml_model.base.PMMLBaseRegressor, sklearn.ensemble.RandomForestRegressor

A random forest regressor.

A random forest is a meta estimator that fits a number of decision tree classifiers on various sub-samples of the dataset and uses averaging to improve the predictive accuracy and control over-fitting.

The PMML model consists out of a <Segmentation> element, that contains various <Segment> elements. Each segment contains it’s own <TreeModel>. For Random Forests, only segments with a <True/> predicate are supported.

Parameters:
pmmlstr, object

Filename or file object containing PMML data.

n_jobsint or None, optional (default=None)

The number of jobs to run in parallel for the predict method. None means 1 unless in a joblib.parallel_backend context. -1 means using all processors.

Notes

Specification: http://dmg.org/pmml/v4-3/MultipleModels.html

fit(x, y)#

Not supported: PMML models are already fitted.

_more_tags()#
class sklearn_pmml_model.ensemble.PMMLGradientBoostingClassifier(pmml)#

Bases: sklearn_pmml_model.base.IntegerEncodingMixin, sklearn_pmml_model.base.PMMLBaseClassifier, sklearn.ensemble.GradientBoostingClassifier, abc.ABC

Gradient Boosting for classification.

GB builds an additive model in a forward stage-wise fashion; it allows for the optimization of arbitrary differentiable loss functions. In each stage n_classes_ regression trees are fit on the negative gradient of the binomial or multinomial deviance loss function. Binary classification is a special case where only a single regression tree is induced.

The PMML model consists out of a <Segmentation> element, that contains various <Segment> elements. Each segment contains it’s own <TreeModel>. For Gradient Boosting, only segments with a <True/> predicate are supported.

Parameters:
pmmlstr, object

Filename or file object containing PMML data.

Notes

Specification: http://dmg.org/pmml/v4-3/MultipleModels.html

fit(x, y)#

Not supported: PMML models are already fitted.

_raw_predict(x)#

Override to support categorical features.

_more_tags()#
class sklearn_pmml_model.ensemble.PMMLGradientBoostingRegressor(pmml)#

Bases: sklearn_pmml_model.base.IntegerEncodingMixin, sklearn_pmml_model.base.PMMLBaseRegressor, sklearn.ensemble.GradientBoostingRegressor, abc.ABC

Gradient Boosting for regression.

GB builds an additive model in a forward stage-wise fashion; it allows for the optimization of arbitrary differentiable loss functions. In each stage n_classes_ regression trees are fit on the negative gradient of the binomial or multinomial deviance loss function. Binary classification is a special case where only a single regression tree is induced.

The PMML model consists out of a <Segmentation> element, that contains various <Segment> elements. Each segment contains it’s own <TreeModel>. For Gradient Boosting, only segments with a <True/> predicate are supported.

Parameters:
pmmlstr, object

Filename or file object containing PMML data.

Notes

Specification: http://dmg.org/pmml/v4-3/MultipleModels.html

fit(x, y)#

Not supported: PMML models are already fitted.

_raw_predict(x)#

Override to support categorical features.

_more_tags()#