next up previous index
Next: Estimation Up: Regression Model Previous: Regression Model   Index

Initialization

The model is initialized by:
>>> from opus_core.regression_model import RegressionModel
>>> rm = RegressionModel(regression_procedure="opus_core.linear_regression")
As in the case of choice model, the model is composed by model components, here by plugging the appropriate regression procedure. The regression procedure is a child of Regression (see Section 7.6.5), must have a method run() that gets as arguments a multidimensional data array and a one-dimensional array of coefficients, and returns a one-dimensional array of the regression outcome.

The linear_regression module implemented in opus_core is the default value of the RegressionModel constructor and thus, it can be omitted.


next up previous index
Next: Estimation Up: Regression Model Previous: Regression Model   Index
info (at) urbansim.org