Multiclass Classification that includes a Geospatial Element I am attempting to train a classifier to predict different prices for an item in different suburbs. I have several features, two of which are a latitude and longitude for the centroid of the suburb.

I am attempting to train the model to classify the price of an item in a bin of $10 size. The geospatial element will definitely affect the price of the item, however the training data I have will have gaps in it (i.e. I don't have prices for all suburbs).

What is the best way to engineer a feature that will include this geospatial information and be able to fill in the gaps in the training/test data?

So far I have tried creating new features for the bearing and distance from the capital city which seemed to work okay, as well as binning the latitude and longitude which performs worse than the bearing/distance. I did consider using a geohash, however I think that this will be too complex a feature for a classifier to understand.
If this is a U.S. model you can try County (FIPS) codes, which are coarser-grained areas than ZIP codes (there can be many ZIP codes in a county).  If bearing and distance worked for you, this should also work.  Your classifier would need to handle categorical data.  In R, this is pretty easy to do if you already have a ZIP code:

library(noncensus)
data(zip_codes)
my_dataframe['fips']&lt;-zip_codes$fips[match(my_dataframe$zip, zip_codes$zip)]


This assumes you already have a dataframe called my_dataframe with ZIP codes as a column named 'zip'.

As a bonus you can use the choroplethr package to create a nice visualization of some scalar value, for example, your item price:

library(choroplethr)
df_to_plot&lt;-data.frame()
df_to_plot['region']&lt;-my_dataframe$fips
df_to_plot['value']&lt;-my_dataframe$price

county_choropleth(df_to_plot, title='price by location')