| Title: | PerpetualBooster |
|---|---|
| Description: | A self-generalizing gradient boosting machine that doesn't need hyperparameter optimization. |
| Authors: | Mutlu Simsek [aut, cre], Serkan Korkmaz [aut], Pieter Pel [aut] |
| Maintainer: | Mutlu Simsek <[email protected]> |
| License: | Apache License (== 2.0) |
| Version: | 2.1.0 |
| Built: | 2026-06-04 06:35:48 UTC |
| Source: | https://github.com/perpetual-ml/perpetual |
Perpetual is a self-generalizing gradient boosting machine that doesn't need hyperparameter optimization. It automatically finds the best configuration based on the provided budget.
perpetual( x, y, objective = "LogLoss", budget = NULL, iteration_limit = NULL, stopping_rounds = NULL, max_bin = NULL, num_threads = NULL, missing = NULL, allow_missing_splits = NULL, create_missing_branch = NULL, missing_node_treatment = NULL, log_iterations = NULL, quantile = NULL, reset = NULL, timeout = NULL, memory_limit = NULL, seed = NULL, calibration_method = NULL, save_node_stats = NULL, ... )perpetual( x, y, objective = "LogLoss", budget = NULL, iteration_limit = NULL, stopping_rounds = NULL, max_bin = NULL, num_threads = NULL, missing = NULL, allow_missing_splits = NULL, create_missing_branch = NULL, missing_node_treatment = NULL, log_iterations = NULL, quantile = NULL, reset = NULL, timeout = NULL, memory_limit = NULL, seed = NULL, calibration_method = NULL, save_node_stats = NULL, ... )
x |
A matrix or data.frame of features. |
y |
A vector of targets (numeric for regression, factor/integer for classification). |
objective |
A string specifying the objective function. Default is "LogLoss". |
budget |
A numeric value ensuring the training time does not exceed this budget (in normalized units). |
iteration_limit |
An integer limit on the number of iterations. |
stopping_rounds |
An integer for early stopping. |
max_bin |
Integer, max number of bins for histograms. |
num_threads |
Integer, number of threads to use. |
missing |
Value to consider as missing data. Default is NaN. |
allow_missing_splits |
Boolean. |
create_missing_branch |
Boolean. Whether to create a separate branch for missing values (ternary trees). |
missing_node_treatment |
String. How to handle weights for missing nodes if create_missing_branch is True. Options: "None", "AssignToParent", "AverageLeafWeight", "AverageNodeWeight". |
log_iterations |
Integer. |
quantile |
Numeric. |
reset |
Boolean. |
timeout |
Numeric. |
memory_limit |
Numeric. |
seed |
Integer seed for reproducibility. |
calibration_method |
String specifying the calibration method for prediction intervals. Options: "WeightVariance", "MinMax", "GRP", "Conformal". |
save_node_stats |
Boolean. Whether to save node statistics (required for some calibration methods and importance types). |
... |
Additional arguments. |
A PerpetualBooster object.
Get the base score of the model
perpetual_base_score(model)perpetual_base_score(model)
model |
A |
Numeric, base score.
Calibrate a PerpetualBooster model
perpetual_calibrate(model, x, y, x_cal, y_cal, alpha, method = NULL)perpetual_calibrate(model, x, y, x_cal, y_cal, alpha, method = NULL)
model |
A |
x |
Validation features. |
y |
Validation targets. |
x_cal |
Calibration features. |
y_cal |
Calibration targets. |
alpha |
Calibration parameter. |
method |
String specifying the calibration method to use. If NULL, uses the method configured in the model. |
Get feature importance
perpetual_importance(model, method = "gain", normalize = TRUE)perpetual_importance(model, method = "gain", normalize = TRUE)
model |
A |
method |
String, method for importance (e.g. "gain"). |
normalize |
Boolean. |
A named vector of importances.
Load a PerpetualBooster model
perpetual_load(path)perpetual_load(path)
path |
String, path to the saved model. |
A PerpetualBooster object.
Get the number of trees in the model
perpetual_n_trees(model)perpetual_n_trees(model)
model |
A |
Integer, number of trees.
Save a PerpetualBooster model
perpetual_save(model, path)perpetual_save(model, path)
model |
A |
path |
String, path to save the model. |
Dump model to JSON string
perpetual_to_json(model)perpetual_to_json(model)
model |
A |
String, JSON representation of the model.
PerpetualBooster object for creating and loading models.
PerpetualBoosterPerpetualBooster
An object of class list of length 2.
Predict using a PerpetualBooster model
## S3 method for class 'PerpetualBooster' predict( object, newdata, type = c("class", "prob", "raw", "contribution", "interval"), method = "average", ... )## S3 method for class 'PerpetualBooster' predict( object, newdata, type = c("class", "prob", "raw", "contribution", "interval"), method = "average", ... )
object |
A |
newdata |
A matrix or data.frame of new data to predict on. |
type |
Type of prediction: "class", "prob", "raw", "contribution", or "interval". |
method |
Method for prediction contributions. Default "average". |
... |
Additional arguments. |
A vector or matrix of predictions.
Print PerpetualBooster
## S3 method for class 'PerpetualBooster' print(x, ...)## S3 method for class 'PerpetualBooster' print(x, ...)
x |
A |
... |
Additional arguments. |