def __init__(self, k=3, min_iter=50, max_iter=1000, learn_rate=1e-7,
               regularization=0.5, convergence_tol=0.001, use_pca=True,
               verbose=False, preprocessor=None):
    """Initialize the LMNN object.

    Parameters
    ----------
    k : int, optional
        Number of neighbors to consider, not including self-edges.

    regularization: float, optional
        Weighting of pull and push terms, with 0.5 meaning equal weight.

    preprocessor : array-like, shape=(n_samples, n_features) or callable
        The preprocessor to call to get tuples from indices. If array-like,
        tuples will be formed like this: X[indices].
    """
    self.k = k
    self.min_iter = min_iter
    self.max_iter = max_iter
    self.learn_rate = learn_rate
    self.regularization = regularization
    self.convergence_tol = convergence_tol
    self.use_pca = use_pca
    self.verbose = verbose
    super(_base_LMNN, self).__init__(preprocessor)
def __init__ ( self , k = 3 , min_iter = 50 , max_iter = 1000 , learn_rate = 1e-7 , regularization = 0.5 , convergence_tol = 0.001 , use_pca = True , verbose = False , preprocessor = None ) : self . k = k self . min_iter = min_iter self . max_iter = max_iter self . learn_rate = learn_rate self . regularization = regularization self . convergence_tol = convergence_tol self . use_pca = use_pca self . verbose = verbose super ( _base_LMNN , self ) . __init__ ( preprocessor )
Initialize the LMNN object.

    Parameters
    ----------
    k : int, optional
        Number of neighbors to consider, not including self-edges.

    regularization: float, optional
        Weighting of pull and push terms, with 0.5 meaning equal weight.

    preprocessor : array-like, shape=(n_samples, n_features) or callable
        The preprocessor to call to get tuples from indices. If array-like,
        tuples will be formed like this: X[indices].