Package: yaap 1.0.0

Teo Sakel

yaap: A Toolkit for Archetypal Analysis Methods

Fits archetypal analysis models, including Euclidean, probabilistic, kernel, and directional variants. Methods include classical archetypal analysis from Cutler and Breiman (1994) <doi:10.1080/00401706.1994.10485840>, PCHA and kernel variants from Mørup and Hansen (2012) <doi:10.1016/j.neucom.2011.06.033>, probabilistic archetypal analysis from Seth and Eugster (2016) <doi:10.1007/s10994-015-5498-8>, directional archetypal analysis from Olsen et al. (2022) <doi:10.3389/fnins.2022.911034>, AA++ initialization from Mair and Sjölund (2023) <doi:10.48550/arXiv.2301.13748>, coreset-style initialization from Mair and Brefeld (2019) <https://proceedings.neurips.cc/paper_files/paper/2019/file/7f278ad602c7f47aa76d1bfc90f20263-Paper.pdf>, and adapted AIC from Suleman (2017) <doi:10.1109/FUZZ-IEEE.2017.8015385>. Provides initialization helpers, model selection paths, plotting methods, 'broom' methods, and a 'tidymodels' recipe step.

Authors:Teo Sakel [aut, cre, cph], MCIU/AEI [fnd]

yaap_1.0.0.tar.gz
yaap_1.0.0.zip(r-4.7-any)yaap_1.0.0.zip(r-4.6-any)
yaap_1.0.0.tar.gz(r-4.7-any)yaap_1.0.0.tar.gz(r-4.6-any)
yaap_1.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
yaap/json (API)

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

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

3.30 score 7 scripts 266 downloads 22 exports 15 dependencies

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

TargetResultTimeFilesSyslog
linux-develOK154
source / vignettesOK287
linux-releaseOK173
windows-develOK122
windows-releaseOK127
wasm-releaseOK123

Exports:aa_initanamesanames<-archetypes_directionalarchetypes_kernel_pgdarchetypes_nnlsarchetypes_paaarchetypes_patharchetypes_pgdcompositionsconsistencycoordinatesfit_simplexonehotplot_archetypes_compositionsplot_archetypes_coordinatesplot_archetypes_lossplot_archetypes_profilesproj_l1proj_simplexrun_aastep_archetypes

Dependencies:cligenericsgluelatticelifecyclemagrittrMatrixmatrixStatsnnlspillarpkgconfigrlangtibbleutf8vctrs

Choosing an Initialization Method for Archetypal Analysis
Quick Start | Background | Methods at a Glance | The aa_init() Function | Supplying Your Own Initialization | Comparing Initializer Biases | Increasing the Number of Archetypes | When Initialization Matters | Nonlinear Geometries | Conclusions and Recommendations | Initialization Caveats | Method Reference | random | dirichlet | Furthest First ("furthest_first") | k-means++ ("kmeans_pp") | Furthest Sum ("furthest_sum") | Batched Coreset-Style Initialization | AA++ ("aa_pp") | Batched AA++ | Hull-outmost ("hull_outmost") | Session Information | References

Last update: 2026-06-07
Started: 2026-06-07

Introduction to Archetypal Analysis with yaap
What is Archetypal Analysis? | Relationship to other methods | The yaap package | A first example: the toy dataset | The archetypes result object | Visualizing the fit | Archetype positions in feature space | Working with "real" data: Fisher's iris | Naming archetypes from their defining observations | Archetype feature profiles | Sample compositions | Predicting reconstructions and compositions for new observations | Practical considerations | Choosing K | Scaling | Multiple restarts | Convergence | Variants of Canonical AA and their implementation in yaap | Relaxing the convex hull constraint with delta | Robust fitting | Missing data | Algorithm details | Algorithmic approaches: NNLS vs PGD | PGD Algorithm | Key arguments | Loss tracking | Conclusion | Limitations and challenges | Summary | Session info | References

Last update: 2026-06-07
Started: 2026-06-07

Metric and Non-Gaussian Variants of Archetypal Analysis
One simplex, several geometries | Metric Gaussian AA | Recipe: known measurement-error metric | Functional AA | Kernel AA | Probabilistic AA | Recipe: binary responses | Recipe: multinomial counts | Directional AA | Practical checklist | References

Last update: 2026-06-07
Started: 2026-06-07

Tidymodels Workflows with yaap
Overview | Using Archetypes in Recipes | Comparing step_archetypes() with step_pca() | Machine Learning Note | Declaring Tunable Parameters

Last update: 2026-06-07
Started: 2026-06-07

Readme and manuals

Help Manual

Help pageTopics
Archetypal Analysis Initialization Functionsaa_init
AIC for archetypes objectsAIC.archetypes
Archetype namesanames anames.archetypes anames<- anames<-.archetypes
Directional Archetypal Analysisarchetypes_directional
Kernel Archetypal Analysis using Projected Gradient Descentarchetypes_kernel_pgd
Archetypal Analysis using Non-Negative Least Squaresarchetypes_nnls
Probabilistic Archetypal Analysis using Projected Gradient Descentarchetypes_paa
Fit an Archetypes Path Across Karchetypes_path archetypes_path.default archetypes_path.formula
Archetypes Analysis using Projected Gradient Descentarchetypes_pgd
Augment data with composition weights from an archetypes modelaugment.archetypes augment.kernel_archetypes
Coefficients for archetypes objectscoefficients.archetypes
Consistency Between Archetypal Analysis Fitsconsistency consistency.archetypes
Access archetype coordinates and compositionscompositions compositions.archetypes coordinates coordinates.archetypes
Fit Data to Convex Hull defined by Archetypesfit_simplex
Fitted values for archetypes objectsfitted.archetypes
Glance at an archetypes modelglance.archetypes glance.kernel_archetypes
One-hot encode a vectoronehot onehot.character onehot.default onehot.factor
Composition Plot For Archetypesplot_archetypes_compositions
Coordinate Plot For Archetypesplot_archetypes_coordinates
Loss Plot For Archetypesplot_archetypes_loss
Profile Plot For Archetypesplot_archetypes_profiles
Plot method for archetypes objectsplot.archetypes
Predict compositions or reconstructions for new data from an archetypes modelpredict.archetypes
Predict compositions or reconstructions for directional archetypespredict.directional_archetypes
Predict method for kernel archetypespredict.kernel_archetypes
Residuals for archetypes objectsresiduals.archetypes
Residuals for kernel archetypes objectsresiduals.kernel_archetypes
Run Archetypal Analysisrun_aa run_aa.default run_aa.fd run_aa.formula
Scree Plot for an Archetypes Pathscreeplot.archetypes_path
Project rows of matrix onto the probability simplexproj_l1 proj_simplex simplex_projection
Archetypal Analysis Preprocessing Step for recipesstep_archetypes
Tidy an archetypes modeltidy.archetypes tidy.kernel_archetypes