asreview.models.balance.base.BaseBalance.sample
- abstract BaseBalance.sample(X, y, train_idx)[source]
Resample the training data.
- Parameters
X (numpy.ndarray) – Complete feature matrix.
y (numpy.ndarray) – Labels for all papers.
train_idx (numpy.ndarray) – Training indices, that is all papers that have been reviewed.
- Returns
numpy.ndarray, numpy.ndarray – X_train, y_train: the resampled matrix, labels.