Parameters tables
Parameters tables are CSV or XLSX files which store settings for parameter estimation problem. The content of the table can be loaded into Julia environment as a DataFrame and used inside fit method.
Format
The first row is the header. The sequence of the columns may vary.
parameter: aStringrepresenting unique identifier of model-level parameter. The corresponding parameter must be declared in theModel's namespace (@Constcomponent).nominal(optional): aFloat64nominal value which will be used as an initial value for the parameter. If it is skipped then the default value from the model will be used.lower(optional): aFloat64value that declares the lower bound of the parameter. If skipped then the the lower bound is set to-Inf.upper(optional): aFloat64value that declares the upper bound of the parameter. If skipped then the upper bound is set toInf.scale(optional):Stringwhich can belin,log,logit. The scale for parameter optimization. Default value islin.estimate(optional): aBooleanvalue:trueorfalseor numerical values0or1. Declares if the parameter should be fitted.0orfalsevalue sets the value for the parameter and excludes it from fitting. Default value istrue.
Usage
To load the table into Julia environment as DataFrame one should use read_parameters method. This method reads the file, checks the content and formats the data.
parameters_csv = read_parameters("./parameters.csv")Currently the table can be used only in fit method.
fit_results = fit(p, parameters_csv)Example
Loading file parameters.csv with the following content.
| parameter | nominal | lower | upper | scale | estimate |
|---|---|---|---|---|---|
| sigma_K | 0.1 | 1e-6 | 1e3 | log | 1 |
| sigma_P | 0.1 | 1e-6 | 1e3 | log | 1 |
| Kp_K_D | 5.562383e+01 | 1e-6 | 1e3 | log | 1 |
| Kp_R_D | 5.562383e+01 | 1e-6 | 1e3 | log | 0 |
Read as DataFrame object.
params = read_parameters("./parameters.csv")
res = fit(p, params)As a result the Platform will be fitted based on all experimental data. The following parameter values will be estimated: sigma_K, sigma_P, Kp_K_D.
These operations are equivalent to the following.
res = fit(
p,
[:sigma_K => 0.1, :sigma_P => 0.1, :Kp_K_D => 5.562383e+01];
parameters = [:Kp_R_D => 5.562383e+01],
lbounds = [1e-6, 1e-6, 1e-6],
ubounds = [1e3, 1e3, 1e3],
scale = [:log, :log, :log]
)