gw.dataset.generate_dataset.train_svd_basis

gw.dataset.generate_dataset.train_svd_basis(dataset, size, n_train)

Train (and optionally validate) an SVD basis.

Parameters

Name Type Description Default
dataset WaveformDataset Contains waveforms to be used for building SVD. required
size int Number of elements to keep for the SVD basis. required
n_train int Number of training waveforms to use. Remaining are used for validation. Note that the actual number of training waveforms is n_train * len(polarizations), since there is one waveform used for each polarization. required

Returns

Name Type Description
(SVDBasis, n_train, n_test) Since EOB waveforms can fail to generate, provide also the number used in training and validation.