f388923837f92a9de81b97898eadde495353331b,astroML/density_estimation/gauss_mixture.py,GaussianMixture1D,__init__,#GaussianMixture1D#,18

Before Change


        weight of component distributions (default = 1)
    
    def __init__(self, means=0, sigmas=1, weights=1):
        components = len(means)
        self._gmm = GaussianMixture(components, covariance_type="spherical")

        self._gmm.weights_ = weights / weights.sum()
        self._gmm.means_ = means.reshape(-1, 1)

After Change


        weight of component distributions (default = 1)
    
    def __init__(self, means=0, sigmas=1, weights=1):
        data = np.array([t for t in np.broadcast(means, sigmas, weights)])

        components = data.shape[0]
        self._gmm = GaussianMixture(components, covariance_type="spherical")

        self._gmm.means_ = data[:, :1]
        self._gmm.weights_ = data[:, 2] / data[:, 2].sum()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: astroML/astroML
Commit Name: f388923837f92a9de81b97898eadde495353331b
Time: 2018-11-16
Author: bsipocz@gmail.com
File Name: astroML/density_estimation/gauss_mixture.py
Class Name: GaussianMixture1D
Method Name: __init__


Project Name: Esri/raster-functions
Commit Name: b171c97f2974ef3f884ad9674de137eda7023875
Time: 2015-03-01
Author: akferoz@esri.com
File Name: functions/LinearSpectralUnmixing.py
Class Name: LinearSpectralUnmixing
Method Name: updateRasterInfo


Project Name: havakv/pycox
Commit Name: 1b3de6b301f962db0271fdad1bbb5036880b7fbc
Time: 2019-10-12
Author: haavard.kvamme@gmail..com
File Name: pycox/preprocessing/label_transforms.py
Class Name: LabTransPCHazard
Method Name: __init__