cancel
汇总
CrossValidationResult 类由 交叉验证 工具返回,且具有访问为任何地统计图层生成的交叉验证结果的权限。
讨论
CrossValidationResult 类除了包含附加只读属性外,与 Result 类相似。有关详细帮助信息,请参阅 交叉验证 工具。
对于 反距离权重法 、 全局多项式插值法 、 径向基函数插值法 、 含障碍的扩散插值法 和 含障碍的核插值法 ,只提供平均误差和均方根误差结果。
90% 区间、95% 区间和平均 CRPS 仅适用于 经验贝叶斯克里金法 和 EBK 回归预测工具 模型。
语法
cancel()
属性
| 名称 | 说明 | 数据类型 |
|---|---|---|
|
averageCRPS (只读) |
所有点的平均连续分级概率评分 (CRPS)。 |
Double |
|
averageStandard (只读) |
预测标准误差的平均值。 |
Double |
|
count (只读) |
输入样本的数量。 |
Long |
|
inputCount (只读) |
输入数量。 |
Integer |
|
maxSeverity (只读) |
指定消息的最大严重性。
|
Integer |
|
meanError (只读) |
测量值与预测值之间的平均差值。 |
Double |
|
meanStandardized (只读) |
平均值标准误差。 |
Double |
|
messageCount (只读) |
消息数量。 |
Integer |
|
outputCount (只读) |
输出数量。 |
Integer |
|
percentIn90Interval (只读) |
位于 90% 交叉验证置信区间内的点的百分比。 |
Double |
|
percentIn95Interval (只读) |
位于 95% 交叉验证置信区间内的点的百分比。 |
Double |
|
resultID (只读) |
作业 ID。 如果工具不是地理处理服务,则值将为 |
String |
|
rootMeanSquare (只读) |
均方根误差。 |
Double |
|
rootMeanSquareStandardized (只读) |
如果预测标准误差有效,则标准均方根误差应接近 1。如果标准均方根误差大于 1,则说明预测中对变化性估计不足。如果标准化均方根误差小于 1,则说明预测中对变化性估计过高。 |
Double |
|
status (只读) |
指定作业状态。
|
Integer |
方法
cancel()
取消关联作业。
getInput(index)
以字符串或 RecordSet 对象的形式返回给定的输入。
| 名称 | 说明 | 数据类型 |
|---|---|---|
|
index |
The index position of the input as an integer, or the parameter name. |
Variant |
返回值
| 数据类型 | 说明 |
|---|---|
|
Variant |
作为 |
getMapImageURL({parameter_list}, {height}, {width}, {resolution})
返回给定输出的地图服务影像(如果存在)。
| 名称 | 说明 | 数据类型 |
|---|---|---|
|
parameter_list (可选) |
The parameters 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 |
返回值
| 数据类型 | 说明 |
|---|---|
|
String |
地图影像的 URL。 |
getMessage(index)
按索引位置返回特定消息。
| 名称 | 说明 | 数据类型 |
|---|---|---|
|
index |
The index position of the message. |
Integer |
返回值
| 数据类型 | 说明 |
|---|---|
|
String |
地理处理消息。 |
getMessages({severity})
返回地理处理工具消息。
| 名称 | 说明 | 数据类型 |
|---|---|---|
|
severity (可选) |
The type of messages to be returned.
Not specifying a severity level will return all types of messages. (默认值为 0) |
Integer |
返回值
| 数据类型 | 说明 |
|---|---|
|
String |
地理处理工具消息。 |
getOutput(index)
以 RecordSet 对象或字符串形式返回给定的输出。
如果工具(如 创建要素图层 )的输出是一个图层,则 getOutput 将返回 Layer 对象。
| 名称 | 说明 | 数据类型 |
|---|---|---|
|
index |
The index position of the output as an integer, or the parameter name. |
Variant |
返回值
| 数据类型 | 说明 |
|---|---|
|
Variant |
输出为 如果工具(如 创建要素图层 )的输出是一个图层,则 还可以通过整型索引或名称访问结果输出。 例如,要从 获取计数 工具访问记录计数, |
getSeverity(index)
指定特定消息的严重性。
| 名称 | 说明 | 数据类型 |
|---|---|---|
|
index |
The message index position. |
Integer |
返回值
| 数据类型 | 说明 |
|---|---|
|
Integer |
特定消息的严重性。
|
代码示例
对输入地统计图层执行交叉验证。
import arcpy
arcpy.env.workspace = "C:/gapyexamples/data"
cvResult = arcpy.ga.CrossValidation("C:/gapyexamples/data/kriging.lyr")
print("Root Mean Square error = " + str(cvResult.rootMeanSquare))
对输入地统计图层执行交叉验证。
# 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"
# Run CrossValidation
cvResult = arcpy.ga.CrossValidation(inLayer)
print("Root Mean Square error = " + str(cvResult.rootMeanSquare))