With the CircularValidation scorer we fit an estimator on the prediction of X_source i.e y_pred_source.
However some estimator only supports labels in [0, num_classes-1], which is not guaranteed.
Indeed for some iterations, ValueError were raised:
ValueError: Invalid classes inferred from unique values of 'y'. Expected: [0 1 2 3 4 5 6], got [1 2 3 4 7 8 9] Solution:
Re-encode the labels before feeding them to the estimator.
With the
CircularValidation
scorer we fit an estimator on the prediction of X_source i.e y_pred_source. However some estimator only supports labels in [0, num_classes-1], which is not guaranteed. Indeed for some iterations,ValueError
were raised:ValueError: Invalid classes inferred from unique values of 'y'. Expected: [0 1 2 3 4 5 6], got [1 2 3 4 7 8 9]
Solution: Re-encode the labels before feeding them to the estimator.