Subset Features (Geostatisical Analyst)

Resumen

Divides the original dataset into two parts: one part to be used to model the spatial structure and produce a surface, the other to be used to compare and validate the output surface.

Learn more about Subset Features

Uso

Sintaxis

SubsetFeatures_ga (in_features, out_training_feature_class, {out_test_feature_class}, {size_of_training_dataset}, {subset_size_units})
ParámetroExplicaciónTipo de datos
in_features

Points, lines, polygon features or table from which to create a subset.

Table View
out_training_feature_class

The subset of training features to be created.

Feature Class; Table
out_test_feature_class
(Opcional)

The subset of test features to be created.

Feature Class; Table
size_of_training_dataset
(Opcional)

The size of the output training feature class, entered either as a percentage of the input features or as an absolute number of features.

Double
subset_size_units
(Opcional)

Type of subset size.

  • PERCENTAGE_OF_INPUTThe percentage of the input features that will be in the training dataset.
  • ABSOLUTE_VALUEThe number of features that will be in the training dataset.
Boolean

Ejemplo de código

SubsetFeatures example 1 (Python window)

Randomly split the features into two feature classes.

import arcpy
arcpy.env.workspace = "C:/gapyexamples/data"
arcpy.SubsetFeatures_ga("ca_ozone_pts", "C:/gapyexamples/output/training", "", "",
                  "PERCENTAGE_OF_INPUT")
SubsetFeatures example 2 (stand-alone script)

Randomly split the features into two feature classes.

# Name: SubsetFeatures_Example_02.py
# Description: Randomly split the features into two feature classes.
# Requirements: Geostatistical Analyst Extension

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = "C:/gapyexamples/data"

# Set local variables
inPointFeatures = "ca_ozone_pts.shp"
outtrainPoints = "C:/gapyexamples/output/training.shp"
outtestPoints = ""
trainData = ""
subsizeUnits = "PERCENTAGE_OF_INPUT"

# Check out the ArcGIS Geostatistical Analyst extension license
arcpy.CheckOutExtension("GeoStats")

# Execute SubsetFeatures
arcpy.SubsetFeatures_ga(inPointFeatures, outtrainPoints, outtestPoints, trainData,
                        subsizeUnits)

Entornos

Temas relacionados

Información de licencia

ArcView: Requiere Geostatistical Analyst
ArcEditor: Requiere Geostatistical Analyst
ArcInfo: Requiere Geostatistical Analyst

7/11/2012