comparison.diff¶
Helpers for numerical comparison of data.
Allows to tests semi-automatically for problems with the various models. Used to benchmark the simulation results.
DataSetsComparison
¶
DataSetsComparison(
dfs_dict,
columns_filter=None,
time_column=True,
title=None,
selections=None,
factors=None,
)
Comparing multiple simulation results.
Only the subset of identical columns are compared. In the beginning a matching of column names is performed to find the subset of columns which can be compared.
The simulations must contain a "time" column with identical time points.
Initialize the comparison.
:param dfs_dict: data dictionary d[simulator_key] = df_result :param columns_filter: function which returns True if in Set or False if should be filtered. :param time_column: flag to check for time column
df_diff
¶
Dataframe of all differences between the files.
https://github.com/sbmlteam/sbml-test-suite/blob/master/cases/semantic/README.md Let the following variables be defined:
abs_tolstand for the absolute tolerance for a tests case,rel_tolstand for the relative tolerance for a tests case,c_ijstand for the expected correct value for rowi, columnj, of the result data set for the tests caseu_ijstand for the corresponding value produced by a given software simulation system run by the user
These absolute and relative tolerances are used in the following way:
a data point u_ij is considered to be within tolerances
if and only if the following expression is true:
|c_ij - u_ij| <= (abs_tol + rel_tol * |c_ij|)
get_files_by_extension
¶
Get all files by given extension.
Simulation definitions are json files.