next up previous index
Next: The Estimate Method Up: RegressionModel Class Previous: Initialization   Index

The Run Method

The run() method runs the simulation on basis of a given specification and coefficients.

Input:

specification
- an instance of class EquationSpecification specifying variables to be used in the simulation.
coefficients
- an instance of class Coefficients that contains values of coefficients to be used in the simulation.
dataset
- a Dataset representing the whole set of observations.
index
- an index within dataset determining for which observations the prediction is to be made. If it is not given, the whole dataset is considered.
chunk_specification
- a dictionary specifying how to determine the number of chunks to run the model in. It is passed to the run method of ChunkModel (see Section 24.4.2).
data_objects
- a dictionary containing additional datasets needed for computing variables. This argument is obsolete - the datasets should be included in the dataset_pool argument of the constructor.
run_config
- additional Resources (or dictionary) for controlling the simulation run.
initial_values
- an array of initial values of the results. It is of the same size as dataset. Elements that are handled by the model (determined by index and specification) will be overwritten by the results. By default, the array is set to zeros.
procedure
- a fully qualified name of the module/class in which the regression is implemented (see Section 24.5.5). If it is None (default), the value of regression_procedure from the constructor is taken. This argument overwrites the class attribute regression.

Algorithm
The algorithm is implemented in the method run_chunk() called from the parent class ChunkModel for each chunk. It invokes a computation of all variables given in the specification. Then for each submodel it creates a data matrix for values corresponding to index and invokes the run() method of the object stored in the class attribute regression (see Section 24.5.5).

Output
The method returns an array of the same size as index, determining the outcome of the regression for each observation included in index.


next up previous index
Next: The Estimate Method Up: RegressionModel Class Previous: Initialization   Index
info (at) urbansim.org