title: How to assign sample_weights in sklearn.cluster DBSCAN?
body: <p>I'm using DBSCAN to find clusters of pixel values of an RGB image.</p>
  
  <p><code>db = DBSCAN(eps=0.3, min_samples=10).fit(X)</code></p>
  
  <p>where, <code>X</code> is an <code>N x 3</code> matrix. Each row of <code>X</code> contains RGB triplets.</p>
  
  <p>Now, I want to assign weights to pixel values as a function of distance from the center of the image.
  And this is the function I'm using:</p>
  
  <p><code>score =  1 / (1 + math.exp(-a * distance)) # a = 0.001</code></p>
  
  <p>I compute <code>weight_matrix</code> filled with <code>score</code> as above</p>
  
  <p>Next I did this:</p>
  
  <p><code>db = DBSCAN(eps=0.3, min_samples=10).fit(X,y=None, sample_weight=weight_matrix)</code></p>
  
  <p>where, length of the <code>weight_matrix</code> array is equal to the number of rows in <code>X</code>.</p>
  
  <p>But I get the following error:</p>
  
  <p><code>TypeError: fit() got an unexpected keyword argument 'y'</code></p>
  
  <p>So I tried doing it like this:</p>
  
  <p><code>db = DBSCAN(eps=0.3, min_samples=10).fit(X, sample_weight=weight_matrix)</code></p>
  
  <p>Now I get this error:</p>
  
  <p><code>TypeError: fit() got an unexpected keyword argument 'sample_weight'</code></p>
  
  <p>I think I'm passing the arguments incorrectly, but couldn't be sure. My scikit-learn version is 0.14.0.</p>