130cbadff294b686e466d430f26b2d069f6bbf59,metric_learn/lsml.py,_BaseLSML,_fit,#_BaseLSML#Any#Any#,55

Before Change


      self.w_ = weights
    self.w_ /= self.w_.sum()  // weights must sum to 1
    if self.prior is None:
      X = np.vstack({tuple(row) for row in
                     quadruplets.reshape(-1, quadruplets.shape[2])})
      prior_inv = np.atleast_2d(np.cov(X, rowvar=False))
      M = np.linalg.inv(prior_inv)
    else:
      M = self.prior
      prior_inv = np.linalg.inv(self.prior)

After Change


      prior = "identity"
    else:
      prior = self.prior
    M, prior_inv = _initialize_metric_mahalanobis(quadruplets, prior,
                                                  return_inverse=True,
                                                  strict_pd=True,
                                                  matrix_name="prior")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: metric-learn/metric-learn
Commit Name: 130cbadff294b686e466d430f26b2d069f6bbf59
Time: 2019-06-07
Author: 31916524+wdevazelhes@users.noreply.github.com
File Name: metric_learn/lsml.py
Class Name: _BaseLSML
Method Name: _fit


Project Name: metric-learn/metric-learn
Commit Name: 130cbadff294b686e466d430f26b2d069f6bbf59
Time: 2019-06-07
Author: 31916524+wdevazelhes@users.noreply.github.com
File Name: metric_learn/sdml.py
Class Name: _BaseSDML
Method Name: _fit


Project Name: Rostlab/nalaf
Commit Name: edf49b4c7137e902763477f634da90fe038d6364
Time: 2017-01-13
Author: i@juanmi.rocks
File Name: nalaf/learning/lib/sklsvm.py
Class Name: SklSVM
Method Name: train