ertk.dataset.write_features

ertk.dataset.write_features(path: PathLike | str, features: Iterable[ndarray] | ndarray, names: List[str], corpus: str = '', feature_names: List[str] = [], slices: ndarray | List[int] | None = None, **kwargs) None

Convenience function to write features to given path.

Parameters:
pathPathOrStr

Path to write features to.

featuresUnion[Iterable[np.ndarray], np.ndarray]

Features to write. If a 3D array is given, the dimensions are assumed to be (instances, frames, features). If a 2D array is given, the dimensions are assumed to be (frames, features), and the slices parameter is required. If an iterable of arrays is given, each 1D or 2D array is assumed to be a single instance.

namesList[str]

Instance names.

corpusstr

Name of corpus. Default is empty string.

feature_namesList[str]

Feature names.

slicesUnion[np.ndarray, List[int]], optional

Number of frames per instance. Only required if a 2D matrix is given, and the first dimension is different than the number of instances.