1v.kcv(1)                      Grass User's Manual                     v.kcv(1)
2
3
4

NAME

6       v.kcv  - Randomly partition points into test/train sets.
7

KEYWORDS

9       vector, statistics, points, point pattern
10

SYNOPSIS

12       v.kcv
13       v.kcv --help
14       v.kcv   map=name   [layer=string]   npartitions=integer   [column=name]
15       [--help]  [--verbose]  [--quiet]  [--ui]
16
17   Flags:
18       --help
19           Print usage summary
20
21       --verbose
22           Verbose module output
23
24       --quiet
25           Quiet module output
26
27       --ui
28           Force launching GUI dialog
29
30   Parameters:
31       map=name [required]
32           Name of vector map
33           Or data source for direct OGR access
34
35       layer=string
36           Layer number or name
37           Vector features can have category values in different layers.  This
38           number  determines  which  layer  to use. When used with direct OGR
39           access this is the layer name.
40           Default: 1
41
42       npartitions=integer [required]
43           Number of partitions
44           Must be > 1
45
46       column=name
47           Name for new column to which partition number is written
48           Default: part
49

DESCRIPTION

51       v.kcv randomly divides a points lists into k sets  of  test/train  data
52       (for  npartitions-fold cross validation).  Test partitions are mutually
53       exclusive. That is, a point will appear in only one test partition  and
54       k-1 training partitions.  The module generates a random point using the
55       selected random number generator and then finds the  closest  point  to
56       it.  This site is removed from the candidate list (meaning that it will
57       not be selected for any other test set) and saved  in  the  first  test
58       partition file. This is repeated until enough points have been selected
59       for the test partition.  The number of points chosen  for  test  parti‐
60       tions depends upon the number of sites available and the number of par‐
61       titions chosen (this number is made as  consistent  as  possible  while
62       ensuring  that  all  sites will be chosen for testing). This process of
63       filling up a test partition is done k times.
64

NOTES

66       An ideal random sites generator will follow a Poisson distribution  and
67       will  only  be  as  random  as  the  original sites. This module simply
68       divides vector points up in a random manner.
69
70       Be warned that random  number  generation  occurs  over  the  intervals
71       defined by the current region of the map.
72
73       This program may not work properly with Lat-long data.
74

EXAMPLES

76       All examples are based on the North Carolina sample dataset.
77       g.copy vect=geonames_wake,my_geonames_wake
78       v.kcv map=my_geonames_wake column=part npartitions=10
79
80       g.copy vect=geodetic_pts,my_geodetic_pts
81       v.kcv map=my_geodetic_pts column=part npartitions=10
82

SEE ALSO

84        v.random, g.region
85

AUTHOR

87       James Darrell McCauley,
88       when he was at: Agricultural Engineering Purdue University
89
90       27 Jan 1994: fixed RAND_MAX for Solaris 2.3
91       13 Sep 2000: released under GPL
92       Updated to 5.7 Radim Blazek 10 / 2004
93       OGR support by Martin Landa (2009)
94       Speed-up by Jan Vandrol and Jan Ruzicka (2013)
95

SOURCE CODE

97       Available at: v.kcv source code (history)
98
99       Main  index  | Vector index | Topics index | Keywords index | Graphical
100       index | Full index
101
102       © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
103
104
105
106GRASS 7.8.2                                                           v.kcv(1)
Impressum