question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot import name 'OPTICS'

See original GitHub issue

I want to perform clustering using OPTICS in sklearn and I started with the example, but I am getting an error that I cannot import OPTICS. Any suggestions. Here is the example

from sklearn.cluster import OPTICS

 ImportError: cannot import name 'OPTICS' 

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
adrinjalalicommented, Nov 6, 2018

OPTICS is still experimental and only available on master, and is not released yet. You should take extreme caution using it, and expect bugs and major changes in the API by the time it gets released.

We hope to have it out by v0.21.

1reaction
jnothmancommented, Aug 4, 2019

That was a typo, @rth. Python 2 is not supported in versions from 0.21. I expect that 0.20.4 was our last python 2 release ever.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError in importing from sklearn: cannot import name ...
Worked for me after installing scipy.
Read more >
sklearn.cluster.OPTICS — scikit-learn 1.2.0 documentation
This works for Scipy's metrics, but is less efficient than passing the metric name as a string. If metric is “precomputed”, X is...
Read more >
Cannot import name 'delayed' from 'sklearn.utils.fixes'
The "ImportError: cannot import name 'delayed' from 'sklearn.utils.fixes'" occurs because the delayed package is not installed in the ...
Read more >
ImportError cannot import name minimum spanning tree
I am trying to import sklearn module in jupyter notebook, but I am getting this below error. ImportError: cannot import name ...
Read more >
Issue with sklearn import - General - Jupyter Community Forum
Code Issue: from sklearn import cross_validation Error: ImportError: cannot import name 'cross_validation' from 'sklearn' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found