Notation

The following expressions are used in this document:

D

A Dataset type.

d

An object of type D

c

An integer, signifying a pattern class.

Refinement of

Dataset

Requirements

The requirements below are those in addition to Dataset requirements:

Name

Expression

Result Type

Semantics

Number of Classes

d.num_classes()

Integral Type

Returns the number of classes of patterns stored in the dataset. For example, a speech dataset in which each pattern is an example of either the word "yes" or "no" has two classes.

Class Training Samples

d.training_samples(c)

Range of indices

Returns a Range of indices of designated training samples for class c. For example, the speech dataset might have 5 samples of the word "yes", stored at indices 0-4 of the Random Access Range returned by d.gestures(). If the first two are to be used for training, then d.training_samples(c) might return a std::vector containing elements 0 and 1.

Class Testing Samples

d.testing_samples(c)

Range of indices

Returns a Range of indices of designated testing samples for class c. For example, the speech dataset might have 5 samples of the word "yes", stored at indices 0-4 of the Random Access Range returned by d.gestures(). If the last three are to be used for testing, then d.testing_samples(c) might return a std::vector containing elements 2, 3 and 4.