Machine Learning for Meter Reading
| Business Process Context | Features and Capabilities | Facts and Figures |
|---|---|---|
|
|
|
Machine learning utilizes previous decisions from the agent. Because the client's system usually contains a huge number of historical documents that have already been processed, the machine learning solution can use the corresponding master data, transactional data, and additional calculations based on it to make a prediction.

Supervised Learning
Supervised learning is the machine learning task. It learns a function that maps an input to an output based on example input-output pairs. It infers a function from labeled training data consisting of a set of training examples.
The illustration above shows how the label for Implausible Meter Reading Documents is derived.
In addition to the agent's decision to release/correct a document, possible subsequent actions on this document are taken into consideration when determining the label or expected result.
Machine Learning for Meter Reading Overview and Integration
From a process view, the machine learning solution consists of 4 major building blocks: The report to provide consumption characteristics for prediction, the Intelligent Scenario Lifecycle Management (ISLM) to access the predictive scenario and model, the report to apply the machine learning solution and the Fiori app to display the release confidence for each implausible document.

- Report REML_FILL_EABLCONSHIST
- The report calculates essential characteristics and stores it in a database table.
- It is a prerequisite to train a PAI predictive model and to determine a release prediction for specific meter reading documents.
Note
The report must be run again for new meter reading documents.
- Predictive Analytics Integrator
- The predictive scenario and model UTI_MR_IMPLAUSIBLE is provided.
- The model is untrained (meaning no model version exists). It must be trained and activated in the client system.
- CDS views for training-dataset and apply-dataset are provided. They include the relevant features and labeling logic at model level for implausible meter reading documents.
- Report REML_MR_IMPLSBL_RELPRED
- The report provides the process integration and the apply functionality for the intelligent model.
- It determines the release confidence and automatically releases implausible meter reading documents based on a given threshold (optional).
- Machine learning relevant information for each run is stored at DB level.
- SAP Fiori app, "Release Implausible Meter Reading Documents"
- The release confidence value determined for each document can be displayed in the app.

Executing the Report
- Specify the required selection criteria for implausible meter reading documents in the section Selection Parameters.
- In the section Meter Reading Data, you can select two types of meter reading data that should be recognized when calculating consumption characteristics:
- Historical Results: Selection of meter readings for which a switch of formerly implausible meter readings to plausible / release by agent meter readings took place.
- Current Results: Selection of current implausible meter reading results. These results will be used in regular batch runs.
- You can check the number of meter reading documents selected to determine consumption characteristics.
The predictive scenario is a template for the predictive business use case (in this case to process implausible meter reading documents), which contains information about the algorithm, the training-relevant and apply-relevant data set, and the target variable to be used to train the model. The predictive scenario is linked to the business process application (in this case by report REML_MR_IMPLSBL_RELPRED), using the Predictive Analytics Integrator (PAI) so that the predictive results can be consumed by the application.

- PAI Apps:
Two apps are provided in the PAI to manage predictive scenarios and the corresponding predictive models. The relevant predictive scenario used to determine the release confidence for implausible meter reading documents is: UTI_MR_IMPLAUSIBLE
- Predictive Scenario:
The predictive scenario utilizes the Automated Predictive Library (APL), which is the basis for the selected machine learning algorithm.

Select and Train the Model
- Open the Predictive Models app.
- Select the scenario UTI_MR_IMPLAUSIBLE.
- Select the model UTI_MR_IMPLAUSIBLE and choose Train.
- You can specify training filters, for example, if you only want to train on a specific division; choose Train.

- The training of the new model version starts. It will change from the status Training to the status Ready.
- Select the new model version to display and check the quality information and the most relevant KPIs.
- Choose Activate to use this model version. You can retrain, activate / deactivate, or delete model according to your business requirements
Machine Learning for Meter Reading - Features Used in the Machine Learning Solution
A central component of the machine learning solution is the feature set used that creates the basis for the training and hugely impacts the performance of the predictive model. The relevant features can be grouped as segmentation features, amount-based features, and statistical features based on the meter reading history.
- General Features
Master data and transactional data for each meter reading document.
Examples:
- Internal ID for meter reading document
- Meter Reading Reason
- Division
- Meter Reading Category
- Meter Reading Type
- Rate Category
- Validation class for independent validations
- Validation group for dependent validations
- Consumption Based Features
Relevant consumption based information for implausible and previous meter reading document
Examples:
- Consumption of current meter reading
- Normalized consumption of current meter reading
- Expected consumption of current meter reading
- Normalized expected consumption of current meter reading
- Difference of current and expected consumption
- Relative difference of current and expected consumption
- Statistical Features
Statistical parameterization of consumption of the meter reading document's history (Minimum, Maximum, Average).
Examples:
- Average of normalized consumption from history
- Minimum value of normalized consumption from history
- Maximum value of normalized consumption from history
- Difference between normalized current consumption and average of consumption from history
- Relative difference of normalized current consumption and average of consumption from history
A timeframe is observed for the relevant training data, for example, there might be the business requirement that the model should be trained on documents that are less than two years old. The same applies to the offset between releasing a document and possible follow up actions that require subsequent actions to be performed on the document, such as the expected timeframe between the document release and a possible reversal afterwards due to specific reasons.

Example:
In this example, the oldest document (actual meter reading date) that should be considered for training (training dataset) has the date 2017-03-01 (24 months earlier than the current date). The last document considered for training would be on 2019-01-01 (2 months earlier than the current date). The time between 2019-01-01 and the current date 2019-03-01 indicates the offset timeframe where possible actions might be performed for released documents (meaning that the documents in this timeframe should not be used for training). The logic for the prediction period (apply dataset) also considers the lower timeframe; meter reading documents with an actual meter reading date that is earlier than the lower timeframe will not be predicted, all other documents will be predicted.
Customizing:
The timeframe can be customized in table TEML_IMPLMRPARAM (using transaction SM30).
Machine Learning for Meter Reading Determination of Release Confidence
The ABAP report REML_MR_IMPLSBL_RELPRED is used to determine the release confidence value for implausible meter reading documents. It uses the API objects in the PAI predictive scenario UTI_MR_IMPLAUSIBLE. The corresponding model must be trained and activated as a prerequisite for doing so.

- Report REML_MR_IMPLSBL_RELPRED
- The report provides the process integration and the apply functionality for the intelligent model
- It selects all implausible meter reading documents based on the selection criteria specified by the user.
- It determines the release confidence for each implausible meter reading document in the selection.
- Automated release is also possible for implausible meter reading documents according to a given threshold.
- Report results are stored in the DB table TEML_MR_IMPLSBL; document number, release recommendation, and an indicator about whether the documents have been automatically released
- Dedicated logging information is also provided in the application log.

Executing the Report
- Specify the required selection criteria for implausible meter reading documents in the section Selection Parameters.
- In the section Processing Options you can specify:
- Whether the release confidence only should be calculated.
- If the meter reading documents should be released automatically.
- The value of the release threshold that must be met for an automated release. For example, if the release threshold is set to 0.80, only those documents with a determined release confidence greater or equal 80% are released automatically.
- You can check the most relevant processing information for the corresponding run in the application log. If the report is executed in online mode, the application log is displayed immediately after processing is complete.
SAP Fiori App: Resolve Implausible Meter Reading Documents
In the SAP Fiori app, you can display the machine learning related information Release Confidence for each implausible meter reading document. The value is only populated if the aforementioned prerequisites are met
- The intelligent model version has to be trained and activated.
- The report used to determine the release confidence for implausible documents needs to be executed.

The machine learning-related information Release Confidence is provided as a percentage. The closer the value is to 100%, the higher the confidence of the related machine learning prediction that the document can be released. The value is available in the worklist as an additional column. If a specific document is selected, the release confidence is also available in the header section of the object page.