title: How can I extract the prediction from multiprocessing in python?
body: <p>I am trying to multiprocess the result of svm.   </p>
  
  <p>And I tried the following simple method.</p>
  
  <pre><code>clf = svm.SVC(C=1.0, cache_size=1000000, class_weight=None, coef0=0.0,
      decision_function_shape='ovo', degree=3, gamma='auto', kernel='rbf',
      max_iter=-1, probability=False, random_state=None, shrinking=True,
      tol=0.001, verbose=False)
  
  clf.fit(x, y)
  
  def predict(x):
      clf.predict(x)
  
  from multiprocessing import Pool
  
  pool= Pool(processes = 4)
  
  
  setting = np.loadtxt('~/test.csv', delimiter=',')
  x=setting[:,0:3]
  y=setting[:,3]
  
  x[i]
  [cols,rows] = setting.shape
  i = 0
  while i &lt; rows:
      k = x[i]
      pool.map(predict,[[k]])
      print(pool.map(predict,[[k]]))
      i = i+1
  </code></pre>
  
  <p>This code will run, but it does not seem to have the right results.</p>
  
  <p>I want to return or print the predicted value.</p>
  
  <p>I would be grateful if you could provide a method or code to get predicted value results.</p>