3e38fe09a87e6ef05289f3cbe6ffa03e2dc716e8,metric_learn/sdml.py,SDML_Supervised,fit,#SDML_Supervised#Any#Any#Any#,105
Before Change
num_classes = len(np.unique(labels))
num_constraints = 20 * num_classes**2
c = Constraints.random_subset(labels, self.params["num_labeled"],
random_state=random_state)
adj = c.adjacency_matrix(num_constraints, random_state=random_state)
return SDML.fit(self, X, adj)
After Change
self : object
Returns the instance.
y = check_array(y, ensure_2d=False)
num_constraints = self.num_constraints
if num_constraints is None:
num_classes = len(np.unique(y))
num_constraints = 20 * num_classes**2
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: metric-learn/metric-learn
Commit Name: 3e38fe09a87e6ef05289f3cbe6ffa03e2dc716e8
Time: 2017-03-02
Author: perimosocordiae@gmail.com
File Name: metric_learn/sdml.py
Class Name: SDML_Supervised
Method Name: fit
Project Name: metric-learn/metric-learn
Commit Name: 3e38fe09a87e6ef05289f3cbe6ffa03e2dc716e8
Time: 2017-03-02
Author: perimosocordiae@gmail.com
File Name: metric_learn/itml.py
Class Name: ITML_Supervised
Method Name: fit
Project Name: metric-learn/metric-learn
Commit Name: 3e38fe09a87e6ef05289f3cbe6ffa03e2dc716e8
Time: 2017-03-02
Author: perimosocordiae@gmail.com
File Name: metric_learn/lsml.py
Class Name: LSML_Supervised
Method Name: fit
Project Name: metric-learn/metric-learn
Commit Name: 3e38fe09a87e6ef05289f3cbe6ffa03e2dc716e8
Time: 2017-03-02
Author: perimosocordiae@gmail.com
File Name: metric_learn/sdml.py
Class Name: SDML
Method Name: _prepare_inputs