Label | Explanation | Data Type |
Model Definition | The .dlpk file or the .emd file. | File |
Prediction Type | Specifies the output file type that will be created.
| String |
Input Prediction Features | The features for which the prediction will be obtained. The input should include some or all the fields necessary to determine the dependent variable value. This parameter is required if the Prediction Type parameter is set to Predict feature. | Feature Layer; Table View |
Explanatory Rasters
(Optional) | A list of rasters that contain the explanatory rasters necessary to determine the dependent variable value. This parameter is required if the Prediction Type parameter is set to Predict raster. | Multivalue |
Distance Features
(Optional) | The point or polygon features whose distances from the input training features will be estimated automatically and added as explanatory variables. Distances will be calculated from each of the input explanatory training distance features to the nearest input training features. If the input explanatory training distance features are polygons, the distance attributes will be calculated as the distance between the closest segments of the pair of features. | Feature Layer |
Output Prediction Features
| The output table or feature class. | Feature Class; Table |
Output Prediction Surface
| The path to where the output prediction raster will be saved. | Folder |
Match Explanatory Variables
(Optional) | The mapping of field names from the prediction set to the training set. Use this parameter if the field names of the training and prediction sets are different. The values are the field names in the prediction dataset that match the field names in the input feature class. | Value Table |
Match Distance Variables (Optional) | The mapping of distance feature names from the prediction set to the training set. Use this parameter if the distance feature names used in the training and prediction sets are different. The string values are the feature names that were used for prediction that match the distance features names used for training. | Value Table |
Match Explanatory Rasters
(Optional) | The mapping of names from the prediction rasters to the training rasters. Use this parameter if the names of the explanatory rasters used for prediction and the names of the corresponding rasters used during training are different. The string values are the explanatory raster names that were used for prediction that match the explanatory raster names used for training. | Value Table |
Summary
Predicts continuous variables (regression) or categorical variables (classification) on unseen compatible datasets using a trained .dlpk model produced by the Train Using AutoML tool.
Usage
You must install the proper deep learning framework for Python in ArcGIS Pro.
The input is an Esri model definition file (.emd) or a deep learning package file (.dlpk), which can be created using the Train Using AutoML tool.
A Spatial Analyst license is required to use rasters as explanatory variables or to predict to an Output Prediction Surface.
For information about requirements for running this tool and issues you may encounter, see Deep Learning frequently asked questions.
Parameters
arcpy.geoai.PredictUsingAutoML(in_model_definition, prediction_type, in_features, {explanatory_rasters}, {distance_features}, out_prediction_features, out_prediction_surface, {match_explanatory_variables}, {match_distance_variables}, {match_explanatory_rasters})
Name | Explanation | Data Type |
in_model_definition | The .dlpk file or the .emd file. | File |
prediction_type | Specifies the output file type that will be created.
| String |
in_features | The features for which the prediction will be obtained. The input should include some or all the fields necessary to determine the dependent variable value. This parameter is required if the prediction_type parameter is set to PREDICT_FEATURE. | Feature Layer; Table View |
explanatory_rasters [explanatory_rasters,...] (Optional) | A list of rasters that contain the explanatory rasters necessary to determine the dependent variable value. This parameter is required if the prediction_type parameter is set to PREDICT_RASTER. | Multivalue |
distance_features [distance_features,...] (Optional) | The point or polygon features whose distances from the input training features will be estimated automatically and added as explanatory variables. Distances will be calculated from each of the input explanatory training distance features to the nearest input training features. If the input explanatory training distance features are polygons, the distance attributes will be calculated as the distance between the closest segments of the pair of features. | Feature Layer |
out_prediction_features | The output table or feature class. | Feature Class; Table |
out_prediction_surface | The path to where the output prediction raster will be saved. | Folder |
match_explanatory_variables [match_explanatory_variables,...] (Optional) | The mapping of field names from the prediction set to the training set. Use this parameter if the field names of the training and prediction sets are different. The values are the field names in the prediction dataset that match the field names in the input feature class. | Value Table |
match_distance_variables [match_distance_variables,...] (Optional) | The mapping of distance feature names from the prediction set to the training set. Use this parameter if the distance feature names used in the training and prediction sets are different. The string values are the feature names that were used for prediction that match the distance features names used for training. | Value Table |
match_explanatory_rasters (Optional) | The mapping of names from the prediction rasters to the training rasters. Use this parameter if the names of the explanatory rasters used for prediction and the names of the corresponding rasters used during training are different. The string values are the explanatory raster names that were used for prediction that match the explanatory raster names used for training. | Value Table |
Code sample
This example shows how to use the PredictUsingAutoML function.
# Name: PredictUsingAutoML.py
# Description: Predicts on feature or tabular data with
# the trained model obtained by the TrainUsingAutoML function.
# Import system modules
import arcpy
import os
# Set local variables
datapath = "path_to_data_for_prediction"
out_path = "path_to_gdb_for_predicted"
model_path = os.path.join(out_path, "model.dlpk")
in_feature = os.path.join(datapath, "test_data.gdb", "test_data")
out_feature = os.path.join(out_path, "predicted_feature.gdb", "predicted")
# Run Predict Using AutoML Model
r = arcpy.geoai.PredictUsingAutoML(model_path, "PREDICT_FEATURES",
in_feature,
None, None, out_feature)
Environments
Licensing information
- Basic: No
- Standard: No
- Advanced: Yes