title: How is Elastic Net used?
body: <p>This is a beginner question on regularization with regression. Most information about Elastic Net and Lasso Regression online replicates the information from Wikipedia or the original 2005 paper by Zou and Hastie (Regularization and variable selection via the elastic net). </p>
  
  <p><strong><em>Resource for simple theory?</em></strong> Is there a simple and easy explanation somewhere about what it does, when and why reguarization is neccessary, and how to use it - for those who are not statistically inclined? I understand that the original paper is the ideal source if you can understand it, but is there somewhere that more simply the problem and solution?</p>
  
  <p><strong><em>How to use in sklearn?</em></strong> Is there a step by step example showing why elastic net is chosen (over ridge, lasso, or just simple OLS) and how the parameters are calculated? Many of the <a href="http://scikit-learn.org/0.11/auto_examples/index.html" rel="noreferrer">examples on sklearn</a> just include alpha and rho parameters directly into the prediction model, for <a href="http://scikit-learn.org/0.11/auto_examples/linear_model/plot_lasso_and_elasticnet.html" rel="noreferrer">example</a>:</p>
  
  <pre><code>from sklearn.linear_model import ElasticNet
  alpha = 0.1
  enet = ElasticNet(alpha=alpha, rho=0.7)
  y_pred_enet = enet.fit(X_train, y_train).predict(X_test)
  </code></pre>
  
  <p>However, they don't explain how these were calculated. How do you calculate the parameters for the lasso or net?</p>