| sce | R Documentation |
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.
sce(training_data, x, y, mfeature, nmin, ntree, alpha = 0.05,
resolution = 1000, verbose = FALSE, parallel = TRUE)
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) |
An S3 object of class "sce" containing the ensemble model.
sca, predict, importance, evaluate
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.