Ensemble Prediction Statistics#

abil.unified_tree_or_bag.estimate_prediction_quantiles(model, X_predict, X_train, y_train, cv=None, chunksize=20000, threshold=0.5)#

Train the model using cross-validation, compute predictions on X_train with summary stats, and predict on X_predict with summary stats.

Parameters:#

X_trainDataFrame

Training feature set with MultiIndex for coordinates.

y_trainSeries

Target values corresponding to X_train.

X_predictDataFrame

Feature set to predict on, with MultiIndex for coordinates.

m : sklearn pipeline

cv_splitsint, default=5

Number of cross-validation splits.

methodstr, default=”rf”

Method type for handling different model-specific behaviors: “rf” for RandomForestRegressor, “bagging” for BaggingRegressor, “xgb” for XGBRegressor.

Returns:#

dict

Dictionary containing summary statistics for both training and prediction datasets. Keys: “train_stats”, “predict_stats”.