Closed mvargas33 closed 3 years ago
Besides my own TOC to remove warnings, this is related to #189
Merged, thanks!
@mvargas33 as we discussed informally, for the last category of warnings related to SCML, I would rather provide the n_basis
argument explicitly in all tests rather than adding a lot of lines of code to catch the warning like you have illustrated in test_triplets_classifiers.py
. If you have some time to address this, you could open a separate PR for this
@mvargas33 as we discussed informally, for the last category of warnings related to SCML, I would rather provide the
n_basis
argument explicitly in all tests rather than adding a lot of lines of code to catch the warning like you have illustrated intest_triplets_classifiers.py
. If you have some time to address this, you could open a separate PR for this
Wiil do, in a separate PR. I agree this try/catch is an overkill and makes the code more illegible.
First warning
Solution: Replace np.int for np.int64 for more precision
Second warning
Solution: Do a refactor to get the same result. The above is equivalent to:
X = np.unique(np.vstack(input), axis=0)
Made a little script to verify the behaviour. Also, all tests pass.
/metric-learn/test/test_utils.py:1070: PytestUnknownMarkWarning: Unknown pytest.mark.unit - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html @pytest.mark.unit
/metric-learn/venv/lib/python3.8/site-packages/sklearn/utils/deprecation.py:87: FutureWarning: Function assert_warns_message is deprecated;
assert_warns_message
is deprecated in 1.0 and will be removed in 1.2.Usepytest.warns
instead. warnings.warn(msg, category=FutureWarning)/metric-learn/metric_learn/rca.py:115: FutureWarning:
rcond
parameter will change to the default of machine precision timesmax(M, N)
where M and N are the input matrix dimensions. To use the future default and silence this warning we advise to passrcond=None
, to keep using the old, explicitly passrcond=-1
. tmp = np.linalg.lstsq(total_cov, inner_cov)[0]/metric_learn/scml.py:235: UserWarning: As no value for
n_basis
was selected, the number of basis will be set to n_basis= 320 warnings.warn('As no value forn_basis
was selected, the number of '