:py:mod:`sklearn_pmml_model.ensemble` ===================================== .. py:module:: sklearn_pmml_model.ensemble .. autoapi-nested-parse:: The :mod:`sklearn_pmml_model.ensemble` module includes ensemble-based methods for classification, regression and anomaly detection. .. !! processed by numpydoc !! Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 forest/index.rst gb/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: sklearn_pmml_model.ensemble.PMMLForestClassifier sklearn_pmml_model.ensemble.PMMLForestRegressor sklearn_pmml_model.ensemble.PMMLGradientBoostingClassifier sklearn_pmml_model.ensemble.PMMLGradientBoostingRegressor .. py:class:: PMMLForestClassifier(pmml, n_jobs=None) Bases: :py:obj:`sklearn_pmml_model.base.IntegerEncodingMixin`, :py:obj:`sklearn_pmml_model.base.PMMLBaseClassifier`, :py:obj:`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 element, that contains various elements. Each segment contains it's own . For Random Forests, only segments with a predicate are supported. :Parameters: **pmml** : str, object Filename or file object containing PMML data. **n_jobs** : int or None, optional (default=None) The number of jobs to run in parallel for the `predict` method. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. .. rubric:: Notes Specification: http://dmg.org/pmml/v4-3/MultipleModels.html .. !! processed by numpydoc !! .. py:method:: fit(x, y) Not supported: PMML models are already fitted. .. !! processed by numpydoc !! .. py:method:: _more_tags() .. py:class:: PMMLForestRegressor(pmml, n_jobs=None) Bases: :py:obj:`sklearn_pmml_model.base.IntegerEncodingMixin`, :py:obj:`sklearn_pmml_model.base.PMMLBaseRegressor`, :py:obj:`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 element, that contains various elements. Each segment contains it's own . For Random Forests, only segments with a predicate are supported. :Parameters: **pmml** : str, object Filename or file object containing PMML data. **n_jobs** : int or None, optional (default=None) The number of jobs to run in parallel for the `predict` method. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. .. rubric:: Notes Specification: http://dmg.org/pmml/v4-3/MultipleModels.html .. !! processed by numpydoc !! .. py:method:: fit(x, y) Not supported: PMML models are already fitted. .. !! processed by numpydoc !! .. py:method:: _more_tags() .. py:class:: PMMLGradientBoostingClassifier(pmml) Bases: :py:obj:`sklearn_pmml_model.base.IntegerEncodingMixin`, :py:obj:`sklearn_pmml_model.base.PMMLBaseClassifier`, :py:obj:`sklearn.ensemble.GradientBoostingClassifier`, :py:obj:`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 element, that contains various elements. Each segment contains it's own . For Gradient Boosting, only segments with a predicate are supported. :Parameters: **pmml** : str, object Filename or file object containing PMML data. .. rubric:: Notes Specification: http://dmg.org/pmml/v4-3/MultipleModels.html .. !! processed by numpydoc !! .. py:method:: fit(x, y) Not supported: PMML models are already fitted. .. !! processed by numpydoc !! .. py:method:: _raw_predict(x) Override to support categorical features. .. !! processed by numpydoc !! .. py:method:: _more_tags() .. py:class:: PMMLGradientBoostingRegressor(pmml) Bases: :py:obj:`sklearn_pmml_model.base.IntegerEncodingMixin`, :py:obj:`sklearn_pmml_model.base.PMMLBaseRegressor`, :py:obj:`sklearn.ensemble.GradientBoostingRegressor`, :py:obj:`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 element, that contains various elements. Each segment contains it's own . For Gradient Boosting, only segments with a predicate are supported. :Parameters: **pmml** : str, object Filename or file object containing PMML data. .. rubric:: Notes Specification: http://dmg.org/pmml/v4-3/MultipleModels.html .. !! processed by numpydoc !! .. py:method:: fit(x, y) Not supported: PMML models are already fitted. .. !! processed by numpydoc !! .. py:method:: _raw_predict(x) Override to support categorical features. .. !! processed by numpydoc !! .. py:method:: _more_tags()