Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the Huff model for some analysis I'm doing. For those not aware, the Huff model is a probabilistic model for retail trade area analysis.

Huff model algorithm

H_ij is the probability that a person at location i will visit a place at location j
A_j is the attractiveness of location j
D_ij is the distance the person at location i is from location j
\alpha is the attractiveness enhancement parameter
\beta is the distance decay parameter

I have a dataset comprised of over two million elements. For each element, I know the person's ZIP code as well as the ZIP code they visited. So, "locations" in this context of the Huff model are ZIP codes. I'm using the number of people that visited a ZIP code as the attractiveness of the location (i.e., A_j).

What I need is a method for estimating the two parameters, \alpha and \beta, from data. How can I determine what these parameters should be?

After thinking about this, I realized that this is really an optimization problem. I think the approach I'm going to take is using a metaheuristic global optimization algorithm:

  1. Search will select the \alpha and \beta parameters randomly, according to its rules.
  2. For each entry in the dataset, I select a random number, r. I compute the Huff probability, H, that the person in the entry visited the ZIP code where I know they visited. If r < H, then we got it right.
  3. So, the "fitness" for a particular set of parameters, \alpha and \beta, is the number of cases we get right. This is therefore a maximization problem.
  4. We run this lots of times (because each search is stochastic) with reasonable ranges for \alpha and \beta (something like 0 < \alpha, \beta <= 20), and the winning \alpha and \beta are the ones that produce the maximal fitness.

Does this seem like a reasonable solution?

share|improve this question
According to p. 23 of the reference given by Jeffrey Evans, you just use ordinary least squares for parameter estimation: that would be hugely more efficient than your algorithm, give more accurate results, and provide the basis for confidence intervals, error estimates, diagnostic statistics and plots, and more. – whuber Jun 17 '13 at 22:49
I'm looking into OLS right now. I'm actually not convinced that it'll give me better results. I'm sure it'll be faster and offers some nice statistical properties, but global optimization methods can often offer some very nice benefits over simple methods like OLS. – Geoff Jun 18 '13 at 0:08
Such as? Because this is a linear problem, OLS will give the same global optimum with far less effort and offer far more useful information. – whuber Jun 18 '13 at 3:10
up vote 2 down vote accepted

Huff provides a brief method for model calibration in this whitepaper.

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

This is really useful. I somehow missed this in my search. I think I've actually come up with a global optimization-based solution, though. See my separate answer for more details. – Geoff Jun 17 '13 at 22:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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