title: How to initialize coef_init and intercept_init for a new training model?
body: <p>As specified here, <a href="https://stackoverflow.com/a/35662770/5757129">https://stackoverflow.com/a/35662770/5757129</a>, i stored  the coef and intercept of my first model. Later, i am passing them as initializers to my second fit() as shown below for learning new data on top of old model. </p>
  
  <pre><code>from sklearn import neighbors, linear_model
  import numpy as np
  import pickle
  import os
  
  def train_data():
  
      x1 = [[8, 9], [20, 22], [16, 18], [8,4]]
      y1 = [0, 1, 2, 3]
  
      #classes = np.arange(10)
  
      #sgd_clf = linear_model.SGDClassifier(learning_rate = 'constant', eta0 = 0.1, shuffle = False, n_iter = 1,warm_start=True)
  
      sgd_clf = linear_model.SGDClassifier(loss="hinge",max_iter=10000)
  
      sgd_clf.fit(x1,y1)
  
      coef = sgd_clf.coef_
      intercept = sgd_clf.intercept_
  
      return coef, intercept
  
  
  def train_new_data(coefs,intercepts):
  
      x2 = [[18, 19],[234,897],[20, 122], [16, 118]]
      y2 = [4,5,6,7]
  
      sgd_clf1 = linear_model.SGDClassifier(loss="hinge",max_iter=10000)
  
      new_model = sgd_clf1.fit(x2,y2,coef_init=coefs,intercept_init=intercepts)
  
      return new_model
  
  
  if __name__ == "__main__":
  
      coefs,intercepts= train_data()
  
      new_model = train_new_data(coefs,intercepts)
  
      print(new_model.predict([[16, 118]]))
      print(new_model.predict([[18, 19]]))
      print(new_model.predict([[8,9]]))
      print(new_model.predict([[20,22]]))
  </code></pre>
  
  <p>When i run this, i get the lables that are trained only from new_model. For instance, <code>print(new_model.predict([[8,9]]))</code> has to print label as 0 and <code>print(new_model.predict([[20,22]]))</code> has to print label as 1. But it prints lables matching from 4 to 7.  </p>
  
  <p>Am i passing the coef and intercepts from old model to the new one in wrong way ? </p>
  
  <p>EDIT: Reframed the question as per @vital_dml answer</p>