sce: Stepwise Clustered Ensemble (SCE)

View source: R/SCE.R

sceR Documentation

Stepwise Clustered Ensemble (SCE)

Description

Builds a Stepwise Clustered Ensemble (SCE) model, which is an ensemble of SCA trees built using bootstrap samples and random feature selection, providing improved prediction accuracy and robustness.

Usage

sce(training_data, x, y, mfeature, nmin, ntree, alpha = 0.05,
    resolution = 1000, verbose = FALSE, parallel = TRUE)

Arguments

training_data

A data.frame containing the training data

x

Character vector of predictor variable names

y

Character vector of predictant variable names

mfeature

Number of features to randomly select for each tree

nmin

Minimum number of samples in a leaf node

ntree

Number of trees in the ensemble

alpha

Significance level for clustering (default: 0.05)

resolution

Resolution for splitting (default: 1000)

verbose

Print progress information (default: FALSE)

parallel

Use parallel processing (default: TRUE)

Value

An S3 object of class "sce" containing the ensemble model.

See Also

sca, predict, importance, evaluate

Examples


  # Load example data
  data(streamflow_training_10var)
  data(streamflow_testing_10var)

  # Define variables
  Predictors <- c("Prcp","SRad","Tmax","Tmin","VP","smlt","swvl1","swvl2","swvl3","swvl4")
  Predictants <- c("Flow")

  # Build SCE model
  sce_model <- sce(
    training_data = streamflow_training_10var,
    x = Predictors,
    y = Predictants,
    mfeature = round(0.5 * length(Predictors)),
    nmin = 5,
    ntree = 48,
    alpha = 0.05,
    resolution = 1000,
    parallel = FALSE
  )

  # Use S3 methods
  print(sce_model)
  summary(sce_model)
  sce_predictions <- predict(sce_model, streamflow_testing_10var)
  sce_importance <- importance(sce_model)
  sce_evaluation <- evaluate(sce_model, streamflow_testing_10var, streamflow_training_10var)


SCE documentation built on May 11, 2026, 9:07 a.m.

Related to sce in SCE...