Experimental

Fuzzy k-NN classification that yields soft class membership and optional probability surfaces.

remote_sensing classification knn fuzzy 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`
`k` | Number of neighbors (default 5). | Optional | `5`
`m` | Fuzzy exponent parameter (> 1; default 2.0). | Optional | `2.0`
`output` | Optional output classified raster path. | Optional | —
`probability_output` | Optional membership-probability raster path. | Optional | —

## Examples

Run fuzzy kNN and output both class and confidence rasters.

    wbe.fuzzy_knn_classification(class_field='class', inputs=['band1.tif', 'band2.tif', 'band3.tif'], k=7, m=2.0, output='fuzzy_knn_classified.tif', probability_output='fuzzy_knn_probability.tif', training_data='training.shp')

## Project Links

WbW Homepage User Manual Support WbW