1
$\begingroup$

I am trying to predict the damage to a buildings after earthquake on a dataset which contains "district number" as feature. I think the feature will have a significant importance in predicting the label but I am not sure how to best represent it.

Any thoughts?

$\endgroup$
1
$\begingroup$

You can get as creative as you want, but here are two general approaches that work for me.

  1. Clustering the data into known geographical divisions and create dummy variables. For example, in the United States a person can use zip codes.
  2. Find the center for known clusters (ie zipcodes) or by some similar unsupervised cluster and use the longitude and latitude.

How you choose to augment that information depends on what exactly you're trying to predict.

$\endgroup$
0
$\begingroup$

Assuming district numbers are categorical in what they represent as opposed to ordinal, the district numbers should be represented as a categorical feature. The easiest way to do this is with n binary variables to represent each possible district.

To improve results I would try to find an interval type feature such as latitude and longitude to use as well.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.