237e4335ca2927526e00e81456543da624e2ba31,pb_bss/distribution/vmfcacgmm.py,VMFCACGMM,_predict,#VMFCACGMM#,46
Before Change
)
affiliation = (
unsqueeze(np.log(self.weight), self.weight_constant_axis)
+ self.spatial_weight * cacg_log_pdf
+ self.spectral_weight * vmf_log_pdf
)
affiliation -= np.max(affiliation, axis=-2, keepdims=True)
np.exp(affiliation, out=affiliation)
denominator = np.maximum(
np.einsum("...kt->...t", affiliation)[..., None, :],
np.finfo(affiliation.dtype).tiny,
After Change
np.reshape(vmf_log_pdf, (num_classes, F, T)), (1, 0, 2)
)
if inline_permutation_alignment:
affiliation \
= log_pdf_to_affiliation_for_integration_models_with_inline_pa(
weight=unsqueeze(self.weight, self.weight_constant_axis),
spatial_log_pdf=self.spatial_weight * cacg_log_pdf,
spectral_log_pdf=self.spectral_weight * vmf_log_pdf,
)
else:
affiliation = log_pdf_to_affiliation(
weight=unsqueeze(self.weight, self.weight_constant_axis),
log_pdf=(
self.spatial_weight * cacg_log_pdf
+ self.spectral_weight * vmf_log_pdf
),
)
return affiliation, quadratic_form
class VMFCACGMMTrainer:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: fgnt/pb_bss
Commit Name: 237e4335ca2927526e00e81456543da624e2ba31
Time: 2019-08-08
Author: mail@lukas-drude.de
File Name: pb_bss/distribution/vmfcacgmm.py
Class Name: VMFCACGMM
Method Name: _predict
Project Name: fgnt/pb_bss
Commit Name: 237e4335ca2927526e00e81456543da624e2ba31
Time: 2019-08-08
Author: mail@lukas-drude.de
File Name: pb_bss/distribution/gcacgmm.py
Class Name: GCACGMM
Method Name: _predict
Project Name: suavecode/SUAVE
Commit Name: 0623ff0490b7558791a2f15f391fc47e8de2ed0f
Time: 2016-02-02
Author: jmvegh@stanford.edu
File Name: trunk/SUAVE/Methods/Power/Battery/Sizing/initialize_from_energy_and_power.py
Class Name:
Method Name: initialize_from_energy_and_power