title: MATLAB: Principal Component Analysis (PCA) and Classification Learner
body: <p>I'm building a logistic regression model in Matlab with the Classification Learner Toolbox.</p>
  
  <p>I ran PCA in Matlab:</p>
  
  <p>[coeff, score, latent, tsquared, explained] = pca(CreditNumeric);</p>
  
  <p>Here's the coeff, score, latent and explained output:</p>
  
  <p><a href="https://i.stack.imgur.com/QqUnG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QqUnG.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/5PUMx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5PUMx.png" alt="enter image description here"></a></p>
  
  <p>I want to use the results of PCA to reduce the input features I'm using as input in the Classification Learner (based upon my PCA results).  How do I use the PCA results to select (say 5-7) features which best describe 95% of the variance of the data?</p>
  
  <p><a href="https://i.stack.imgur.com/0U5NK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0U5NK.png" alt="enter image description here"></a></p>