hpipy.price_model.HedonicModel#

class hpipy.price_model.HedonicModel(hpi_data, **kwargs)[source]

Bases: BaseHousePriceModel

Hedonic house price model.

Methods

__init__

Initialize base house price model.

fit

Fit the hedonic model and generate index coefficients.

Attributes

Parameters:
  • hpi_data (TransactionData)

  • kwargs (Any)

fit(estimator='base', log_dep=True, dep_var=None, ind_var=None, **kwargs)[source]

Fit the hedonic model and generate index coefficients.

Parameters:
  • estimator (str, optional) – Estimator type. One of “base”, “robust”, or “weighted”. Defaults to “base”.

  • log_dep (bool, optional) – Log transform the dependent variable. Defaults to True.

  • dep_var (str | None, optional) – Dependent variable. Defaults to None.

  • ind_var (list[str] | None, optional) – Independent variable(s). Defaults to None.

  • kwargs (Any)

Returns:

The hedonic house price model.

Return type:

Self

__init__(hpi_data, **kwargs)

Initialize base house price model.

Parameters:
  • hpi_data (TransactionData)

  • kwargs (Any)

Return type:

None

coefficients: DataFrame
model_obj: Any
periods: DataFrame
base_price: float
params: dict[str, Any]