[UrbanSim-Users] interactive estimation

From: Hana Sevcikova <hana_at_cs.washington.edu>
Date: Wed, 02 Apr 2008 16:30:37 -0700

For those who were interested in having the commands I used in the
estimation session at the Workshop in Zuerich, find a list below
including a few comments. Please let me know if you have any questions
about it. Also note that this will only work with the current version of
Opus in our repository, since it is a fairly recent code.

Hana

# Estimation of Regression Model
#=========================
python -i urbansim/tools/start_estimation.py -m land_price_model -c
inprocess.hana.demo.baseline_estimation -s
inprocess.hana.demo.my_LPM_specification

# change specification and reestimate
>>> estimator.reestimate() # if the model has submodels, one can
specify
                            # a list of submodels to be reestimated
                            # in the argument 'submodels=[1,2,4]'

# analyze data
>>> ds = estimator.get_data_as_dataset() # if the model has submodels,
          # use with argument 'submodel=x' where x is the submodel number
>>> ds.summary()
>>> ds.plot_histogram('ln_impval') # see other methods of
          # AbstractDataset (opus_core/datasets/abstract_dataset.py)
          # for data analysis
>>> estimator.plot_correlation() # has argument 'submodel' (see above)

# To use the BMA method for variable selection, uncomment lines 38-39 in
# inprocess/hana/demo/baseline_estimation.py and run it again.
# (You need to have installed rpy, R and the BMA R package)

# Estimation of Choice Model
#=======================
python -i urbansim/tools/start_estimation.py -m
household_location_choice_model -c
inprocess.hana.demo.baseline_estimation -s
inprocess.hana.demo.my_HLCM_specification

# reestimate and analyze data as above
# in addition
>>> estimator.plot_choice_set()
>>> estimator.plot_choice_set_attribute('ln(gridcell.residential_units)')

# if you uncomment line 42 in
# inprocess/hana/demo/baseline_estimation.py, you can plot the change in
# utility
>>> estimator.plot_utility()

# see also python -i urbansim/tools/start_estimation.py --help
Received on Wed Apr 02 2008 - 16:30:39 PDT

This archive was generated by hypermail 2.2.0 : Wed Apr 02 2008 - 16:30:41 PDT