awe is an end-to-end R framework that carries a data set through the entire analytical workflow in one call:
Import -> Explore -> Model -> Ensemble/Tune -> Wrap -> Explain -> Evaluate -> Communicate
# from a local source tarball
install.packages("awe_0.2.0.tar.gz", repos = NULL, type = "source")
# or, once pushed to GitHub
# install.packages("remotes")
remotes::install_github("olawaleawe/awe")library(awe)
fit <- awe(mtcars, target = "mpg") # silent by default in scripts
fit <- awe(mtcars, target = "mpg", verbose = TRUE) # progress via message()
summary(fit) # exploratory summary + leaderboard + evaluation + story
plot(fit) # permutation importance
plot(fit, type = "pdp", var = "wt") # partial dependence (with ICE curves)
plot(fit, type = "leaderboard") # cross-validated model comparison
plot(fit, type = "residuals") # regression diagnostics (continuous targets)
predict(fit) # predictions on the training split
explain(fit) # AWEExplainer object
report(fit, format = "html") # writes a report (HTML if rmarkdown/pandoc available)Classification works the same way: the target type (continuous, binary, multiclass) is detected automatically, and binary targets additionally get ROC/AUC and a confusion-matrix heatmap:
fit <- awe(iris, target = "Species")
plot(fit, type = "roc") # binary targets only
plot(fit, type = "confusion")e <- awe_explore(mtcars, target = "mpg")
sp <- awe_preprocess(mtcars, target = "mpg")
m <- awe_model(sp$train, target = "mpg")
ens <- awe_ensemble(m, top_n = 3) # performance-weighted ensemble of top candidates
tn <- awe_tune(sp$train, target = "mpg", model = "random_forest") # grid-search tuning
w <- awe_wrap(m)
xp <- awe_explain(w)
ev <- awe_evaluate(w, newdata = sp$test)
st <- awe_story(list(explore = e, model = m, explainer = xp, evaluation = ev))awe_explore(),
eda_univariate(), eda_bivariate(),
eda_report() (combined multi-panel overview),
awe_preprocess() (with stratified train/test splitting),
awe_select_features() (near-zero-variance, correlation, and
univariate filters), awe_model() (automatic candidate model
selection with k-fold cross-validation, in the spirit of
caret::train()), awe_registry() (list every
candidate available without fitting anything), and
awe_tune() (grid-search hyperparameter tuning for
decision_tree / random_forest /
glmnet / svm_radial).awe_wrap() bundles any fitted
model into a single AWEWrapper object with a consistent
predict() interface. Use which = to wrap any
specific candidate, not just the overall best.
awe_ensemble() combines the top-N cross-validated
candidates into a performance-weighted ensemble (weighted average for
regression, weighted vote for classification) that behaves like any
other AWEWrapper. awe_save() /
awe_load() persist any AWE object to/from disk.awe_explain() computes
permutation importance and partial dependence / ICE curves in base R,
adds SHAP-style variable importance automatically when
DALEX is installed, and varImp() gives a
caret-style importance table (using each engine’s native
importance measure when available, permutation importance
otherwise).awe_compare() stacks the
leaderboards of several runs (e.g. different feature sets) side by side,
with a grouped-bar plot() method.Base learners (lm/glm, rpart,
and a dependency-free k-NN) always run so awe_model() never
fails for lack of a suggested package. When installed, these are added
automatically as extra candidates. Call
awe_registry("continuous") /
awe_registry("binary") /
awe_registry("multiclass") to list everything that would be
tried, without fitting anything.
| Package | Candidate(s) |
|---|---|
randomForest |
Random forest |
ranger |
Fast random forest (+ probability variant) |
nnet |
Multinomial logistic / neural net |
e1071 |
SVM (radial & linear), naive Bayes |
kernlab |
SVM (ksvm, radial) |
glmnet |
Ridge, lasso, elastic net, regularized logistic |
gbm |
Gradient boosting |
class |
k-nearest neighbours (classification) |
MASS |
LDA, QDA, robust regression (rlm) |
earth |
MARS |
pls |
Partial least squares regression |
xgboost |
XGBoost |
Restrict the candidates tried with
awe_model(data, target, models = c(...)).
A consistent visual identity (theme_awe(),
awe_palette()) is used throughout; every plotting function
uses ggplot2 when installed and falls back to base graphics
otherwise, so nothing here requires a specific plotting package.
eda_univariate() / eda_bivariate() /
eda_report(): distribution, relationship, and combined
multi-panel overview plotsplot_correlation(): correlation heatmapplot_missingness(): missing-value overviewplot_feature_selection(): univariate association
scores, selected vs. droppedplot_leaderboard(): cross-validated model
comparisonplot_tree(): visualise a decision-tree candidate
(rpart.plot if installed)plot_roc(): ROC curve + rank-based AUC for binary
targetsplot_confusion(): confusion-matrix heatmapplot_residuals(): residuals-vs-fitted and normal Q-Q
(continuous targets)plot(varImp(wrapper)): variable importance bar
chartplot(cmp): grouped-bar comparison across
awe_compare() runsplot(fit, type = c("importance","pdp","leaderboard","tree","roc","confusion","residuals")):
all of the above directly from a full awe() resultEverything degrades gracefully: the package depends only on base R
plus rpart, so awe() always runs. Every other
engine listed above is optional (Suggests) and used
automatically whenever installed.
v0.2.0: passes R CMD check cleanly (one environment-only
NOTE about suggested packages not installable offline) with a 36-test
testthat suite. Routine engine warnings/messages
(convergence notices, verbosity from
glm/nnet/glmnet/gbm/etc.)
are suppressed internally so awe() output stays readable;
genuine fitting failures still surface with an informative message and
that one candidate is dropped.