Data Model
Simulation
Contains Pydantic data models for the simulation
Several Pydantic data models are defined for various simulation calibration procedures.
- pydantic model calisim.data_model.simulation_data_models.BaseModel[source]
Base Pydantic data model.
- Parameters:
PydanticBaseModel (PydanticBaseModel) – The Pydantic Base model class.
- Config:
arbitrary_types_allowed: bool = True
protected_namespaces: tuple = ()
- pydantic model calisim.data_model.simulation_data_models.CalibrationModel[source]
The calibration data model.
- Parameters:
BaseModel (BaseModel) – The Pydantic Base model class.
- Config:
arbitrary_types_allowed: bool = True
protected_namespaces: tuple = ()
- Fields:
- field X: ndarray | DataFrame | list | None = None
The simulation input data
- field Y: ndarray | DataFrame | list | None = None
The simulation output data
- field analyze_kwargs: dict[str, Any] | None = None
The analyze step named arguments
- field batched: bool = False
Whether to batch the simulations
- field calibration_func_kwargs: dict[str, Any] | None = None
The calibration function named arguments
- field experiment_name: str | None = 'default'
The modelling experiment name
- field figsize: tuple[int, int] = (12, 12)
The figure size for visualisations
- field groups: list[str] | None = None
The list of parameter groups
- field lr: float = 0.01
The learning rate of the model
- field method: str = ''
The calibration method or algorithm
- field method_kwargs: dict[str, Any] | None = None
The calibration method named arguments
- field n_chains: int = 1
The number of Markov chains
- field n_init: int = 1
The number of initial samples or steps
- field n_iterations: int = 1
The number of iterations for sequential calibrators
- field n_jobs: int = 1
The number of jobs to run in parallel
- field n_out: int = 1
Number of simulation outputs
- field n_replicates: int = 1
The number of replicate simulations to run
- field n_samples: int = 1
The number of samples to take
- field observed_data: ndarray | DataFrame | float | None = None
The empirical or observed data
- field outdir: str | None = None
The output directory for modelling results
- field output_labels: list[str] | None = None
The list of simulation output names
- field parallel_backend: str = ''
The backend engine to run parallel jobs
- field parameter_spec: ParameterSpecification | None = None
The parameter specification
- field pass_calibration_workflow: bool | str | None = None
Pass the calibration workflow into the calibration function
- field random_seed: int | None = None
The random seed for replicability
- field storage: str | None = None
The storage backend to persist the calibration results
- field test_size: float | int = 0.0
The size of the testing dataset.
- field use_shap: bool = False
Whether to use SHAP for feature explanations
- field verbose: bool = False
Whether to print calibration messages
- field walltime: int = 1
The maximum calibration walltime
- pydantic model calisim.data_model.simulation_data_models.DistributionModel[source]
The probability distribution data model.
- Parameters:
ParameterModel (ParameterModel) – The simulation parameter data model.
- Config:
arbitrary_types_allowed: bool = True
protected_namespaces: tuple = ()
- Fields:
- field distribution_args: list | None = None
The distribution positional arguments
- field distribution_bounds: list | None = None
The distribution bounds
- field distribution_kwargs: dict[str, Any] | None = None
The distribution named arguments
- field distribution_name: str = 'uniform'
The distribution name
- pydantic model calisim.data_model.simulation_data_models.OrchestrationModel[source]
The orchestration data model.
- Parameters:
BaseModel (BaseModel) – The Pydantic Base model class.
- Config:
arbitrary_types_allowed: bool = True
protected_namespaces: tuple = ()
- Fields:
- field auto_set_cuda_visible_devices: bool = True
Set the CUDA_VISIBLE_DEVICES variable
- field cpu: int = 1
The number of CPUs
- field entrypoint: str = 'sh'
The job entrypoint
- field gpu: int = 0
The number of GPUs
- field image: str = ''
The job Docker image
- field log_dir: str | None = None
The log directory
- field memMB: int = 100
The amount of memory in MB
- field name: str = 'default'
The job name
- field num_replicas: int = 1
The number of job replicas
- field partition: str = 'fast'
The job partition
- field scheduler: str = 'local_cwd'
The orchestration scheduler
- field time: str = '00:00:59'
The job walltime
- field wait_interval: int = 10
The interval for job status updates (seconds)
- pydantic model calisim.data_model.simulation_data_models.ParameterEstimateModel[source]
The simulation parameter estimate data model.
- Parameters:
BaseModel (BaseModel) – The Pydantic Base model class.
- Config:
arbitrary_types_allowed: bool = True
protected_namespaces: tuple = ()
- Fields:
- field estimate: float [Required]
The estimated parameter value; a point estimate
- field name: str [Required]
The parameter name.
- field uncertainty: float | None = None
The uncertainty of the parameter estimate
- pydantic model calisim.data_model.simulation_data_models.ParameterEstimatesModel[source]
The simulation parameter estimates data model.
- Parameters:
BaseModel (BaseModel) – The Pydantic Base model class.
- Config:
arbitrary_types_allowed: bool = True
protected_namespaces: tuple = ()
- Fields:
- field estimates: list[ParameterEstimateModel] | None = None
The set of parameter estimates
- pydantic model calisim.data_model.simulation_data_models.ParameterModel[source]
The simulation parameter data model.
- Parameters:
BaseModel (BaseModel) – The Pydantic Base model class.
- Config:
arbitrary_types_allowed: bool = True
protected_namespaces: tuple = ()
- Fields:
- field data_type: ParameterDataType = ParameterDataType.CONTINUOUS
The parameter data type
- field name: str [Required]
The parameter name
- field parameter_tags: dict[str, str] | None = None
A collection of metadata tags.
- field parameter_value: float | str | int | None = None
The parameter value.
- field parameter_values: list[float] | list[str] | list[int] | None = None
The list of parameter values.
- pydantic model calisim.data_model.simulation_data_models.ParameterSpecification[source]
The collection of parameters.
- Parameters:
BaseModel (BaseModel) – The Pydantic Base model class.
- Config:
arbitrary_types_allowed: bool = True
protected_namespaces: tuple = ()
- Fields:
- field parameters: list[DistributionModel] | None = None
The parameter specification list