identify.timevarying
Identify components of which the flow results differ between softwares. |
Identify submodule holding identification tools for timevarying results.
- class tessif.identify.timevarying.TimevaryingIdentificier(data, error_value='nmae', error_value_threshold=0.1, correlation='pearson', correlation_threshold=0.7, conditions_dict=None, reference=None)[source]
Bases:
IdentificierIdentify components of which the flow results differ between softwares.
Flows are identified using following logic:
High interest / significantly different:
CORR <
corr(e.g.CORR < 0.7)ERROR_VALUE >
error_value: (e.g.ERROR_VALUE > 0.1)
Medium interest / borderline significantly different:
CORR <
corr(e.g.CORR < 0.7)ERROR_VALUE <
error_value: (e.g.ERROR_VALUE < 0.1)
And:
CORR >
corr(e.g.CORR > 0.7)ERROR_VALUE >
error_value: (e.g.ERROR_VALUE > 0.1)
Low Interest / not significantly different:
CORR >
corr(e.g.CORR > 0.7)ERROR_VALUE <
error_value: (e.g.ERROR_VALUE < 0.1)
- Parameters:
Dictionairy of multiindexed dataframes of all of all timevarying results of all components keyed inside the dict by the respective
software specifierTop-level index represents the individual components, while the second-level index represent the respective outflow targets.
Meaning for an energy system like:
A -> B -> C | v D
The dataframe would look something like:
A B B C D 0 10 8 2 1 0 0 0 2 20 2 18
Usually returned by something like
tessif.analyze.ComparativeResultier.all_loads.String abbrevating the error value calculated. Currently supported are:
nmaeforNormalized Mean Average Error(default)nmbeforNormalized Mean Biased ErrornrmseforNormalized Root Mean Square Error
error_value_threshold¶ (float, default = 0.1) – Threshold value used for clustering data interest. Clustering is done according to
cluster_conditions.correlation¶ ({'pearson', 'kendall', 'spearman'} or callable) –
Method of correlation:
pearson : standard correlation coefficient
kendall : Kendall Tau correlation coefficient
spearman : Spearman rank correlation
callable: callable with input two 1d ndarrays and returning a float.
correlation_threshold¶ (float, default = 0.7) – Threshold value used for clustering data interest. Clustering is done according to
cluster_conditions.conditions_dict¶ (dict, None, default=None) –
Dictionairy keying
container(s)of dicts by the respective cluster labels “high”, “medium” and “low”. The dictionairies inside the tuples need to have following keywords:thresspecyfying the threshold usedoprtspecifying theoperatorused.
If
Noneis used, following default conditions are applied:conditions = { "high": ( {"oprt": "lt", "thres": correlation_coefficient_threshold}, {"oprt": "ge", "thres": error_value_threshold}, ), "medium1": ( {"oprt": "ge", "thres": correlation_coefficient_threshold}, {"oprt": "ge", "thres": error_value_threshold}, ), "medium2": ( {"oprt": "lt", "thres": correlation_coefficient_threshold}, {"oprt": "lt", "thres": error_value_threshold}, ), "low": ( {"oprt": "ge", "thres": correlation_coefficient_threshold}, {"oprt": "lt", "thres": error_value_threshold}, ), }
reference¶ (str, None, default=None) –
Defines the reference results to be used for calculating the statistical error values and pearson correlation coeficients.
In case
Noneis used (default), the dataframes average is used as returned byaverage_timevarying_dataframe_results().
- property mutuals
Mutual components between softwares
- property non_mutuals
Non mutual components between softwares
- property error_value
String specifying the error value used.
- property correlation
String specyfying the correlation used.
- property error_value_threshold
Error value threshold used.
- property correlation_coefficient_threshold
Correlation value threshold used.
- property error_values
Calculated Normalized Medium Average Errors.
- property corrs
Calculated Pearson Correlation Coefficients.
- property high_interest_averaged_results
Mean and high interest results differing more than threshold.
- property medium_interest_averaged_results
Mean and medium interest results differing more than threshold.
- property low_interest_averaged_results
Mean and low interest results differing more than threshold.
- property high_interest_timeframes
Significant results identified as highly interesting.
- property medium_interest_timeframes
Significant results identified as medium interesting.
- property low_interest_timeframes
Significant results identified as not very interesting.