0
$\begingroup$

Is there a pythonic way to carry around metadata that describes the training examples, such that it preserves (i.e., order) after shuffling and splitting (train/test)?

X = np.array([[1,2,3],[4,5,6]]) # examples
y = [0,1] # labels
meta = ["Hot day", "Cold day"] # metadata
$\endgroup$

1 Answer 1

1
$\begingroup$

The shuffle function in sklearn.utils shuffles arrays or sparse matrices in a consistent way.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.