Hello Bartłomiej,
Thank you for reaching out about this issue. The main problem here is the misleading error message. This problem arises when some categories in the prediction dataset does not exist in the training dataset. For instance, say one of your predictors in training is land-use with categories Forest, Water, Built and the prediction land-use raster has categories Forest, Water, Built, Farm. The extra category in your prediction raster triggers this error message which is a misleading error message. Since Forest-Based Classification and Regression (FBCR) cannot use the unseen category, Farm, in prediction, it throws this error. This is a known issue and we are working on a fix.
We also have a workaround for this problem.
1. Extract categories used in training. Run the FBCR tool in training mode and output "Output Training Features". The tool automatically extracts all the category values used in training to this feature class.
2. Find unique categories. Run Summary Statistics tool on the Output Training Feature Class from Step 1, with the field defined as the field containing extracted land use categories with statistic type Count and define the same field as the case field in the tool. This creates a feature class that contains counts of unique categories. Alternatively, you can do a Ascending Sort on the Output Training Feature Class from Step 1 and make a note of all the unique categories.
3. Make a raster mask for the unique categories from Step 2 on the prediction raster. For this step, you would use run the raster calculator on your prediction raster with the following expression. Code below assumes that in step 2 you found that unique categories were Forest, Water and Built in your training dataset
InList("name_of_pred_raster", ['Forest', 'Water', 'Built'])
The output of this tool will be the masked prediction raster that only contains the categories in your training raster.
4. Go back to FBCR and switch the mode over to Predict to Raster. For the land use raster use the raster output from Step 3.
Please reach out if the workaround does not work.
Best,
Orhun