gw.training.train_builders.build_svd_for_embedding_network

gw.training.train_builders.build_svd_for_embedding_network(
    wfd,
    data_settings,
    asd_dataset_path,
    size,
    num_training_samples,
    num_validation_samples,
    num_workers=0,
    batch_size=1000,
    out_dir=None,
)

Construct SVD matrices V based on clean waveforms in each interferometer. These will be used to seed the weights of the initial projection part of the embedding network.

It first generates a number of training waveforms, and then produces the SVD.

Parameters

Name Type Description Default
wfd WaveformDataset required
data_settings dict required
asd_dataset_path str Training waveforms will be whitened with respect to these ASDs. required
size int Number of basis elements to include in the SVD projection. required
num_training_samples int required
num_validation_samples int required
num_workers int 0
batch_size int 1000
out_dir str SVD performance diagnostics are saved here. None

Returns

Name Type Description
list of numpy arrays The V matrices for each interferometer. They are ordered as in data_settings[ ‘detectors’].