gcubed.data.calibration_database
This module contains the CalibrationDatabase
class, used
for parameter calibration.
Overview
Provides convenience methods for all classes.
All G-Cubed classes inherit from this base class.
Constructor
Create a new calibration database from an existing database.
The calibration database is used to calibrate the model parameters.
The transformation from the original database is simple enough, rebasing to the specified base year and dividing all values by 100.
Arguments
database
: the database that this calibration database was derived from.
base_year
: the base year for the database.
Rebase a database so indices have a new base year. This can be used to convert the database used for calibration to a database with the base year equal to the start year for projections (eg. 2011 to 2018).
Note that this script draws on the approach in the G-Cubed utilities/rebasedata.ox script.
Arguments
new_base_year (int): a YYYY formatted new base year for the database.
Exceptions
Exception is thrown if the database does not contain data for the new base year.
Exception is thrown if the database does not contain data for the year after the new base year if the model has lagged index variables.
Inherited Members
- gcubed.data.database.Database
- variables
- data
- variables_count
- years_count
- years_column_names
- base_year
- first_available_year
- last_available_year
- export_to_csv
- rhs_vector_value
- get_data_and_varmap_indices
- get_data_and_varmap_indices_for_matching_variables
- get_data
- get_non_negative_data
- update_data
- has_data
- has_data_for_all_projection_years
- set_up_yratr
- yratr_scaling_factor
- yratr_scaling_factor_for_variable
- value
- set_value
- save