Skip to main content

Projection of High-Dimensional Data Using Multivariate Decision Trees and UMAP

Project description

TreeOrdination

CI

Implementation of a wrapper which creates unsupervised projections using LANDMark and UMAP.

Install Dependencies

The LANDMark package is needed for TreeOrdination to work. It is available at: https://github.com/jrudar/LANDMark

Install

From PyPI:

pip install TreeOrdination

From source:

git clone https://github.com/jrudar/TreeOrdination.git
cd TreeOrdination
pip install .
# or create a virtual environment
python -m venv venv
source venv/bin/activate
pip install .

Example Usage

    from TreeOrdination import TreeOrdination
    from sklearn.datasets import make_classification
    
    #Create the dataset
    X, y = make_classification(n_samples = 200, n_informative = 20)
    
    #Give features a name
    f_names = ["Feature %s" %str(i) for i in range(X.shape[0])]
    
    tree_ord = TreeOrdination(feature_names = f_names).fit(X, y)

    #This is the LANDMark embedding of the dataset. This dataset is used to train the supervised model ('supervised_clf' parameter)
    landmark_embedding = tree_ord.LM_emb
    
    #This is the UMAP projection of the LANDMark embedding
    umap_projection = tree_ord.UMAP_emb
    
    #This is the PCA projetion of the UMAP embedding
    pca_projection = tree_ord.PCA_emb     

Notebooks and Other Examples

Comming Soon. When available, examples of how to use TreeOrdination will be found here.

Interface

An overview of the API can be found here.

Contributing

To contribute to the development of TreeOrdination please read our contributing guide

References

Rudar, J., Porter, T.M., Wright, M., Golding G.B., Hajibabaei, M. LANDMark: an ensemble approach to the supervised selection of biomarkers in high-throughput sequencing data. BMC Bioinformatics 23, 110 (2022). https://doi.org/10.1186/s12859-022-04631-z

Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, et al. Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research. 2011;12:2825–30.

Geurts P, Ernst D, Wehenkel L. Extremely Randomized Trees. Machine Learning. 2006;63(1):3–42.

Rudar, J., Golding, G.B., Kremer, S.C., Hajibabaei, M. (2023). Decision Tree Ensembles Utilizing Multivariate Splits Are Effective at Investigating Beta Diversity in Medically Relevant 16S Amplicon Sequencing Data. Microbiology Spectrum e02065-22.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

treeordination-1.3.4.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

treeordination-1.3.4-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file treeordination-1.3.4.tar.gz.

File metadata

  • Download URL: treeordination-1.3.4.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for treeordination-1.3.4.tar.gz
Algorithm Hash digest
SHA256 0911edaac3315e2431faad1305f0a18b3b732f8db839ebe81e38c6673f6aac51
MD5 acde3e2c6de1424e6e124d1ddb9140f8
BLAKE2b-256 00d9df1fa53694c2b402c500a367f742f44aea7615c02c5371e1a24327accbb2

See more details on using hashes here.

File details

Details for the file treeordination-1.3.4-py3-none-any.whl.

File metadata

File hashes

Hashes for treeordination-1.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a0f43dd53e9445f1d18fca3437194c95ff3556dd45d0c3786c7a52f0d994d808
MD5 b93c400294c147eb7d11e862b692701c
BLAKE2b-256 67a6e216774ad747ca5102d97f6989254508e36f28eddd76a71da108f56568ce

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page