@@ -20,12 +20,12 @@ class Constraints(object):
2020 Parameters
2121 ----------
2222 partial_labels : `numpy.ndarray` of ints, shape=(n_samples,)
23- Array of labels, with -1 indicating unknown label.
23+ Array of labels, with -1 indicating unknown label.
2424
2525 Attributes
2626 ----------
2727 partial_labels : `numpy.ndarray` of ints, shape=(n_samples,)
28- Array of labels, with -1 indicating unknown label.
28+ Array of labels, with -1 indicating unknown label.
2929 """
3030
3131 def __init__ (self , partial_labels ):
@@ -46,26 +46,29 @@ def positive_negative_pairs(self, num_constraints, same_length=False,
4646
4747 Parameters
4848 ----------
49- num_constraints : int
50- Number of positive and negative constraints to generate.
51- same_length : bool, optional (default=False)
52- If True, forces the number of positive and negative pairs to be
53- equal by ignoring some pairs from the larger set.
54- random_state : int or numpy.RandomState or None, optional (default=None)
55- A pseudo random number generator object or a seed for it if int.
49+ num_constraints : int
50+ Number of positive and negative constraints to generate.
51+
52+ same_length : bool, optional (default=False)
53+ If True, forces the number of positive and negative pairs to be
54+ equal by ignoring some pairs from the larger set.
55+
56+ random_state : int or numpy.RandomState or None, optional (default=None)
57+ A pseudo random number generator object or a seed for it if int.
58+
5659 Returns
5760 -------
5861 a : array-like, shape=(n_constraints,)
59- 1D array of indicators for the left elements of positive pairs.
62+ 1D array of indicators for the left elements of positive pairs.
6063
6164 b : array-like, shape=(n_constraints,)
62- 1D array of indicators for the right elements of positive pairs.
65+ 1D array of indicators for the right elements of positive pairs.
6366
6467 c : array-like, shape=(n_constraints,)
65- 1D array of indicators for the left elements of negative pairs.
68+ 1D array of indicators for the left elements of negative pairs.
6669
6770 d : array-like, shape=(n_constraints,)
68- 1D array of indicators for the right elements of negative pairs.
71+ 1D array of indicators for the right elements of negative pairs.
6972 """
7073 random_state = check_random_state (random_state )
7174 a , b = self ._pairs (num_constraints , same_label = True ,
0 commit comments