@@ -63,15 +63,17 @@ class RCA(MahalanobisMixin, TransformerMixin):
6363 Examples
6464 --------
6565 >>> from metric_learn import RCA
66- >>> pairs = [[[1.2, 7.5], [1.3, 1.5]],
67- >>> [[6.4, 2.6], [6.2, 9.7]],
68- >>> [[1.3, 4.5], [3.2, 4.6]],
69- >>> [[6.2, 5.5], [5.4, 5.4]]]
70- >>> y = [1, 1, -1, -1]
71- >>> # in this task we want points where the first feature is close to be
72- >>> # closer to each other, no matter how close the second feature is
66+ >>> X = [[1.2, 7.5], [1.3, 1.5],
67+ >>> [6.4, 2.6], [6.2, 9.7],
68+ >>> [1.3, 4.5], [3.2, 4.6],
69+ >>> [6.2, 5.5], [5.4, 5.4]]
70+ >>> chunks = [1, 1, 2, 2, 3, 3, 4, 4]
71+ >>> # in this task we want points that belong to the same class as indicated
72+ >>> # by chunks but not necesarily assest which chunks belong to which class,
73+ >>> # for example, 1 & 3 could belong to one class while 2 & 4 could belong
74+ >>> # to the other
7375 >>> rca = RCA()
74- >>> rca.fit(pairs, y )
76+ >>> rca.fit(X, chunks )
7577
7678 References
7779 ------------------
0 commit comments