Skip to main content

ClassificationEngine.balance

ClassificationEngine.balance(split='train')

How many images each class has in a split, and how lopsided that is.

Public, and on the engine rather than only on the dataset, because it is the number every decision about this task’s metrics turned on - and the person who most needs it is the one who has just written a specification and not yet run anything.

An unlabelled split is refused rather than counted, which became reachable with pyplatypus#320: a test set of images alone counted this way reports every class at zero, never lists all of them, and labels_are_a_set reads False whatever the specification says - three readings that look like findings about a dataset and are findings about there being no labels. §4 of the workbench’s notes: a zero in a table is read as a result.

The sentence is this method’s own rather than _needs_labels’s, because that one says there is nothing to score against and is about asking a model for a number. This is a question about the data with no model in it, and the reading somebody needs here is the zero they would otherwise have believed.