Note: This document is for an older version of GRASS GIS that is outdated. You should upgrade, and read the current manual page.
NAME
v.kcv - Randomly partition points into test/train sets.
KEYWORDS
vector, statistics, points
SYNOPSIS
v.kcv
v.kcv help
v.kcv [-d] map=name [layer=integer] k=integer [column=name] [--verbose] [--quiet]
Flags:
- -d
- Use drand48()
- --verbose
- Verbose module output
- --quiet
- Quiet module output
Parameters:
- map=name
- Name of input vector map
- layer=integer
- Layer number
- A single vector map can be connected to multiple database tables. This number determines which table to use.
- Default: 1
- k=integer
- Number of partitions
- Must be > 1
- column=name
- Name for new column to which partition number is written
- Default: part
DESCRIPTION
v.kcv randomly divides a points lists into k sets of
test/train data (for k-fold cross validation).
Test partitions are mutually exclusive. That is, a point will
appear in only one test partition and k-1 training partitions.
The program generates a random point using the selected
random number generator and then finds the closest point to
it. This site is removed from the candidate list (meaning
that it will not be selected for any other test set) and
saved in the first test partition file. This is repeated
until enough points have been selected for the test partition.
The number of points chosen for test partitions
depends upon the number of sites available and the number
of partitions chosen (this number is made as consistent as
possible while ensuring that all sites will be chosen for
testing). This process of filling up a test partition is
done k times.
NOTES
An ideal random sites generator will follow a Poisson dis
only be as random as the original points. This program
simply divides points up in a random manner.
Be warned that random number generation occurs over the
intervals defined by the region of the map.
This program may not work properly with Lat-long data.
SEE ALSO
v.random and
g.region
AUTHOR
James Darrell McCauley
<darrell@mccauley-usa.com>,
when he was at:
Agricultural
Engineering
Purdue University
Update to 5.7 Radim Blazek 10 / 2004
Last changed: $Date: 2011-11-08 02:23:26 -0800 (Tue, 08 Nov 2011) $
Main index - vector index - Full index
© 2003-2014 GRASS Development Team