plot.prtree.cv: Plot method for PRTree Cross-Validation objects

View source: R/prtree_cv_methods.R

plot.prtree.cvR Documentation

Plot method for PRTree Cross-Validation objects

Description

Provides visualizations for cross-validation results of Probabilistic Regression Trees.

Usage

## S3 method for class 'prtree.cv'
plot(x, which = NULL, ncol = NULL, ...)

Arguments

x

An object of class prtree.cv, as returned by pr_tree_cv.

which

Which plots to produce. Options are:

  • 1: RMSE across iterations/folds - Shows validation and test RMSE for each iteration/fold.

    \item `2`: \strong{Selected sigma values} - Values of selected sigma
          across iterations/folds. Colors distinguish features.
    
    \item `3`: \strong{Distribution of sigma} - For single feature: histogram;
          for multiple features: boxplots colored by feature.
    
    \item `4`: \strong{Sigma vs Validation RMSE} - Scatter plot with LOESS smooth
          to show relationship between selected sigma and validation RMSE.
    

If NULL (default), shows all applicable plots.

ncol

Integer. Number of columns in the plot layout. If NULL (default), an appropriate number of columns is chosen automatically.

...

Further arguments passed to ggplot2 (e.g., size, alpha).

Value

Invisibly returns the original object.


PRTree documentation built on Nov. 23, 2026, 9:08 a.m.