Unable to predict floating values using svm in python
<p>When I try to implement a simple svm regression model in python, I'm able to predict integer values, but prediction of floating values is not working. </p>

<p>Code: </p>

<pre><code>from sklearn import svm
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning) 
import numpy as np
data = np.genfromtxt("a.csv", dtype=None, delimiter=',') 
print data 
X=data[:,0:1]
y=data[:,1]
clf =svm.SVC()
clf.fit(X, y) 
m=clf.predict([1.2])
print m
</code></pre>

<p>Error :  </p>

<pre><code>Traceback (most recent call last):
  File "svm3.py", line 10, in &lt;module&gt;
    clf.fit(X, y) 
  File "/home/narayan/.local/lib/python2.7/site-packages/sklearn/svm/base.py", line 151, in fit
  y = self._validate_targets(y)
 File "/home/narayan/.local/lib/python2.7/site-packages/sklearn/svm/base.py", line 515, in _validate_targets
    check_classification_targets(y)
  File "/home/narayan/.local/lib/python2.7/site-packages/sklearn/utils/multiclass.py", line 173, in check_classification_targets
    raise ValueError("Unknown label type: %r" % y)
ValueError: Unknown label type: array([ 3.6,  6.6,  9.9])
</code></pre>

<p>CSV file data : </p>

<pre><code>[[ 1.2  3.6]
[ 2.2  6.6]
[ 3.3  9.9]]
</code></pre>