title: Linear Discriminant Analysis in sklearn fail to reduce the features size
body: <p>From what I know, Linear Discriminant Analysis (LDA) is a technique to reduce the number of input features. Wiki also states the same</p>
  
  <blockquote>
    <p>Linear discriminant analysis (LDA), normal discriminant analysis (NDA), or discriminant function analysis is a generalization of Fisher's linear discriminant, a method used in statistics, pattern recognition and machine learning to find a linear combination of features that characterizes or separates two or more classes of objects or events. The resulting combination may be used as a linear classifier, or, more commonly, for dimensionality reduction before later classification.</p>
  </blockquote>
  
  <p>However, when I try to use the <code>LinearDiscriminantAnalysis</code> from <code>sklearn.discriminant_analysis</code>, I failed to get the data with reduced features.</p>
  
  <pre><code>from sklearn.datasets import make_blobs
  from sklearn.model_selection import train_test_split
  import numpy as np
  from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
  
  X, y = make_blobs(40000,600,2,cluster_std=20,random_state=101)
  X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.3,random_state=101)
  
  model = LinearDiscriminantAnalysis(n_components=100)
  model.fit(X_train,y_train)
  
  X_train_new = model.transform(X_train)
  print(X_train_new.shape)
  &gt;&gt;&gt; (28000, 1)
  </code></pre>
  
  <p>My original data has 600 features, I would like to reduce it to only 100 features with the <code>LDA</code>. But the <code>LDA</code> from <code>sklearn</code> gave me the shape (28000,1) instead.</p>
  
  <p>Why is there only 1 feature after the LDA transformation? What am I doing it wrong?</p>