i am building a model that predicts likelihood of the presence of an infectious disease across 10000 villages. There is spatial dimension - each villages is surrounded by e.g. 8 other villages, and presence of disease in a nearby village increased the likelihood of disease in the village in question.
I created a feature that sums the number of cases in the 8 nearby villages. However - initially - i created this value on the entire dataset. With regards to e.g. 10 fold cross validation - is this "wrong"? Am i bringing in information from "outside the fold" and hence bias the performance? Should i run the feature creation within each fold, even those some of the nearby villages will be outside the fold? (also - computationally this might become very heavy...)
Thoughts welcome - much appreciated