def fit(self, X, y=None, input_type='affinity'):
        """
        Fit the model from data in X.

        Parameters
        ----------
        input_type : string, one of: 'similarity', 'distance' or 'data'.
            The values of input data X. (default = 'data')
        X : array-like, shape (n_samples, n_features)
            Training vector, where n_samples in the number of samples
            and n_features is the number of features.

        If self.input_type is similarity:
        X : array-like, shape (n_samples, n_samples),
            copy the similarity matrix X to S.    
        """
        X = self._validate_input(X, input_type)
        self.fit_geometry(X, input_type)
        random_state = check_random_state(self.random_state)            
        self.embedding_, self.eigen_vectors_, self.P_ = spectral_clustering(self.geom_, K = self.K, 
                                                                   eigen_solver = self.eigen_solver, 
                                                                   random_state = self.random_state, 
                                                                   solver_kwds = self.solver_kwds,
                                                                   renormalize = self.renormalize,
                                                                   stabalize = self.stabalize,
                                                                   additional_vectors = self.additional_vectors)
Fit the model from data in X.

        Parameters
        ----------
        input_type : string, one of: 'similarity', 'distance' or 'data'.
            The values of input data X. (default = 'data')
        X : array-like, shape (n_samples, n_features)
            Training vector, where n_samples in the number of samples
            and n_features is the number of features.

        If self.input_type is similarity:
        X : array-like, shape (n_samples, n_samples),
            copy the similarity matrix X to S.