serJD commited on
Commit
651ee82
1 Parent(s): c992ce0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -23,7 +23,7 @@ def huff_model_probability(df_distances, df_attractiveness, alpha, beta, df_popu
23
 
24
  adjusted_population = df_population.repeat(df_distances.shape[1]).values.reshape(df_distances.shape) * adjustment_factors
25
  attractiveness_term = df_attractiveness ** alpha
26
- distance_term = df_distances ** -beta
27
 
28
  numerator = (attractiveness_term * distance_term).multiply(adjusted_population, axis=0)
29
  denominator = numerator.sum(axis=1)
 
23
 
24
  adjusted_population = df_population.repeat(df_distances.shape[1]).values.reshape(df_distances.shape) * adjustment_factors
25
  attractiveness_term = df_attractiveness ** alpha
26
+ distance_term =np.exp(df_distances * -beta)
27
 
28
  numerator = (attractiveness_term * distance_term).multiply(adjusted_population, axis=0)
29
  denominator = numerator.sum(axis=1)