title: Plotting decision boundary for High Dimension Data
body: <p>I am building a model for binary classification problem where each of my  data points is of <strong>300 dimensions</strong> (I am using 300 features). I am using a <em>PassiveAggressiveClassifier</em> from <em>sklearn</em>. The model is performing really well. </p>
  
  <p><strong>I wish to plot the decision boundary of the model. How can I do so ?</strong></p>
  
  <p>To get a sense of the data,  I am plotting it in 2D using TSNE. I reduced the dimensions of the data in 2 steps - from 300 to 50, then from 50 to 2 (this is a common recomendation). Below is the code snippet for the same :</p>
  
  <pre><code>from sklearn.manifold import TSNE
  from sklearn.decomposition import TruncatedSVD
  
  X_Train_reduced = TruncatedSVD(n_components=50, random_state=0).fit_transform(X_train)
  X_Train_embedded = TSNE(n_components=2, perplexity=40, verbose=2).fit_transform(X_Train_reduced)
  
  #some convert lists of lists to 2 dataframes (df_train_neg, df_train_pos) depending on the label - 
  
  #plot the negative points and positive points
  scatter(df_train_neg.val1, df_train_neg.val2, marker='o', c='red')
  scatter(df_train_pos.val1, df_train_pos.val2, marker='x', c='green')
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/HzAbZ.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/HzAbZ.jpg" alt="Data Plot"></a></p>
  
  <p>I get a decent graph. </p>
  
  <p><strong>Is there a way that I can add a decision boundary to this plot which represents the actual decision boundary of my model in the 300 dim space ?</strong></p>