InsideForestRegionClusterer
The canonical traditional supervised-region clusterer. The random forest generates branches; predict returns region cluster IDs and score returns adjusted mutual information.
from InsideForest import InsideForestRegionClusterer
model = InsideForestRegionClusterer(rf_params={"random_state": 42})
cluster_ids = model.fit_predict(X_train, y_train)
assignments = model.assign_regions(X_test)
regions = model.explain_regions(top_n=10)
quality = model.region_quality_report(X_test, y_test)
Output contract
predict(X)returns region-cluster IDs, never target classes.- Rows outside every selected region return
-1. transform(X)returns a sample-by-region membership matrix.score(X, y)is adjusted mutual information (AMI), including-1.regions_,region_metrics_,labels_, andraw_regions_expose the fitted artifacts.
forest_ and feature_importances_ describe the branch-generating forest; they are not class predictions produced by the clusterer. The old InsideForestClassifier name remains deprecated for migration only.