spatdt {FLR} | R Documentation |
Spatial Data Handling
Description
Creates a linear connection between spatial data in order to be used for classification.
Usage
spatdt(data,idx,mat,pre_order=0,snd=0)
get.cost(zzz,mat)
get.cost2(pre_order,mat)
get.pos(instz)
winner.route(cost)
Arguments
data |
an input data.frame |
idx |
indicates the position of the spatial data attribute. |
mat |
a matrix indicating distances |
pre_order |
predefined order |
snd |
indicates which node will be used as the starting one. The default value 0 means that the best route will be chosen, without taking into consideration which the starting node will be. |
zzz |
a route |
instz |
instance |
cost |
cost of routes |
Value
return a list of 3 objects: a) The modified dataset, b) winner route, c) the total distance of the route.
Examples
#Import data
data(dataset001)
data<-dataset001
data(mat)
idx<-1
rhoa<-0.6
param<-"sigmoid"
pre_order<-c(1,2,3,4,5,6,7,8,9)
#Data preprocess
data<-spatdt(data,idx,mat,pre_order)
[Package FLR version 1.0 Index]