title: Cannot cast array data from dtype('float64') to dtype('S32') according to the rule 'safe' ON Model_result=model.predict(classify)
body: <p>I'm trying to run a python program but get an error. This code is to predict the values and classify it. It works on a GradientBoostingClassifier model but not with a LinearSVC() class model.</p>
  
  <p>This code is used to create the model for the output class:</p>
  
  <pre><code>data_file=pd.read_csv('C:\\Class.csv')
  testx = data_file.iloc[0:, :5]
  testy= data_file.iloc[0:, 5]
  model = make_pipeline(LinearSVC())
  model.fit(testx,testy)
  import pickle
  filename = 'C:\\Model\\svm.sav'
  pickle.dump(model, open(filename, 'wb'))
  </code></pre>
  
  <hr>
  
  <p>See the below code which has an error when using the the linearSVC output class model</p>
  
  <pre><code>import pickle
  import numpy as np
  time=0.0
  print "\n"
  time = input(" \t Please Enter Time in Mili Seconds (Ms): ")
  print "\n"
  #Data-Read
  filename1 = 'c:\\Model\\HR_model.sav'
  filename2 = 'c:\\Model\\SpO2_model.sav'
  filename3 = 'c:\\Model\\SYS_model.sav'
  filename4 = 'c:\\Model\\Dia_model.sav'
  filename5 = 'c:\\Model\\Mean_model.sav'
  filename6 = 'c:\\Model\\svm.sav'
  classify=list()
  HR = pickle.load(open(filename1, 'rb'))
  hr_result=HR.predict(time)
  classify.append(str(float(hr_result)))
  SPO2 = pickle.load(open(filename2, 'rb'))
  SPO2_result=SPO2.predict(time)
  classify.append(str(float(SPO2_result)))
  Sys = pickle.load(open(filename3, 'rb'))
  Sys_result=Sys.predict(time)
  classify.append(str(float(Sys_result)))
  DIA = pickle.load(open(filename4, 'rb'))
  DIA_result=DIA.predict(time)
  classify.append(str(float(DIA_result)))
  MEan = pickle.load(open(filename5, 'rb'))
  MEan_result=MEan.predict(time)
  classify.append(str(float(MEan_result)))
  
  
  #Classifier train Model
  model = pickle.load(open(filename6, 'rb'))
  Model_result=model.predict(classify)
  print "\n"
  
  print "Input Features:"
  print classify 
  print "\n"
  print "Output Class: "
  print Model_result
  </code></pre>
  
  <hr>
  
  <p>Upon running the program, I get the following error:</p>
  
  <blockquote>
    <p>TypeError                                 Traceback (most recent call
    last) C:\ForcastPredictFromModels.py in ()   50 #CLassifier
    train Model  51 model = pickle.load(open(filename6, 'rb'))  ---> 52
    Model_result=model.predict(classify)  53 print "\n"  54 </p>
    
    <p>C:\Users\xx\AppData\Local\Enthought\Canopy\User\lib\site-<br>
    packages\sklearn\utils\metaestimators.pyc in (*args, **kwargs)
    52   53         # lambda, but not partial, allows help() to work with 
    update_wrapper  ---> 54         out = lambda *args, **kwargs:
    self.fn(obj, *args, **kwargs)  55         # update the docstring of
    the returned function  56         update_wrapper(out, self.fn)</p>
    
    <p>C:\Users\xx\AppData\Local\Enthought\Canopy\User\lib\site-<br>
    packages\sklearn\pipeline.pyc in predict(self, X) 325             if
    transform is not None: 326                 Xt =
    transform.transform(Xt)
    --> 327         return self.steps[-1][-1].predict(Xt) 328  329     @if_delegate_has_method(delegate='_final_estimator')</p>
    
    <p>C:\Users\xx\AppData\Local\Enthought\Canopy\User\lib\site-packages\sklearn\linear_model\base.pyc
    in predict(self, X) 334             Predicted class label per sample.
    335         """
    --> 336         scores = self.decision_function(X) 337         if len(scores.shape) == 1: 338             indices = (scores >
    0).astype(np.int)</p>
    
    <p>C:\Users\xx\AppData\Local\Enthought\Canopy\User\lib\site-packages\sklearn\linear_model\base.pyc
    in decision_function(self, X) 318  319         scores =
    safe_sparse_dot(X, self.coef_.T,
    --> 320                                  dense_output=True) + self.intercept_ 321         return scores.ravel() if scores.shape[1]
    == 1 else scores 322 </p>
    
    <p>C:\Users\xx\AppData\Local\Enthought\Canopy\User\lib\site-packages\sklearn\utils\extmath.pyc
    in safe_sparse_dot(a, b, dense_output) 187         return ret 188<br>
    else:
    --> 189         return fast_dot(a, b) 190  191 </p>
    
    <p>TypeError: Cannot cast array data from dtype('float64') to
    dtype('S32') according to the rule 'safe'</p>
  </blockquote>