Package: FFTrees 2.1.0.9001

Hansjoerg Neth

FFTrees: Generate, Visualise, and Evaluate Fast-and-Frugal Decision Trees

Create, visualize, and test fast-and-frugal decision trees (FFTs) using the algorithms and methods described by Phillips, Neth, Woike & Gaissmaier (2017), <doi:10.1017/S1930297500006239>. FFTs are simple and transparent decision trees for solving binary classification problems. FFTs can be preferable to more complex algorithms because they require very little information, are easy to understand and communicate, and are robust against overfitting.

Authors:Nathaniel Phillips [aut], Hansjoerg Neth [aut, cre], Jan Woike [aut], Wolfgang Gaissmaier [aut]

FFTrees_2.1.0.9001.tar.gz
FFTrees_2.1.0.9001.zip(r-4.7)FFTrees_2.1.0.9001.zip(r-4.6)FFTrees_2.1.0.9001.zip(r-4.5)
FFTrees_2.1.0.9001.tgz(r-4.6-any)FFTrees_2.1.0.9001.tgz(r-4.5-any)
FFTrees_2.1.0.9001.tar.gz(r-4.7-any)FFTrees_2.1.0.9001.tar.gz(r-4.6-any)
FFTrees_2.1.0.9001.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
FFTrees/json (API)

# Install 'FFTrees' in R:
install.packages('FFTrees', repos = c('https://ndphillips.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ndphillips/fftrees/issues

Datasets:

On CRAN:

Conda:

9.07 score 137 stars 174 scripts 498 downloads 25 exports 94 dependencies

Last updated from:6f2661874e. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK257
source / vignettesOK262
linux-release-x86_64OK254
macos-release-arm64OK190
macos-oldrel-arm64OK169
windows-develOK235
windows-releaseOK222
windows-oldrelOK234
wasm-releaseOK161

Exports:add_fft_dfadd_nodesdescribe_datadrop_nodesedit_nodesFFTreesfftrees_applyfftrees_createfftrees_cuerankfftrees_definefftrees_ffttowordsfftrees_threshold_factor_gridfftrees_threshold_numeric_gridfftrees_wordstofftreesFFTrees.guideflip_exitsget_best_treeget_exit_typeget_fft_dfinwordsread_fft_dfreorder_nodesselect_nodesshowcueswrite_fft_df

Dependencies:briocallrcaretclasscliclockcodetoolscpp11crayondata.tabledescdiagramdiffobjdigestdplyre1071evaluatefarverforeachfsfuturefuture.applygenericsggplot2globalsgluegowergtablehardhathighripredisobanditeratorsjsonliteKernSmoothknitrlabelinglatticelavalifecyclelistenvlubridatemagrittrMASSMatrixModelMetricsnlmennetnumDerivotelparallellypillarpkgbuildpkgconfigpkgloadplyrpraisepROCprocessxprodlimprogressrproxypspurrrR6RColorBrewerRcpprecipesreshape2rlangrpartrprojrootS7scalesshapesparsevctrsSQUAREMstringistringrsurvivaltestthattibbletidyrtidyselecttimechangetimeDatetzdbutf8vctrsviridisLitewaldowithrxfunyaml

Examples of FFTrees
Examples of FFTs with FFTrees | Mushrooms data | Creating FFTs | Visualizing cue accuracies | Visualizing FFT performance | Trading off prediction errors | An alternative FFT | Iris.v data | Viewing alternative FFTs | Titanic data | Vignettes | References

Last update: 2026-05-02
Started: 2016-08-23

Manually specifying FFTs
1. Using my.tree | Verbally defining FFTs | Example | Inspect FFTrees object: | Creating an alternative FFT | Visualize FFT: | FFT definition: | Note the flipped direction value for 2nd cue (exit = '0'): | 'if (cp = a), predict 1' in the tree definition corresponds to | 'if (cp != a), predict 0' in the my.tree description and plot. | 2. Using tree.definitions | Overview: Retrieving, manipulating, and using FFT definitions | Obtaining individual tree definitions | Manipulating individual tree definitions | Using magrittr pipes to combine steps | Re-converting and collecting sets of tree definitions | Applying sets of tree definitions to data | Details | Vignettes

Last update: 2026-05-02
Started: 2017-05-30

Visualising FFTs
Visualizing FFTrees | The Titanic data | Visualising cue accuracies | Additional arguments | Plotting performance for new data | Vignettes

Last update: 2026-05-02
Started: 2016-08-23

Tutorial: Creating FFTs for heart disease
Step\ 1: Install and load the FFTrees package | Step\ 2: Create FFTs from training data (and test on testing data) | Other arguments | Step\ 3: Inspect and summarize FFTs | Step\ 4: Visualise the final FFT | Advanced functions | Accessing outputs | Predicting for new data | Directly defining FFTs | Vignettes | References

Last update: 2025-09-02
Started: 2017-06-21

Accuracy statistics in FFTrees
Accuracy Statistics in FFTrees | Conditional accuracy statistics | Aggregate accuracy statistics | Speed and frugality statistics | Additional measures | Vignettes | References

Last update: 2024-05-21
Started: 2022-07-27

Creating FFTs with FFTrees()
Details on the FFTrees() function | Example: Predicting heart disease | Creating trees with FFTrees() | Elements of an FFTrees object | Basic performance characteristics of FFTs | Cue performance information | Tree definitions | Accuracy statistics of FFTs | Classification decisions | Predicting new cases with predict() | Visualising trees | Manually defining an FFT | Vignettes | References

Last update: 2024-05-21
Started: 2016-08-23

Overview: Creating FFTs with FFTrees
Fast-and-Frugal Trees (FFTs) | Using the FFTrees package | Getting started | Vignettes | Datasets | Details about the datasets | Citing FFTrees | Contact | Bibliography

Last update: 2024-05-21
Started: 2016-10-07

Readme and manuals

Help Manual

Help pageTopics
Add an FFT definition to tree definitionsadd_fft_df
Add nodes to an FFT definitionadd_nodes
Add decision statistics to data (based on frequency counts of a 2x2 matrix of classification outcomes)add_stats
Blood donation datablood
Breast cancer databreastcancer
Car acceptability datacar
Compute classification statistics for binary prediction and criterion (e.g.; truth) vectorsclasstable
Contraceptive use datacontraceptive
Credit approval datacreditapproval
Describe datadescribe_data
Drop a node from an FFT definitiondrop_nodes
Edit nodes in an FFT definitionedit_nodes
Clean factor variables in prediction datafact_clean
Fertility datafertility
Main function to create and apply fast-and-frugal trees (FFTs)FFTrees FFTrees-function
Calculate thresholds that optimize some statistic (goal) for cues in datafftrees_cuerank
Describe a fast-and-frugal tree (FFT) in wordsfftrees_ffttowords
Grow fast-and-frugal trees (FFTs) using the 'fan' algorithmsfftrees_grow_fan
Rank FFTs by current goalfftrees_ranktrees
Perform a grid search over factor and return accuracy statistics for a given factor cuefftrees_threshold_factor_grid
Perform a grid search over thresholds and return accuracy statistics for a given numeric cuefftrees_threshold_numeric_grid
Convert a verbal description of an FFT into an 'FFTrees' objectfftrees_wordstofftrees
Open the *FFTrees* package guideFFTrees.guide
Flip exits in an FFT definitionflip_exits
Forest fires dataforestfires
Select the best tree (from current set of FFTs)get_best_tree
Get exit type (from a vector 'x' of FFT exit descriptions)get_exit_type
Get FFT definitions (from an 'FFTrees' object 'x')get_fft_df
Cue costs for the 'heartdisease' dataheart.cost
Heart disease testing dataheart.test
Heart disease training dataheart.train
Heart disease dataheartdisease
Provide a verbal description of an FFTinwords
Iris datairis.v
Mushrooms datamushrooms
Plot an 'FFTrees' objectplot.FFTrees
Predict classification outcomes or probabilities from datapredict.FFTrees
Print basic information of fast-and-frugal trees (FFTs)print.FFTrees
Read an FFT definition from tree definitionsread_fft_df
Reorder nodes in an FFT definitionreorder_nodes
Select nodes from an FFT definitionselect_nodes
Visualize cue accuracies (as points in ROC space)showcues
Sonar datasonar
Summarize an 'FFTrees' objectsummary.FFTrees
Titanic survival datatitanic
Voting datavoting
Wine tasting datawine
Write an FFT definition to tree definitionswrite_fft_df