cannot import name 'LSHForest' from 'sklearn.neighbors'

from sklearn.neighbors import NearestNeighbors, LSHForest
ImportError: cannot import name 'LSHForest' from 'sklearn.neighbors'

I came to know that LSHForest is depreciated. So how can use it. do we have any other alternative.

I'm using Sklearn version 1.0.1

Topic scikit-learn

Category Data Science


The LSHForest model has indeed been deprecated and remove from scikit-learn. Looking at historical versions it seems that the model has been removed in version 0.21, but was still available in versions before that (even though it was already deprecated). Downgrading your scikit-learn version to 0.20 or before should allow you to still use the model.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.