

FlashChat  Actuarial Discussion  Preliminary Exams  CAS/SOA Exams  Cyberchat  Around the World  Suggestions 
Actuarial Jobs by State 

Thread Tools  Display Modes 
#1




Contiguous territory assigments/recommendations in R?
Hi,
Does anyone know if there is a package in R which can help assign contiguous territories based on zip? Like, your data matrix contains zip and some loss metric, and then you run through an R package where R recommends some specific territory by zip assignments while taking into account distance between zip centroids(which can be a lat/long included in the data matrix provided by the user) as well as some consideration for minimizing between variance within territories and maximizing between variance between territories? Bueller? Bueller? thanks, Hari Seldon 
#4




Quote:
But what do you mean by network graph? 
#5




Quote:
https://en.wikipedia.org/wiki/Graph_...e_mathematics) There are packages like iGraph that create clusters within graphs, but the algorithms are usually based on maximizing the number of connections between the nodes, and not on the variance of a weight such as loss cost. You might be able to dig up some package or code for social networks that does something close enough to what you want. This problem doesn't seem that unique if you think about it. But if you can't find anything and you aren't comfortable enough customizing your own algorithm, I would just run a regular clustering procedure on the loss costs and zipcode centroids, and hope the results are contiguous enough that you can just handtweak any outliers. 
Thread Tools  
Display Modes  

