class_docstr: Linear Discriminant Analysis Class
  
  Parameters
  ----------
  n_discriminants : int (default: None)
      The number of discrimants for transformation.
      Keeps the original dimensions of the dataset if `None`.
  
  Attributes
  ----------
  w_ : array-like, shape=[n_features, n_discriminants]
      Projection matrix
  e_vals_ : array-like, shape=[n_features]
      Eigenvalues in sorted order.
  e_vecs_ : array-like, shape=[n_features]
     Eigenvectors in sorted order.
  
  Examples
  -----------
  For usage examples, please see
  https://rasbt.github.io/mlxtend/user_guide/feature_extraction/LinearDiscriminantAnalysis/
class_docstr_tok: ["Linear","Discriminant","Analysis","Class","Parameters","--","--","--","--","--","n_discriminants",":","int","(","default",":","None",")","The","number","of","discrimants","for","transformation",".","Keeps","the","original","dimensions","of","the","dataset","if","`","None","`",".","Attributes","--","--","--","--","--","w_",":","array-like",",","shape=","[","n_features",",","n_discriminants","]","Projection","matrix","e_vals_",":","array-like",",","shape=","[","n_features","]","Eigenvalues","in","sorted","order",".","e_vecs_",":","array-like",",","shape=","[","n_features","]","Eigenvectors","in","sorted","order",".","Examples","--","--","--","--","--","-","For","usage","examples",",","please","see","https",":","\/\/rasbt.github.io\/mlxtend\/user_guide\/feature_extraction\/LinearDiscriminantAnalysis\/"]
docstr: Fit the LDA model with X.
  
  Parameters
  ----------
  X : {array-like, sparse matrix}, shape = [n_samples, n_features]
      Training vectors, where n_samples is the number of samples and
      n_features is the number of features.
  y : array-like, shape = [n_samples]
      Target values.
  n_classes : int (default: None)
      A positive integer to declare the number of class labels
      if not all class labels are present in a partial training set.
      Gets the number of class labels automatically if None.
  
  Returns
  -------
  self : object
docstr_tok: ["Fit","the","LDA","model","with","X.","Parameters","--","--","--","--","--","X",":","{","array-like",",","sparse","matrix","}",",","shape","=","[","n_samples",",","n_features","]","Training","vectors",",","where","n_samples","is","the","number","of","samples","and","n_features","is","the","number","of","features",".","y",":","array-like",",","shape","=","[","n_samples","]","Target","values",".","n_classes",":","int","(","default",":","None",")","A","positive","integer","to","declare","the","number","of","class","labels","if","not","all","class","labels","are","present","in","a","partial","training","set",".","Gets","the","number","of","class","labels","automatically","if","None",".","Returns","--","--","--","-","self",":","object"]
code: def fit(self, X, y, n_classes=None):
      """Fit the LDA model with X.
  
      Parameters
      ----------
      X : {array-like, sparse matrix}, shape = [n_samples, n_features]
          Training vectors, where n_samples is the number of samples and
          n_features is the number of features.
      y : array-like, shape = [n_samples]
          Target values.
      n_classes : int (default: None)
          A positive integer to declare the number of class labels
          if not all class labels are present in a partial training set.
          Gets the number of class labels automatically if None.
  
      Returns
      -------
      self : object
  
      """
      self._is_fitted = False
      self._check_arrays(X=X, y=y)
      self._fit(X=X, y=y, n_classes=n_classes)
      self._is_fitted = True
      return self
  
file_path: mlxtend/mlxtend/feature_extraction/linear_discriminant_analysis.py
imports: import numpy
  from .._base import _BaseModel
label_desc: Use image node_id 2 for calling the LinearDiscriminantAnalysis obj's underlying member method code with example usage: obj.fit(X, y, n_classes) and returns: self