Experimental

Supervised Random Forest classification for multisource raster features using point/polygon training data.

remote_sensing classification random_forest legacy-port

## Parameters

Name | Description | Required | Default
--- | --- | --- | ---
`inputs` | Array of single-band input rasters. | Required | `['band1.tif', 'band2.tif', 'band3.tif']`
`training_data` | Point/polygon vector training data path. | Required | `training.shp`
`class_field` | Class field in training_data attributes. | Required | `class`
`scaling` | Feature scaling mode: none (default), normalize, standardize. | Optional | `none`
`n_trees` | Number of trees in the forest (default 200). | Optional | `200`
`min_samples_leaf` | Minimum number of samples required at a leaf node (default 1). | Optional | `1`
`min_samples_split` | Minimum number of samples required to split an internal node (default 2). | Optional | `2`
`output` | Optional output raster path. | Optional | —

## Examples

Run random forest classification on multiband predictors.

    wbe.random_forest_classification(class_field='class', inputs=['band1.tif', 'band2.tif', 'band3.tif'], n_trees=300, output='rf_classification.tif', scaling='standardize', training_data='training.shp')

## Project Links

WbW Homepage User Manual Support WbW