Skip to content

bin_and_custom_split only returns split test data #4

@henrymj

Description

@henrymj

X_train_all, X_test_all, y_train, y_test = train_test_split(xdata_train_binned,ydata_train_binned,stratify=ydata_train_binned)

values returned on this line get overwritten by the next line. It also doesn't use test_size, so you're not getting control of the train proportion.

Concerned this means that e.g. if you thought you trained on color and tested on orientation (from the docstring), you actually just trained and tested on orientation.

This is what we've changed it to temporarily offline:

X_train_all, _, y_train, _ = train_test_split(xdata_train_binned,ydata_train_binned,stratify=ydata_train_binned,test_size=test_size)
_, X_test_all, _, y_test = train_test_split(xdata_test_binned,ydata_test_binned,stratify=ydata_test_binned,test_size=test_size)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions