Skip to main content

cancel

汇总

CrossValidationResult 类由 交叉验证 工具返回,且具有访问为任何地统计图层生成的交叉验证结果的权限。

讨论

CrossValidationResult 类除了包含附加只读属性外,与 Result 类相似。有关详细帮助信息,请参阅 交叉验证 工具。

对于 反距离权重法全局多项式插值法径向基函数插值法含障碍的扩散插值法含障碍的核插值法 ,只提供平均误差和均方根误差结果。

90% 区间、95% 区间和平均 CRPS 仅适用于 经验贝叶斯克里金法EBK 回归预测工具 模型。

语法

cancel()

属性

名称 说明 数据类型

averageCRPS

(只读)

所有点的平均连续分级概率评分 (CRPS)。

Double

averageStandard

(只读)

预测标准误差的平均值。

Double

count

(只读)

输入样本的数量。

Long

inputCount

(只读)

输入数量。

Integer

maxSeverity

(只读)

指定消息的最大严重性。

  • 0—工具仅生成了信息性消息。

  • 1—工具生成了警告消息,但未出现错误消息。

  • 2—工具生成了错误消息。

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

(只读)

指定作业状态。

  • 0—作业状态为“新”。

  • 1—作业状态为“已提交”。

  • 2—作业状态为“等待”。

  • 3—作业状态为“正在执行”。

  • 4—作业状态为“成功”。

  • 5—作业状态为“失败”。

  • 6—作业状态为“超时”。

  • 7—作业状态为“正在取消”。

  • 8—作业状态为“已取消”。

  • 9—作业状态为“正在删除”。

  • 10—作业状态为“已删除”。

Integer

方法

cancel()

取消关联作业。

getInput(index)

以字符串或 RecordSet 对象的形式返回给定的输入。

名称 说明 数据类型

index

The index position of the input as an integer, or the parameter name.

Variant

返回值

数据类型 说明

Variant

作为 RecordSet 对象或字符串输入。

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.

  • 0—Informative, warning, and error messages are returned.

  • 1—Only warning messages are returned.

  • 2—Only error messages are 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

输出为 RecordSet 或者字符串形式。

如果工具(如 创建要素图层 )的输出是一个图层,则 getOutput 将返回 Layer 对象。

还可以通过整型索引或名称访问结果输出。 例如,要从 获取计数 工具访问记录计数, result.getOutput(0)result[0]result.getOutput("row_count")result["row_count"] 是等效的。

getSeverity(index)

指定特定消息的严重性。

名称 说明 数据类型

index

The message index position.

Integer

返回值

数据类型 说明

Integer

特定消息的严重性。

  • 0—Informative, warning, and error messages are returned.

  • 1—Only warning messages are returned.

  • 2—Only error messages are returned.

代码示例

CrossValidation(Python 窗口)

对输入地统计图层执行交叉验证。

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))
CrossValidation(独立脚本)

对输入地统计图层执行交叉验证。

# 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))