CrossValidationResult (arcpy)
Resumen
The CrossValidationResult class is returned by the Cross Validation tool and contains access to the cross-validation results that can be generated for any geostatistical layer.
Debate
The CrossValidationResult class is similar to Result class except for the additional read-only properties that it contains. For detailed help, see the Cross Validation tool help.
Only the mean and root mean square error results are available for IDW, global polynomial interpolation, radial basis functions, diffusion interpolation with barriers, and kernel interpolation with barriers.
Propiedades
Propiedad | Explicación | Tipo de datos |
averageStandard (Sólo lectura) |
The average of the prediction standard errors. | Double |
count (Sólo lectura) |
The number of input samples. | Long |
inputCount (Sólo lectura) |
Returns the number of inputs. | Integer |
maxSeverity (Sólo lectura) |
Returns the maximum severity of the messages.
| Integer |
meanError (Sólo lectura) |
The averaged difference between the measured and the predicted values. | Double |
meanStandardized (Sólo lectura) |
Mean standardized error. | Double |
messageCount (Sólo lectura) |
Returns the number of messages. | Integer |
outputCount (Sólo lectura) |
Returns the number of outputs. | Integer |
resultID (Sólo lectura) |
Gets the job ID. If the tool is not a geoprocessing service, the resultID will be "". | String |
rootMeanSquare (Sólo lectura) |
The root mean square error. | Double |
rootMeanSquareStandardized (Sólo lectura) |
The root mean square standardized error should be close to 1 if the prediction standard errors are valid. If the root mean square standardized error is greater than 1, you are underestimating the variability in your predictions. If the root mean square standardized error is less than 1, you are overestimating the variability in your predictions. | Double |
status (Sólo lectura) |
Gets the job status.
| Integer |
Descripción general de los métodos
Método | Explicación |
cancel () |
Cancels an associated job |
getInput (index) |
Returns a given input, either as a recordset or string. |
getMapImageURL ({parameter_list}, {height}, {width}, {resolution}) |
Gets a map service image for a given output, if one exists. |
getMessage (index) |
Returns a specific message. |
getMessages ({severity}) |
Returns messages. |
getOutput (index) |
Returns a given output, either as a recordset or a string. If the output of the tool, such as MakeFeatureLayer is a layer, getOutput will return a Layer object. |
getSeverity (index) |
Returns the severity of a specific message. |
Métodos
Parámetro | Explicación | Tipo de datos |
index |
The index position of the input. | Integer |
Tipo de datos | Explicación |
Object |
The input, either as a recordset or string. |
Parámetro | Explicación | Tipo de datos |
parameter_list |
Parameter(s) on which the map service image will be based. | Integer |
height |
The height of the image. | Double |
width |
The width of the image. | Double |
resolution |
The resolution of the image. | Double |
Tipo de datos | Explicación |
String |
The URL of the map image. |
Parámetro | Explicación | Tipo de datos |
index |
The index position of the message. | Integer |
Tipo de datos | Explicación |
String |
The geoprocessing message. |
Parámetro | Explicación | Tipo de datos |
severity |
The type of messages to be returned: 0=message, 1=warning, 2=error. Not specifying a value returns all message types.
(El valor predeterminado es 0) | Integer |
Tipo de datos | Explicación |
String |
The geoprocessing messages. |
Parámetro | Explicación | Tipo de datos |
index |
The index position of the outputs. | Integer |
Tipo de datos | Explicación |
Object |
The output, either as a recordset or a string. If the output of the tool, such as MakeFeatureLayer is a layer, getOutput will return a Layer object. Result outputs can also be accessed by index, so result.getOutput(0) and result[0] are equivalent. |
Parámetro | Explicación | Tipo de datos |
index |
The message index position. | Integer |
Tipo de datos | Explicación |
Integer |
The severity of the specific message.
|
Ejemplo de código
Perform cross-validation on an input geostatistical layer.
import arcpy
arcpy.env.workspace = "C:/gapyexamples/data"
cvResult = arcpy.CrossValidation_ga("C:/gapyexamples/data/kriging.lyr")
print "Root Mean Square error = " + str(cvResult.rootMeanSquare)
Perform cross-validation on an input geostatistical layer.
# Name: CrossValidation_Example_02.py
# Description: Perform cross validation on an input geostatistical layer.
# Requirements: Geostatistical Analyst Extension
# Import system modules
import arcpy
# Set environment settings
arcpy.env.workspace = "C:/gapyexamples/data"
# Set local variables
inLayer = "C:/gapyexamples/data/kriging.lyr"
# Check out the ArcGIS Geostatistical Analyst extension license
arcpy.CheckOutExtension("GeoStats")
# Execute CrossValidation
cvResult = arcpy.CrossValidation_ga(inLayer)
print "Root Mean Square error = " + str(cvResult.rootMeanSquare)