summary() on a classification tree or forest now
reports a per-class error rate alongside each confusion matrix, and
prints the overall error rate above the matrix rather than below it. A
class with no observations in the data is shown as - rather
than nan% — this happens when the model predicts a class
that never appears as an actual label, for example when predicting on a
subset of the data.ppforest2.text_edge,
ppforest2.text_tick, ppforest2.text_leaf,
ppforest2.text_proj), and ppforest2.text_scale
multiplies all of them at once for rendering the plot large..00429 / -.0391 / .0259 / .0335 rendered as
.00 / .04 / .03 / .03, merging the two petal terms and
dropping sepal length to zero.pptr() and pprf() no longer abort with the
internal error
Grouping::init: partition must be rooted at row 0 when the
response’s class blocks are contiguous but ordered by decreasing factor
level (for example a two-class factor whose first row is its second
level, or the bundled crab dataset with default
alphabetical levels). The classification path now sorts the response
into ascending group-id order whenever it is not already, matching the
regression path and the command-line tool.hardware_concurrency() may report 0, and a non-positive
OpenMP thread count is undefined behavior.Eigen::indexing::all instead
of Eigen::all, which Eigen 5 no longer accepts as an index,
so the package builds with the upcoming RcppEigen release based on Eigen
5 as well as with the current one based on Eigen 3.4.0.-Wdeprecated-declarations warning reported by
CRAN’s macOS/M1mac additional check (Apple clang 21, macOS 26 SDK). The
newer libc++ deprecates
std::char_traits<unsigned char>, which the vendored
nlohmann/json instantiates through its binary output/stream adapters
(std::basic_string<std::uint8_t> /
std::basic_ostream<std::uint8_t>). ppforest2 does not
use the nlohmann/json binary formats, so the vendored
json.hpp is now bracketed with a _Pragma guard
that suppresses the deprecation. _Pragma (unlike
#pragma) is not flagged by R CMD check’s
pragma check. The guard is applied by make r-vendor-deps
(scripts/vendor-guard-json.sh).Makevars instead of CMake, with no network access or
downloaded dependencies at install time. Eigen is provided by RcppEigen;
nlohmann/json and pcg headers are vendored under
inst/include. This makes the package installable on CRAN’s
offline build machines.EIGEN_NO_AUTOMATIC_RESIZING on all platforms and
EIGEN_DONT_VECTORIZE on Windows.-Wall -Wextra -pedantic).EIGEN_VERSION_AT_LEAST(3, 4, 0) guard
fails the build with a clear message if an incompatible Eigen is
supplied via RcppEigen.make r-vendor-deps re-vendors the committed json/pcg
headers after a version bump.DESCRIPTION uses Authors@R and cites the
projection-pursuit tree and forest references with DOIs.\donttest
with requireNamespace() guards instead of
\dontrun, so they run under --run-donttest
when the suggested packages are available.cran-comments.md. The package passes
R CMD check --as-cran with no errors or warnings; remaining
notes (new submission, cosmetic pragmas in the vendored nlohmann/json
headers) are documented for the reviewer.pptr() and pprf() with formula and matrix
interfaces. Returned models carry an S3 class vector identifying both
model type and mode
(e.g. c("pprf_classification", "pprf", "ppmodel")).predict() returns group labels
(type = "class") or vote proportions
(type = "prob") for classification.oob_error(),
oob_predictions(), oob_samples(),
bag_samples(), permuted_importance(),
weighted_importance() — compute from the training data
stored on the model on first access and memoize in an environment cache,
so training is fast and repeated access is free.
oob_error() is NA_real_ and
oob_predictions() returns a factor with NA for
rows with no OOB tree.summary() displays training and OOB confusion
matrices.save_json() and load_json() for model
persistence. Optional metrics fields use a uniform
null-or-value representation so downstream tooling can
distinguish “computed but empty” from other shapes without
special-casing.pp_tree() and
pp_rand_forest() model specifications.datasets::iris from base R for iris examples.)Regression support is included but untested in production workloads. API surface and defaults may change in future releases.
y is numeric (not a
factor). predict() returns a numeric vector
(type = "response").grouping_by_cutpoint(),
leaf_mean_response(), stop_min_size(),
stop_min_variance(), stop_any(). Training
quantile-slices the continuous response into groups and fits
mean-response leaves.summary() displays MSE / MAE / R² for regression
models, computed for training and out-of-bag predictions; forest OOB
error is reported as MSE. oob_predictions() returns a
numeric vector with NA_real_ for rows with no OOB
tree.save_json() / load_json() preserve
regression mode; parsnip pp_tree() /
pp_rand_forest() accept
mode = "regression".california_housing (20,433 ×
9, predict median_house_value). For smaller regression
examples use datasets::mtcars from base R.