The Naive Bayes Classification tool executes the probabilistic naive Bayes algorithm against the provided input raster, then performs classification. This task applies Bayes' theorem with a strong assumption that all the predictors are independent to each other (i.e., the presence of a feature in a class is independent to the presence of any other feature in the same class).

This tool performs supervised classification on a single raster. You provide an input raster, ROIs, and parameter settings to generate a classified raster. For more advanced options, you can label data on one or more rasters in the Machine Learning Labeling Tool, train a model, and perform classification using the model in the Machine Learning Classification Tool, or build a workflow in the ENVI Modeler.

For background on the algorithm used, see Naive Bayes Classification.

  1. From the Toolbox, select Machine Learning > Supervised > Naive Bayes Classification. Naive Bayes Classification dialog appears.
  2. Click the Browse button next to the Input Raster field. In the Data Selection dialog that appears, select the input raster, perform optional spatial and spectral subsetting and/or masking, then click OK.
  3. Click the Browse button next to the Input ROIs field. In the ROI Selection dialog that appears, click the Open File button and select an ROI file (.xml) that indicates the labeled pixels for the desired classes in the training raster (the ROIs must fall within the boundary of the input raster), then click OK. In the Input ROIs field, select one or more ROIs to use in the classification. You can also define ROIs on the raster displayed in the view by clicking the Open ROI Tool button .
  4. Specify the ROI classes to use as background in the Background Labels field. These indicate classes of no interest.
  5. For Remove Outliers, select Yes to remove outliers using histogram stretching to increase the minimum and decrease the maximum data values. Select No to use the true minimum and maximum data ranges to normalize the data.

  6. For Balance Classes, select Yes or No to specify whether all classes should be considered equal during training. Selecting Yes helps to account for classes with few samples compared to classes with many samples.

  7. In the Output Raster field, enter a location and filename for the classification raster.
  8. In the Output Model field, enter a location and filename for the model.
  9. Enable the Display result check box to display the output in the view when processing is complete.
  10. To reuse these task settings in future ENVI sessions, save them to a file. Click the down arrow and select Save Parameter Values, then specify the location and filename to save to. Note that some parameter types, such as rasters, vectors, and ROIs, will not be saved with the file. To apply the saved task settings, click the down arrow and select Restore Parameter Values, then select the file where you previously stored your settings.

  11. To run the process on a local or remote ENVI Server, click the down arrow and select Run Task in the Background or Run Task on remote ENVI Server name. The ENVI Server Job Console will show the progress of the job and will provide a link to display the result when processing is complete. See the ENVI Servers topic in ENVI Help for more information.

  12. To see a model-based version of this tool that shows how the tool is constructed from individual tasks, click Open in Modeler.

  13. Click OK.

See Also


ENVI Machine Learning Algorithms Background, TrainNaiveBayes Task, Extra Trees Classification Tool, K-Neighbors Classification Tool, Linear SVM Classification Tool, Random Forest Classification Tool, RBF SVM Classification Tool