SPODT-package: SPatial Oblique Decision Tree

Description Details Author(s) References Examples

Description

SPODT is a spatial partitioning method based on oblique decision trees, in order to classify study area into zones of different risks, determining their boundaries

Details

Package: SPODT
Type: Package
Version: 0.9
Date: 2014-04-23
License: GPL(>=2)

The main functions are spodt() that provides the spatial classification, spodt.tree() that provides the partition tree, spodtSpatialLines(), an object of SpatialLines class that contains the final spatial classification, and test.spodt() that provides a Monte Carlo test of the final spatial classification.

Author(s)

Jean Gaudart, Nathalie Graffeo, Guillaume Barbet, Bernard Fichet, Roch Giorgi (Aix-Marseille University)

Maintainer: Jean Gaudart <jean.gaudart@univ-amu.fr>

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
data(dataMALARIA)
#Example : number of malaria episodes per child at each household,
          #from November to December 2009, Bandiagara, Mali.
#Copyright: Pr Ogobara Doumbo, MRTC, Bamako, Mali. email: okd[at]icermali.org
coordinates(dataMALARIA)<-c("x","y")
class(dataMALARIA)
proj4string(dataMALARIA)<-"+proj=longlat +datum=WGS84 +ellps=WGS84"
dataMALARIA<-spTransform(dataMALARIA, CRS("+proj=merc +datum=WGS84 +ellps=WGS84"))

gr<-0.07   #graft parameter
rtw<-0.01 #rtwo.min
parm<-25  #min.parent
childm<-2 #min.child
lmx<-7 

sp<-spodt(dataMALARIA@data[,2]~1, dataMALARIA, weight=TRUE, graft=gr, min.ch=childm,
          min.parent=parm, level.max=lmx, rtwo.min=rtw)
		  
spodt.tree(sp)

ssp<-spodtSpatialLines(sp,dataMALARIA)
plot(ssp)
points(dataMALARIA,cex=log(dataMALARIA@data$z*10))

#test.spodt(dataMALARIA@data[,2]~1, dataMALARIA, sp@R2, "rpois",
#           c(length(dataMALARIA@data$loc),mean(dataMALARIA@data$z)), 10,
#		   weight=TRUE, graft=gr, level.max=lmx, min.parent=parm,
#		   min.child=childm,rtwo.min=rtw)

#the warning "root is a leaf" tells that no split can be provided by the
    #spodt function according to the splitting parameters

SPODT documentation built on May 2, 2019, 9:43 a.m.