<h3 dir="auto">Describe the bug</h3>
<p dir="auto">I am passing data normalized using MinMaxScaler to DBSCAN's fit_predict. My data is very small (12 MB, around 180,000 rows and 9 columns). However while running this, the memory usage quickly climbs up and the kernel gets killed (I presume by OOM killer). I even tried it on a server with 256 GB RAM and it fails fairly quickly.</p>
<p dir="auto">Here is my repro code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd
X_ml = pd.read_csv('Xml.csv')
from sklearn.cluster import DBSCAN
dbscan = DBSCAN(eps=0.28, min_samples=9)
dbscan_pred = dbscan.fit_predict(X_ml)"><pre class="notranslate"><code class="notranslate">import pandas as pd
X_ml = pd.read_csv('Xml.csv')
from sklearn.cluster import DBSCAN
dbscan = DBSCAN(eps=0.28, min_samples=9)
dbscan_pred = dbscan.fit_predict(X_ml)
</code></pre></div>
<p dir="auto">and <a href="https://github.com/sameermahajan/MLWorkshop/blob/master/Xml.csv">here</a> is my Xml.csv data file.</p>
<p dir="auto">Any ideas how to get it working?</p>
<h3 dir="auto">Steps/Code to Reproduce</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd
X_ml = pd.read_csv('Xml.csv')
from sklearn.cluster import DBSCAN
dbscan = DBSCAN(eps=0.28, min_samples=9)
dbscan_pred = dbscan.fit_predict(X_ml)"><pre class="notranslate"><code class="notranslate">import pandas as pd
X_ml = pd.read_csv('Xml.csv')
from sklearn.cluster import DBSCAN
dbscan = DBSCAN(eps=0.28, min_samples=9)
dbscan_pred = dbscan.fit_predict(X_ml)
</code></pre></div>
<p dir="auto">and <a href="https://github.com/sameermahajan/MLWorkshop/blob/master/Xml.csv">here</a> is my Xml.csv data file.</p>
<h3 dir="auto">Expected Results</h3>
<p dir="auto">DBSCAN should complete.</p>
<h3 dir="auto">Actual Results</h3>
<p dir="auto">It runs out of memory getting killed.</p>
<h3 dir="auto">Versions</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="System:
    python: 3.9.9 (main, Nov 21 2021, 03:23:42)  [Clang 13.0.0 (clang-1300.0.29.3)]
executable: /usr/local/opt/python@3.9/bin/python3.9
   machine: macOS-12.2.1-x86_64-i386-64bit

Python dependencies:
          pip: 21.3.1
   setuptools: 59.0.1
      sklearn: 1.0.2
        numpy: 1.22.0
        scipy: 1.7.3
       Cython: None
       pandas: 1.3.5
   matplotlib: 3.5.1
       joblib: 1.1.0
threadpoolctl: 3.1.0

Built with OpenMP: True"><pre class="notranslate">System:
    python: 3.9.9 (main, Nov 21 2021, 03:23:42)  [Clang 13.0.0 (clang-1300.0.29.3)]
executable: /usr/local/opt/python@3.9/bin/python3.9
   machine: macOS-12.2.1-x86_64-i386-64bit

Python dependencies:
          pip: 21.3.1
   setuptools: 59.0.1
      sklearn: 1.0.2
        numpy: 1.22.0
        scipy: 1.7.3
       Cython: None
       pandas: 1.3.5
   matplotlib: 3.5.1
       joblib: 1.1.0
threadpoolctl: 3.1.0

Built with OpenMP: True</pre></div>
<p dir="auto">Scikit learn has two nearly identical ways of performing spectral clustering:</p>
<ul dir="auto">
<li>a <a href="http://scikit-learn.org/stable/modules/generated/sklearn.cluster.SpectralClustering.html" rel="nofollow"><code class="notranslate">SpectralClustering</code></a> class</li>
<li>a <a href="http://scikit-learn.org/stable/modules/generated/sklearn.cluster.spectral_clustering.html" rel="nofollow"><code class="notranslate">spectral_clustering</code></a> method</li>
</ul>
<p dir="auto">The slightly divergent docs and function call signatures are confusing, I think. Both of these live in the same file (clustering/spectral.py), and with mostly identical docstrings, having both doubles the documentation burden.</p>
<p dir="auto">Is there a compelling reason to keep these both around? <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jnothman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jnothman">@jnothman</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/GaelVaroquaux/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/GaelVaroquaux">@GaelVaroquaux</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/briancheung/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/briancheung">@briancheung</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/weilinear/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/weilinear">@weilinear</a></p>