Supervised Learning

https://github.com/INGEOTEC/IngeoML/actions/workflows/test.yaml/badge.svg https://coveralls.io/repos/github/INGEOTEC/IngeoML/badge.svg?branch=develop https://badge.fury.io/py/IngeoML.svg https://readthedocs.org/projects/ingeoml/badge/?version=latest

IngeoML.supervised_learning API

class ConvexClassifier[source]

ConvexClassifier combines the probabilities predicted by base classifiers in a convex manner. It is designed to work alongside with StackingClassifier.

>>> from sklearn.datasets import load_iris
>>> from sklearn.svm import LinearSVC
>>> from sklearn.ensemble import RandomForestClassifier
>>> from sklearn.ensemble import StackingClassifier
>>> from IngeoML import ConvexClassifier
>>> X, y = load_iris(return_X_y=True)
>>> svc = LinearSVC()
>>> forest = RandomForestClassifier()
>>> convex = ConvexClassifier()
>>> stack = StackingClassifier([('SVC', svc),
                                 ('Forest', forest)],
                                final_estimator=convex).fit(X, y)
>>> stack.final_estimator_.mixer
array([0.01783184, 0.98216816])
property mixer

Convex combination

__new__(**kwargs)
__init__()
fit(X: ndarray, y: ndarray)[source]

Estimate the parameters given the dataset (X and y)

predict_proba(X)[source]

Predict class probabilities

predict(X)[source]

Predict the classes