In order to be calculated a calculated feature needs a calculation algorithm that defines how the observations of the calculated feature are generated. The calculation algorithm consists of atomic calculations. Each calculation is the instance of a calculation type. The System defines the available calculation types and allows the user to freely combine instances of these types to form a calculation algorithm.
Each calculation may require input data and produces a series of observations as output. The property structure used for the type specific observation data in the output is always conforming to a specific feature type. The input of a calculation can be either the observations of features (which are then called source features) or the output of another calculations. This way calculations can be chained together to form a calculation algorithm. Each calculation algorithm has exactly one final calculation, the output of this calculation will be persisted as observations of the calculated feature or as the observations of the instantiated feature in case of instantiating calculated features. The feature type the final calculation output conforms to, must always match the feature type of the calculated feature, since the output of this last calculation step will be persisted as observations of a feature.
Figure 1 shows an example of a calculation algorithm consisting of seven calculations. As depicted in the example one calculation can take data input from features or other calculation steps. Any number of calculations and features can be combined in one calculation algorithm. Note that a calculation algorithm can also use calculated features as source features. Calculation 7 is the final calculation, the output of this calculation will be persisted as observations of the calculated feature or as the observations of the instantiated feature in case of instantiating calculated features.
For some calculations it is necessary to know about the domain of the features or calculations that are connected to its input pins. E.g. a merge calculation can only be executed if all connected source features or connections use the same classifications for all properties of type classification - and the used classification depends on the domain the feature is in. The output of a domain is not natively belonging to a domain but it inherits its domain from the first connected feature or calculation. Since at the beginning of each calculation algorithm data is always read from either features or other calculated features this approach guarantees that the output of each calculation is belonging to a domain.
Figure 1: Example of a calculation algorithm