#NEWLINE# def fit( self , X , y = None , input_type = 'data' ) : #NEWLINE# #INDENT# "Fit the model from data in X.\n\n        Parameters\n        ----------\n        input_type : string, one of: 'data', 'distance'.\n            The values of input data X. (default = 'data')\n        X : array-like, shape (n_samples, n_features)\n            Training vector, where n_samples in the number of samples\n            and n_features is the number of features.\n\n        If self.input_type is 'distance':\n\n        X : array-like, shape (n_samples, n_samples),\n            Interpret X as precomputed distance or adjacency graph\n            computed from samples.\n\n        Returns\n        -------\n        self : object\n            Returns the instance itself.\n        " #NEWLINE# X = self . _validate_input ( X , input_type ) #NEWLINE# self . fit_geometry ( X , input_type ) #NEWLINE# random_state = check_random_state ( self . random_state ) #NEWLINE# ( self . embedding_ , self . error_ ) = locally_linear_embedding ( self . geom_ , n_components = self . n_components , eigen_solver = self . eigen_solver , tol = self . tol , random_state = self . random_state , reg = self . reg , max_iter = self . max_iter ) #NEWLINE# return self