Module containing functions to compute the accuracy of a model
This module contains a derived type for storing and handling metric data
Type for storing and handling metric data
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | active |
Flag to indicate if the metric is active |
|||
| real(kind=real32), | public, | allocatable, dimension(:) | :: | history |
History of the metric |
||
| character(len=10), | public | :: | key |
Key for the metric |
|||
| integer, | public | :: | num_entries |
Number of entries in the history |
|||
| real(kind=real32), | public | :: | threshold |
Threshold for the metric |
|||
| real(kind=real32), | public | :: | val |
Value of the metric |
|||
| integer, | public | :: | window_width |
Window width for checking convergence |
| procedure, public :: add_t_t => metric_dict_add | Add two metric_dict_type together |
| procedure, public :: append => append_value | Append a value to the history of the metric |
| procedure, public :: check => metric_dict_check | Check if the metric has converged |
| generic, public :: operator(+) => add_t_t | Overload the addition operator |
Operation to add two metric_dict_type together
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(metric_dict_type), | intent(in) | :: | a |
Instances of metric data |
||
| class(metric_dict_type), | intent(in) | :: | b |
Instances of metric data |
Sum of the metric data
Allocate memory for a metric_dict_type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(metric_dict_type), | intent(out), | dimension(:) | :: | input |
Instance of metric data |
|
| type(metric_dict_type), | intent(in), | optional, | dimension(:) | :: | source |
Source of the metric data to copy |
| integer, | intent(in), | optional | :: | length |
Length of the metric data |
Append a value to the history of the metric
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(metric_dict_type), | intent(inout) | :: | this |
Instance of metric data |
||
| real(kind=real32), | intent(in) | :: | value |
Value to append |
Check if the metric has converged
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(metric_dict_type), | intent(inout) | :: | this |
Instance of metric data |
||
| real(kind=real32), | intent(in) | :: | plateau_threshold |
Threshold for plateau |
||
| integer, | intent(out) | :: | converged |
Boolean whether the metric has converged |