Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It might be useful to have named samples for debugging and exploring the data, e.g. identifying outliers.
Comments:
sample_names
(andfeature_names
) returning a non-empty vector even if the names for the samples are not set? As it is, whensample_names
is empty, it returnsvec!["sample-1", "sample-2",..,"sample-{nsamples}"]
. The same happens forfeature_names
. However, in some methods where new dataset are created transforming the input dataset, the output datasets have a non emptysample_names
field even if the input dataset has an emptysample_names
field. For instance, it happens for the preprocessing methods. An alternative choice could be to make public thefeature_names
and thesample_names
fields (as for theweights
field), and to clone them if needed.test_retain_sample_names
for the preprocessing methods. Is it ok?with_feature_names
does not check if the given vector has length nfeatures. Do you want to implement it in this PR, as I have done forwith_sample_names
?