train_validation_poligon: This function performs the separation of training samples and...

Description Usage Arguments Author(s) Examples

Description

This function performs the separation of training samples and validation for samples collected in the form of polygons. Note that the class has to be the first column and the polygon number has to be the second column of the dataframe.

Usage

1
train_validation_poligon(dfall, class, poligon, p = 0.75, seed = 313)

Arguments

dfall

Dataframe with class and poligon columns

class

string with name of variable with class value

poligon

string with name of variable with poligon id

p

double the percentage of data that goes to training

seed

numeric seed to control random numbers generation

Author(s)

Elpidio Filho, elpidio@ufv.br

Examples

1
2
3
4
5
6
7
## Not run: 
dfall = df %>% select(classe, poligono, everything())
vt = treino_validacao_poligono(dfall, class = 'classe', poligon = 'poligono', p = 0.80, seed = 123)
treino = dfall[treino,]
valida = dfall[-treino,]

## End(Not run)

elpidiofilho/labgeo documentation built on May 14, 2019, 9:35 a.m.