Skip to main content

Phylogenetic machine learning: scikit-learn estimators that account for evolutionary non-independence

Project description

treeml

Phylogenetic machine learning: scikit-learn estimators that account for evolutionary non-independence among species.

Installation

pip install treeml

Quick Start

from treeml import PhyloRandomForestRegressor, PhyloDistanceCV
from sklearn.model_selection import cross_val_score
from Bio import Phylo

tree = Phylo.read("species.nwk", "newick")
# X = feature matrix (n_species x p_features)
# y = target vector (n_species)

model = PhyloRandomForestRegressor(n_estimators=100)
model.fit(X, y, tree=tree, species_names=names)

cv = PhyloDistanceCV(tree=tree, species_names=names, n_splits=5)
scores = cross_val_score(model, X, y, cv=cv)

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

treeml-0.1.1.tar.gz (27.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

treeml-0.1.1-py2.py3-none-any.whl (52.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file treeml-0.1.1.tar.gz.

File metadata

  • Download URL: treeml-0.1.1.tar.gz
  • Upload date:
  • Size: 27.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.10

File hashes

Hashes for treeml-0.1.1.tar.gz
Algorithm Hash digest
SHA256 71e29964d1dd25977c4ded6fb81b5d8b4d4df190b9d5d3009b0ed11a19ca446d
MD5 1e2f1b9a14237cde34a26c4c8ba3fb94
BLAKE2b-256 f2c67e60ea4b3da3c91adc5cfc015811e10ceb6c7e1490859013a22fd17e0022

See more details on using hashes here.

File details

Details for the file treeml-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: treeml-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 52.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.10

File hashes

Hashes for treeml-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1ce2c4ddd3783fae93b5dc02a8bfdff36aeb095e80b392abc63d5aa2526de9d6
MD5 918bbf86c27c69d40ea68ddd6cf81297
BLAKE2b-256 6377a4ed8e1b398ccdde67e194701e3e2681ac55501965a8b2568832fb2f551c

See more details on using hashes here.

Supported by

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