title: Multiclass classification on iris dataset
body: <p>I know I'm asking a lot of questions with one question but these were the doubts I got when I was using <code>Logistic Regression</code> for <code>Iris Dataset</code></p>
  
  <p>This is my code for using <code>LogisticRegression</code> on <code>iris</code> dataset.</p>
  
  <pre><code>iris = datasets.load_iris()
  X, y = iris.data, iris.target
  x_train, x_test, y_train, y_test = train_test_split(X, y, stratify=y, random_state= 81,
                                                             test_size=0.3)
  logreg = LogisticRegression()
  logreg.fit(x_train, y_train)
  pred = logreg.predict(x_test)
  accuracy_score(y_test, pred) # this gives accuracy
  0.95555
  </code></pre>
  
  <p>I know that LogisticRegression works by prediction either <code>1</code> or <code>0</code> in the result but for this <code>iris</code> dataset will need to classifiy <code>0 or 1 or 2</code> based on specified. </p>
  
  <p>Q) Do I need to Standardize the data using StandardScalar?</p>
  
  <p>Q) How this works? I know <code>LR</code> works by prediction <code>YES</code> OR <code>NO</code> but here(<code>iris</code>) we have to predict <code>0</code> or <code>1</code> or <code>2</code></p>
  
  <p>Q) If <code>LogisticRegression</code> also works for multiple classification then how can I optimize my above code for better prediction on other multiclass datasets I want to try.</p>
  
  <p>Q) Do I need to convert my <code>y_train</code> or do I need to do any type of encoding etc for it to work? </p>
  
  <p>I would really appreciate if anyone can help me figure these out. Any good references are also appreciated.</p>