Skip to content
chkoar edited this page Jun 28, 2016 · 5 revisions

Pipeline

The pipeliine object offers a way to concatenate many of the objects in this module in a easy, pain-free way.

Example usage:

from imblearn.pipeline import make_pipeline
from imblearn.under_sampling import NearMiss
from imblearn.under_sampling import RepeatedEditedNearestNeighbours
from sklearn.datasets import load_iris
X, y = load_iris().data, load_iris().target
nm = NearMiss()
renn = RepeatedEditedNearestNeighbours()
pipeline = make_pipeline(nm, renn)
X_resampled, y_resampled = pipeline.fit_sample(X,y)
Clone this wiki locally