130cbadff294b686e466d430f26b2d069f6bbf59,metric_learn/mlkr.py,MLKR,fit,#MLKR#Any#Any#,85
Before Change
if A is None:
// initialize to PCA transformation matrix
// note: not the same as n_components=m !
A = PCA().fit(X).components_.T[:m]
elif A.shape != (m, d):
raise ValueError("A0 needs shape (%d,%d) but got %s" % (
m, d, A.shape))
After Change
if m is None:
m = d
// if the init is the default (identity), we raise a warning just in case
if self.init is None:
// TODO:
// replace init=None by init="auto" in v0.6.0 and remove the warning
msg = ("Warning, no init was set (`init=None`). As of version 0.5.0, "
"the default init will now be set to "auto", instead of "pca". "
"If you still want to use PCA as an init, set init="pca". "
"This warning will disappear in v0.6.0, and `init` parameter"s"
" default value will be set to "auto".")
warnings.warn(msg, ChangedBehaviorWarning)
init = "auto"
else:
init = self.init
A = _initialize_transformer(m, X, y, init=init,
random_state=self.random_state,
// MLKR works on regression targets:
has_classes=False)
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/mlkr.py
Class Name: MLKR
Method Name: fit
Project Name: nipy/dipy
Commit Name: 7885c7f254146ca7a78a6a0b50165e1f12ad529a
Time: 2016-06-24
Author: shahnawaz.ahmed95@gmail.com
File Name: dipy/reconst/ivim.py
Class Name:
Method Name: two_stage
Project Name: biolab/orange3
Commit Name: cdb5e9305ddcac7940caa9ee7532b80fa2f8c183
Time: 2017-05-12
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/projection/manifold.py
Class Name: MDS
Method Name: __call__