Biogeme: Python Library  2.5
Public Member Functions | Static Public Attributes | List of all members
biogeme.BIOGEME_OBJECT Class Reference

This class gathers the components needed by biogeme to perform the estimation or the simulation. More...

Public Member Functions

def __init__ (self)
 
def __once__ (self)
 

Static Public Attributes

 ESTIMATE = None
 Expression of the likelihood function to be maximized. More...
 
 SIMULATE = None
 Enumerate expression to perform sample enumeration. More...
 
 EXCLUDE = None
 Expression identifying the observations to be ignored in the data file. More...
 
 WEIGHT = None
 Expression computing the weight of each observation, for WESML. More...
 
 VARCOVAR = None
 Object of type bioMatrix that contains the variance covariance matrix of the estimators, in order to perform a sensitivity analysis of the simulated quantities.
 
 BAYESIAN = None
 Expression describing a simulation method for the Bayesian estimation of the parameters. More...
 
 STAN = STAN()
 Boolean indicator for the generation of STAN files.
 
dictionary FORMULAS = {}
 Dictionary of expressions to be reported in the output file.
 
dictionary STATISTICS = {}
 Dictionary of expressions computing statistics on the data. More...
 
dictionary CONSTRAINTS = {}
 Dictionary of expressions defining constraints on the parameters to be estimated. More...
 
dictionary DRAWS = {}
 Dictionary of the various draws used for Monte-Carlo simulation. More...
 
dictionary PARAMETERS = {}
 Used to set the value of the parameters. More...
 

Detailed Description

This class gathers the components needed by biogeme to perform the estimation or the simulation.

Definition at line 19 of file biogeme.py.

Member Data Documentation

biogeme.BIOGEME_OBJECT.BAYESIAN = None
static

Expression describing a simulation method for the Bayesian estimation of the parameters.

Definition at line 44 of file biogeme.py.

dictionary biogeme.BIOGEME_OBJECT.CONSTRAINTS = {}
static

Dictionary of expressions defining constraints on the parameters to be estimated.

In general, it is preferable not to use these constraints. There is most of the time a way to write the model with unconstrained parameters. The two typical examples are:

  • Constrain a parameter beta to be nonnegative: replace it by the exponential of another parameter.
  • A set of parameters b1, b2, ... bn must sum up to one. Replace them by their normalized version: bi = ci / (c1 + c2 + ... + cn), where c1, ... cn are unconstrained parameters to be estimated.
  • A combination of the two gives bi = exp(ci) / (exp(c1) + exp(c2) + ... + exp(cn))

Definition at line 71 of file biogeme.py.

dictionary biogeme.BIOGEME_OBJECT.DRAWS = {}
static

Dictionary of the various draws used for Monte-Carlo simulation.

Definition at line 73 of file biogeme.py.

biogeme.BIOGEME_OBJECT.ESTIMATE = None
static

Expression of the likelihood function to be maximized.

Example:

1 BIOGEME_OBJECT.ESTIMATE = Sum(log(prob),'obsIter')

Definition at line 21 of file biogeme.py.

biogeme.BIOGEME_OBJECT.EXCLUDE = None
static

Expression identifying the observations to be ignored in the data file.

Example:

1 BIOGEME_OBJECT.EXCLUDE = (TRAVEL_TIME < 0)

Definition at line 33 of file biogeme.py.

dictionary biogeme.BIOGEME_OBJECT.PARAMETERS = {}
static

Used to set the value of the parameters.

The syntax is

1 BIOGEME_OBJECT.PARAMETERS['parameterName'] = 'value'

Definition at line 77 of file biogeme.py.

biogeme.BIOGEME_OBJECT.SIMULATE = None
static

Enumerate expression to perform sample enumeration.

Example:

1 simulate = Enumerate('Choice prob.', prob)
2 BIOGEME_OBJECT.SIMULATE = Enumerate(simulate,'obsIter')

Definition at line 27 of file biogeme.py.

dictionary biogeme.BIOGEME_OBJECT.STATISTICS = {}
static

Dictionary of expressions computing statistics on the data.

The index of each entry is associated with the value in the report. Example calculating the null loglikelihood of a choice model:

1 total = 0
2 for i,a in availability.items() :
3  total += (a != 0)
4 nl = -Sum(log(total),iterator)
5 BIOGEME_OBJECT.STATISTICS['Null loglikelihood'] = nl

Definition at line 59 of file biogeme.py.

biogeme.BIOGEME_OBJECT.WEIGHT = None
static

Expression computing the weight of each observation, for WESML.

Typically, a variable in the data file. Example:

1 BIOGEME_OBJECT.WEIGHT = weight

Definition at line 37 of file biogeme.py.


The documentation for this class was generated from the following file:
Copyright 2016 Michel Bierlaire