Closed tekeali closed 4 years ago
Hi, sorry I'm not totally sure of what you mean. If you have made a classification map using pyspatialml, then you can simply use the estimator.predict
method with a filename that ends with '.tif' and then open this within a GIS?
Actually, my essential purpose is to produce susceptibility map. Firstly, I need to probability values of each pixels in the raster dataset. Then, I want to assign these probability values to raster pixels they belong to. Finally, I want to export this raster as tiff file to my directory and do some analysis in GIS environment .
Like this :- result_map = stack.predict(estimator=yourclassifiermodel, dtype='float32', nodata=-9999, file_path = r'C:\users\tekeali\DataOutputs\Susceptibility_Map.tif')
Or for a susceptibility map, i.e. the probability of assignment to a particular class (e.g. to a binary target), you will want:
result = stack.predict_proba(estimator=your_fitted_model, dtype="float32", nodata=-99999, file_path="your_output_file.tif")
Firstly, thank you for this code. I am trying to reclassify and evaluate the output map in GIS environment. How can I export this output map as '.tiff' file to my directory?