URF: Unsupervised Random Forest
URF (Unsupervised Random Forest, or Random Forest Clustering) is a python implementation of the paper: Shi, T., & Horvath, S. (2006). Unsupervised learning with random forest predictors. Journal of Computational and Graphical Statistics, 15(1), 118-138.
Prerequisite
conda install -c bioconda pycluster
or:
wget http://bonsai.hgc.jp/~mdehoon/software/cluster/Pycluster-1.54.tar.gz tar -zxvf Pycluster-1.54.tar.gz cd Pycluster-1.54 python setup.py install
Installation
pip install URF
Usage
from sklearn.datasets import load_iris from URF.main import random_forest_cluster, plot_cluster_result iris = load_iris() X = iris.data y = iris.target print(len(list(set(y)))) clf, prox_mat, cluster_ids = random_forest_cluster(X, k=3, max_depth=20, random_state=0) plot_cluster_result(prox_mat, cluster_ids, marker=y)
If you encountered an error like
> QXcbConnection: Could not connect to display
then you need to add these codes to the very beginning of your file:
import matplotlib as mpl
mpl.use("Agg")
and you must assign the output file when you call plot_cluster_result, like this:
plot_cluster_result(prox_mat, cluster_ids, marker=y, output="test_123.png")
Metadata
Release files for URF 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| URF-0.0.5.tar.gz | 3.7 kB | Without provenance | Details for URF-0.0.5.tar.gz |
Release files / URF-0.0.5.tar.gz
| Download URL | URF-0.0.5.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c3cbb794dd284b0387ea28e38c3ed4137ade6488667d7adb2914a551afaf9f1
|
|
BLAKE2b-256 checksum How to use checksums |
bac6afc7d111e338acccf917daca888da4d5b36e3af32017ee26e39c7c9b89ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for URF 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.