logo
  • Getting Started
  • User Guide
  • API reference
  • Examples
  • Release history
  • About us
logo

Version 0.8.0.dev0

Edit this page

imblearn.under_sampling.TomekLinks.fit_resample¶

TomekLinks.fit_resample(X, y)[source]¶

Resample the dataset.

Parameters
X{array-like, dataframe, sparse matrix} of shape (n_samples, n_features)

Matrix containing the data which have to be sampled.

yarray-like of shape (n_samples,)

Corresponding label for each sample in X.

Returns
X_resampled{array-like, dataframe, sparse matrix} of shape (n_samples_new, n_features)

The array containing the resampled data.

y_resampledarray-like of shape (n_samples_new,)

The corresponding label of X_resampled.

© Copyright 2014-2021, The imbalanced-learn developers.
Created using Sphinx 3.5.0.