How to predict map (gridded raster) after training and fit a machine learning model?
1 view (last 30 days)
Show older comments
Hi, The task is to do the classification from satellite imagery. I already did the following steps:
0. Prepare a Landsat 8 scene (4 bands), a ROI polygon.
1. Create the ROI and export to CSV file.
2. From ROI (csv file), XTrain, YTrain, XTest, YTest were made by 70% for training.
3. Trained and fitted a machine learning model (random forest, CCF).
4. Predicted from the test data (XTest) and saved in the variable Ypred.
Now, I would like to do the prediction for the whole image (with X will be Landsat 8 4 bands) to have the classified map.
My question is: How will I do this task in Matlab?
This can be done in R and Python. But my friend give me a piece of code in Matlab format and I start again from sratch. I found an article here:
https://au.mathworks.com/matlabcentral/answers/386232-how-to-convert-an-array-to-an-image
but seems not work for my case.
Any comments and links to useful docs will be very appreciation.
Thanks, Thang
0 Comments
Answers (0)
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!