{"id":32651790,"url":"https://github.com/niklaspfister/adaxt","last_synced_at":"2025-10-31T08:03:46.898Z","repository":{"id":219066483,"uuid":"641355235","full_name":"NiklasPfister/adaXT","owner":"NiklasPfister","description":"adaXT: tree-based machine learning in Python","archived":false,"fork":false,"pushed_at":"2025-05-28T06:32:48.000Z","size":1988,"stargazers_count":10,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-25T05:20:53.549Z","etag":null,"topics":["data-analysis","decision-trees","machine-learning","statistics","tree-ensembles"],"latest_commit_sha":null,"homepage":"https://niklaspfister.github.io/adaXT/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NiklasPfister.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-16T09:50:41.000Z","updated_at":"2025-06-24T08:19:26.000Z","dependencies_parsed_at":"2024-02-05T08:54:44.868Z","dependency_job_id":"1c99991a-0fbf-496f-997b-65d0faf0155a","html_url":"https://github.com/NiklasPfister/adaXT","commit_stats":null,"previous_names":["niklaspfister/adaxt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NiklasPfister/adaXT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasPfister%2FadaXT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasPfister%2FadaXT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasPfister%2FadaXT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasPfister%2FadaXT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NiklasPfister","download_url":"https://codeload.github.com/NiklasPfister/adaXT/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasPfister%2FadaXT/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281953450,"owners_count":26589146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-31T02:00:07.401Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-analysis","decision-trees","machine-learning","statistics","tree-ensembles"],"created_at":"2025-10-31T08:00:56.924Z","updated_at":"2025-10-31T08:03:46.869Z","avatar_url":"https://github.com/NiklasPfister.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Fast Adaptable and Extendable Trees for Research\n\n**adaXT** is a Python module for tree-based machine-learning algorithms that is\nfast, adaptable and extendable. It aims to provide researchers a more flexible\nworkflow when developing tree-based models.\n\nIt is distributed under the\n[3-Clause BSD license](https://github.com/NiklasPfister/adaXT/blob/main/LICENSE).\n\nWe encourage users and developers to report problems, request features, ask for\nhelp, or leave general comments.\n\nWebsite:\n[https://NiklasPfister.github.io/adaXT](https://NiklasPfister.github.io/adaXT)\n\n### Overview\n\nadaXT implements several tree types that can be used out-of-the-box, both as\ndecision trees and random forests. Currently, the following tree types are\nimplemented:\n\n- **Classification:** For prediction tasks in which the response is categorical.\n- **Regression:** For prediction tasks in which the response is continuous.\n- **Quantile:** For uncertainty quantification tasks in which the response is\n  continuous and the goal is to estimate one or more quantiles of the\n  conditional distribution of the response given the predictors.\n- **Gradient:** For tasks in which one aims to estimate (directional)\n  derivatives of the response given the predictors. A related tree type is used\n  in the\n  [Xtrapolation](https://github.com/NiklasPfister/ExtrapolationAware-Inference)\n  method.\n\nBeyond these pre-defined tree types, adaXT offers a simple interface to extend\nor modify most components of the tree models. For example, it is easy to create\na [custom criteria](https://NiklasPfister.github.io/adaXT/user_guide/creatingCriteria/)\nfunction that is used\nto create splits.\n\n### Getting started\n\nadaXT is available on [pypi](https://pypi.org/project/adaXT) and can be\ninstalled via pip\n\n```bash\npip install adaXT\n```\n\nWorking with any of the default tree types uses the same class-style interface\nas other popular machine learning packages. The following code illustrates this\nfor `Regression` and `Quantile` random forests:\n\n```python\nfrom adaXT.random_forest import RandomForest\nimport numpy as np\n\n# Create toy regression data\nn = 100\nX = np.random.normal(0, 1, (n, 2))\nY = X[:, 0] + np.random.normal(0, 1, n)\nXtest = np.c_[np.linspace(-1, 1, n), np.random.uniform(0, 1, n)]\n\n# Task 1: Fit regression forest\nrf = RandomForest(\"Regression\")\nrf.fit(X, Y)\n\n# Predict on test data\nYpred = rf.predict(Xtest)\n\n# Predict forest weight on X or Xtest\n# -- can be used a similarity measure on the predictor space\nweight_train = rf.predict_weights()\nweight_test = rf.predict_weights(Xtest)\n\n# Task 2: Fit a quantile regression\nqf = RandomForest(\"Quantile\")\nqf.fit(X, Y)\n\n# Predict 10% and 90% conditional quantile on test data\nYbdd = qf.predict(Xtest, quantile=[0.1, 0.9])\n```\n\nThe main advantage of adaXT over existing tree-based ML packages is its\nmodularity and extendability, which is discussed in detail in the\n[documentation](https://NiklasPfister.github.io/adaXT).\n\n### Project goals\n\nThis project aims to provide a flexible and unified code-base for various\ntree-based algorithms that strikes a balance between speed and ease with which\nthe code can be adapted and extended. It should provide researchers a simple\ntoolkit for prototyping new tree-based algorithms.\n\nadaXT provides an intuitive user experience that is similar to the\n[scikit-learn](https://scikit-learn.org) implementation of decision trees both\nin terms of model-based syntax and hyperparameters. Under the hood, however, adaXT\nstrikes a different balance between speed and ease of adapting and extending the\ncode.\n\n#### Adaptable and extendable\n\nAt the heart of any tree-based algorithm is a decision tree that can be fitted\non data and then used to perform some version of prediction. adaXT has therefore\nbeen designed with a modular decision tree implementation that takes four input\ncomponents:\n\n- Criteria class: Used during fitting to determine splits.\n\n- LeafBuilder class: Used during fitting to specify what is saved on the leaf\n  nodes.\n\n- Splitter class: Used during fitting to perform the splits.\n\n- Predict class: Used after fitting to make predictions.\n\nBy specifying these four components a range of different tree algorithms can be\ncreated, e.g., regression trees, classification trees, quantile regression trees\nand gradient trees. Additionally to this modular structure, all other operations\nare kept as vanilla as possible allowing users to easily change parts of the\ncode (e.g., the splitting procedure).\n\n#### Speed\n\nAs tree-based algorithms involve expensive loops over the training dataset, it\nis important that these computations are implemented in a compiled language.\nadaXT implements all computationally expensive operations in\n[Cython](https://cython.org/). This results in speeds similar (although a few\nfactors slower) than the corresponding [scikit-learn](https://scikit-learn.org)\nimplementations. However, due to its modular structure and the avoidance of\ntechnical speed-ups, adaXT does not intend to provide state-of-the-art speed and\nusers mainly concerned with speed should consider more targeted implementations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklaspfister%2Fadaxt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniklaspfister%2Fadaxt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklaspfister%2Fadaxt/lists"}