https://github.com/fasttrees/fasttrees
A fast and frugal tree classifier for sklearn
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 2 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.6%) to scientific vocabulary
Keywords
Repository
A fast and frugal tree classifier for sklearn
Basic Info
- Host: GitHub
- Owner: fasttrees
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://fasttrees.github.io/fasttrees/
- Size: 213 KB
Statistics
- Stars: 15
- Watchers: 2
- Forks: 5
- Open Issues: 1
- Releases: 4
Topics
Metadata Files
README.md
fasttrees
| Packages and Releases | |
| :--- | :--- |
| Build Status |
|
| Test Coverage |
|
| Other Information |
|
A fast-and-frugal-tree classifier based on Python's scikit learn.
Fast-and-frugal trees are classification trees that are especially useful for making decisions under uncertainty. Due their simplicity and transparency they are very robust against noise and errors in data. They are one of the heuristics proposed by Gerd Gigerenzer in Fast and Frugal Heuristics in Medical Decision. This particular implementation is based on on the R package FFTrees, developed by Phillips, Neth, Woike and Grassmaier.
Install
You can install fasttrees using
pip install fasttrees
Quick first start
Below we provide a qick first start example with fast-and-frugal trees. We use the popular iris flower data set (also known as the Fisher's Iris data set), split it into a train and test data set, and fit a fast-and-frugal tree classifier on the training data set. Finally, we get the score on the test data set.
```python from sklearn import datasets, model_selection
from fasttrees import FastFrugalTreeClassifier
Load data set
irisdict = datasets.loadiris(as_frame=True)
Load training data, preprocess it by transforming y into a binary classification problem, and
split into train and test data set
Xiris, yiris = irisdict['data'], irisdict['target'] yiris = yiris.apply(lambda entry: entry in [0, 1]).astype(bool) Xtrainiris, Xtestiris, ytrainiris, ytestiris = modelselection.traintestsplit( Xiris, yiris, testsize=0.4, random_state=42)
Fit and test fitted tree
fftc = FastFrugalTreeClassifier() fftc.fit(Xtrainiris, ytrainiris) fftc.score(Xtestiris, ytestiris) ```
Licensing
Copyright (c) 2019-2024 Dominic Zijlstra, Stefan Bachhofner
Licensed under the MIT (SPDX short identifier: MIT) (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License by reviewing the file LICENSE in the repository.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the LICENSE for the specific language governing permissions and limitations under the License.
This project follows the REUSE standard for software licensing. Each file contains copyright and license information, and license texts can be found in the LICENSES folder. For more information visit https://reuse.software.
Owner
- Name: fasttrees
- Login: fasttrees
- Kind: organization
- Repositories: 1
- Profile: https://github.com/fasttrees
GitHub Events
Total
- Issues event: 1
- Watch event: 4
- Delete event: 3
- Issue comment event: 27
- Push event: 28
- Pull request review event: 2
- Pull request event: 58
- Create event: 3
Last Year
- Issues event: 1
- Watch event: 4
- Delete event: 3
- Issue comment event: 27
- Push event: 28
- Pull request review event: 2
- Pull request event: 58
- Create event: 3
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 4
- Total pull requests: 38
- Average time to close issues: 17 minutes
- Average time to close pull requests: 2 days
- Total issue authors: 4
- Total pull request authors: 2
- Average comments per issue: 0.25
- Average comments per pull request: 0.82
- Merged pull requests: 33
- Bot issues: 0
- Bot pull requests: 3
Past Year
- Issues: 1
- Pull requests: 26
- Average time to close issues: N/A
- Average time to close pull requests: about 17 hours
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.88
- Merged pull requests: 24
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- MacOS (1)
- hzzzzjzyq (1)
- ec531 (1)
- darlas (1)
Pull Request Authors
- MacOS (35)
- dependabot[bot] (6)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- logging *
- numpy *
- pandas <=0.25.3
- sklearn *
- actions/checkout v3 composite
- actions/setup-python v3 composite
- pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- codecov/codecov-action v3 composite
- numpy <=1.19.5
- pandas <=0.25.3
- pytest <=7.4.0
- pytest-cov <=4.1.0
- scikit-learn <=0.23.2
- actions/checkout v3 composite
- actions/configure-pages v3 composite
- actions/deploy-pages v2 composite
- actions/upload-pages-artifact v1 composite
- ruby/setup-ruby v1 composite
- jekyll-include-cache >= 0 development
- jekyll-seo-tag >= 0 development
- jekyll ~> 4.3.2
- jekyll-default-layout >= 0
- jekyll-github-metadata >= 0
- just-the-docs = 0.7.0
- addressable 2.8.5
- base64 0.2.0
- bundler 2.3.26
- colorator 1.1.0
- concurrent-ruby 1.2.2
- em-websocket 0.5.3
- eventmachine 1.2.7
- faraday 2.7.12
- faraday-net_http 3.0.2
- ffi 1.15.5
- forwardable-extended 2.6.0
- google-protobuf 3.24.3
- http_parser.rb 0.8.0
- i18n 1.14.1
- jekyll 4.3.2
- jekyll-default-layout 0.1.5
- jekyll-github-metadata 2.16.0
- jekyll-include-cache 0.2.1
- jekyll-sass-converter 3.0.0
- jekyll-seo-tag 2.8.0
- jekyll-watch 2.2.1
- just-the-docs 0.7.0
- kramdown 2.4.0
- kramdown-parser-gfm 1.1.0
- liquid 4.0.4
- listen 3.8.0
- mercenary 0.4.0
- octokit 6.1.1
- pathutil 0.16.2
- public_suffix 5.0.3
- rake 13.0.6
- rb-fsevent 0.11.2
- rb-inotify 0.10.1
- rexml 3.2.6
- rouge 4.1.3
- ruby2_keywords 0.0.5
- safe_yaml 1.0.5
- sass-embedded 1.67.0
- sawyer 0.9.2
- terminal-table 3.0.2
- unicode-display_width 2.4.2
- webrick 1.8.1