130cbadff294b686e466d430f26b2d069f6bbf59,metric_learn/itml.py,_BaseITML,_fit,#_BaseITML#Any#Any#Any#,64
Before Change
self.bounds_[self.bounds_ == 0] = 1e-9
// init metric
if self.A0 is None:
A = np.identity(pairs.shape[2])
else:
A = check_array(self.A0, copy=True)
gamma = self.gamma
pos_pairs, neg_pairs = pairs[y == 1], pairs[y == -1]
After Change
self.bounds_[self.bounds_ == 0] = 1e-9
// set the prior
// pairs will be deduplicated into X two times, TODO: avoid that
A = _initialize_metric_mahalanobis(pairs, self.prior, self.random_state,
strict_pd=True,
matrix_name="prior")
gamma = self.gamma
pos_pairs, neg_pairs = pairs[y == 1], pairs[y == -1]
num_pos = len(pos_pairs)
num_neg = len(neg_pairs)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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/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/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/sdml.py
Class Name: _BaseSDML
Method Name: _fit