Python package for clustering assisted by the random forest.
$ python -m pip install git+https://github.com/nbsato/forestcluster.gitAssume that you have a fitted sklearn.ensemble.RandomForestRegressor object,
estimator, and a set of feature vectors, X.
Import the package:
>>> import forestclusterTransform the feature vectors:
>>> Xt = forestcluster.transform(estimator, X)Perform clustering:
>>> Z = forestcluster.cluster(Xt)Assign cluster labels to samples:
>>> labels = forestcluster.assign_labels(Z)