Select to view content in your preferred language

EBK Regression Prediction: Geostatistical Wizard vs arcpy.ga.EBKRegressionPrediction

251
5
3 weeks ago
Labels (1)
AlbertC
Occasional Contributor

I've been working with the EBK Regression Prediction tool inside the Geostatistical Wizard, and I find it very powerful. One feature I particularly appreciate is how quickly I can get cross-validation statistics without having to export full output surfaces — this is great for testing covariates and neighborhood settings interactively.

However, once the model looks promising, I need the actual physical layers. So I use GA Layers to Rasters to export the prediction raster — which, by the way, isn't particularly fast.

Now that I’ve run several tests, I’d like to switch to Python to iterate over multiple fields and covariate combinations. But when looking at the documentation for arcpy.ga.EBKRegressionPrediction_ga(), I can’t figure out how to generate additional outputs like:

  • Standard error

  • Probability surfaces

  • Quantile surfaces

From the Wizard, I can generate these via GA Layers to Rasters, but in Python, I don’t see how to request them — nor do I see parameters like output_type or quantile_value.

I’m also a bit confused about the out_ga_layer parameter. It doesn’t seem to control the output type. So what is its purpose exactly in this context? How do I specify what kind of output I want?

One strength of the tool is the ability to generate the Output diagnostic feature class. On the other hand, I can't see how to get the cross validation stats in Python, I assume I can still get it using out_diagnostic_feature_class, and then calculate metrics myself — but there's no built-in summary like in the Wizard.

To sum up: It seems that when using the Wizard +  GA Layers to Rasters, I can access all expected outputs (prediction, standard error, probability, quantiles). But if I want to run the same process from Python, I can only get the prediction raster — and I lose both the optional outputs and the summary cross-validation stats.

My question is: Is there any way to programmatically generate all outputs available through the Wizard using EBKRegressionPrediction_ga() in Python?

0 Kudos
5 Replies
DanPatterson
MVP Esteemed Contributor

In the python section of the tool help, there is the optional parameter section which you may be looking for

GA Layer To Rasters (Geostatistical Analyst)—ArcGIS Pro | Documentation

additional_rasters
[[out_raster, output_type, quantile_probability_value],...]
(Optional)
Provide the name, output type, and quantile or probability value for each additional output raster. See the descriptions of parameters above for more information. These additional rasters will be saved in the same location as the Output raster.


... sort of retired...
0 Kudos
AlbertC
Occasional Contributor

Thank you for your answer Dan,
Yes, I know this tool allows me to export the additional outputs. But the  GA Layers to Rasters tool can only run, AFAIK, if you run first the EBK Regression from the Geostatistical Wizard. And this is precisely what I want to avoid. I want to run EBK Regression outside the Geostatistical Wizard.

0 Kudos
DanPatterson
MVP Esteemed Contributor

no wizard here, have you expanded the toolset in arctoolbox just like the ga layers to rasters.  All the wizardry is contained in the toolbox, permitting coding the whole workflow

gawizard.png


... sort of retired...
0 Kudos
AlbertC
Occasional Contributor

Yes, I know GA Layers to Rasters can be executed from here but you must create first the GA Layers!! This is the missing step.

0 Kudos
DanPatterson
MVP Esteemed Contributor
0 Kudos