130cbadff294b686e466d430f26b2d069f6bbf59,metric_learn/mmc.py,_BaseMMC,_fit,#_BaseMMC#Any#Any#,69

Before Change



    // init metric
    if self.A0 is None:
      self.A_ = np.identity(pairs.shape[2])
      if not self.diagonal:
        // Don"t know why division by 10... it"s in the original code
        // and seems to affect the overall scale of the learned metric.
        self.A_ /= 10.0

After Change


    super(_BaseMMC, self).__init__(preprocessor)

  def _fit(self, pairs, y):
    if self.A0 != "deprecated":
      warnings.warn(""A0" parameter is not used."
                    " It has been deprecated in version 0.5.0 and will be"
                    "removed in 0.6.0. Use "init" instead.",
                    DeprecationWarning)
    pairs, y = self._prepare_inputs(pairs, y,
                                    type_of_inputs="tuples")

    if self.init is None:
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/mmc.py
Class Name: _BaseMMC
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/itml.py
Class Name: _BaseITML
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