vak.datasets.frame_classification.window_dataset#

A dataset class used for neural network models with the frame classification task, where the source data consists of audio signals or spectrograms of varying lengths.

Unlike vak.datasets.frame_classification.FramesDataset, this class does not return entire samples from the source dataset. Instead each paired samples \((x_i, y_i)\) returned by this dataset class consists of a window \(x_i\) of fixed length \(w\) from the underlying data X of total length \(T\). Each \(y_i\) is a vector of the same size \(w\), containing an integer class label for each frame in the window \(x_i\). The entire dataset consists of some number of windows \(I\) determined by a stride parameter \(s\), \(I = (T - w) / s\).

Functions

get_window_inds(n_frames, window_size[, stride])

Get indices of windows for a WindowDataset, given the number of frames in the dataset, the window size, and the stride.

Classes

WindowDataset(dataset_path, dataset_df, ...)

Dataset used for training neural network models on the frame classification task, where the source data consists of audio signals or spectrograms of varying lengths.