b27721ab556fabb2a7e7fcb223ec1f9f6eb4418d,nt/speech_enhancement/beamformer.py,,get_pca_vector,#Any#,31

Before Change


    beamforming_vector = np.empty((bins, sensors), dtype=np.complex)
    for f in range(bins):
        eigenvals, eigenvecs = eigh(target_psd_matrix[f, :, :])
        beamforming_vector[f, :] = eigenvecs[:, np.argmax(eigenvals)]
    return beamforming_vector

After Change


    // Calculate eigenvals/vecs
    eigenvals, eigenvecs = np.linalg.eigh(target_psd_matrix)
    // Find max eigenvals
    vals = np.argmax(eigenvals, axis=-1)
    // Select eigenvec for max eigenval
    beamforming_vector = np.array([eigenvecs[i, :, vals[i]] for i in range(eigenvals.shape[0])])
    // Reconstruct original shape
    beamforming_vector = np.reshape(beamforming_vector, shape[:-1])

    return beamforming_vector

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: fgnt/pb_bss
Commit Name: b27721ab556fabb2a7e7fcb223ec1f9f6eb4418d
Time: 2015-10-07
Author: cbj@mail.uni-paderborn.de
File Name: nt/speech_enhancement/beamformer.py
Class Name:
Method Name: get_pca_vector


Project Name: yahoo/TensorFlowOnSpark
Commit Name: 981e4266d4ea816b08a762193bd52f40cd1a3242
Time: 2019-08-07
Author: leewyang@verizonmedia.com
File Name: examples/mnist/keras/mnist_inference.py
Class Name:
Method Name: inference


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 3a31e08ac9b885b8733656a67d53f817798c3fee
Time: 2017-07-13
Author: valentina.zantedeschi@ibm.com
File Name: src/attackers/deepfool.py
Class Name: DeepFool
Method Name: generate