The SAP S/4HANA Intelligent Enterprise is implemented with emerging technologies based on hybrid multi-cloud Business Technology Platform (BTP) architectures and integrated S/4HANA Business Processes.
SAP AI Machine Learning (ML) technologies are deeply integrated into end-to-end business processes of the S/4HANA Intelligent Enterprise to enable data-driven decisions and process automations.
S/4HANA Business Process Integration best practices describe AI Machine Learning (ML) implementation approaches for intelligent business processes like Lead-to-Cash, Source-to-Pay, Design-to-Operate and Recruit-to-Retire. AI Machine Learning (ML) implementations can extend Manufacturing and Quality Management scenarios like Visual Inspection, Predictive Maintenance or Predictive Quality. Custom AI Machine Learning (ML) scenarios have to be prepared with SAP S/4HANA business process analysis.
The SAP AI Machine Learning (ML) Portfolio offers enterprise ready intelligent AI Machine Learning technologies with lifecycle management to deliver trusted recommendations or predictions.
Hybrid multi-cloud architectures offer infrastructure and resources to develop and operate AI Machine Learning (ML) solutions for intelligent SAP S/4HANA Enterprise environments.
SAP offers intelligent AI Machine Learning (ML) technologies like cloud services on the Business Technology Platform (BTP) and embedded into S/4HANA Core as native SAP HANA libraries. BTP AI Business Services are ready to be used in various scenarios like end-to-end business process automation, Business Document Processing, Business Recommendations or Central Invoice Management (CIM) with RPA.
The SAP AI Machine Learning (ML) technologies can be extended with Hyperscaler AI/ML services on Microsoft Azure, Amazon AWS and Google Cloud (GCP) platforms. Machine Learning (ML) model training and serving on cloud platforms addresses requirements like storage of large datasets, allocation of sufficient computing resources and lifecycle management of upload, training and inference phases with appropriate tools.
Data-driven intelligent ERP systems try to understand internal and external data to implement workflows with predictions, recommendations or actions as outcomes. Data management extensions for S/4HANA on the SAP Business Technology Platform (BTP) accelerate the transformation of data into business value with analytics and AI business services.
Basic intelligent AI/ML technologies are:
Data Science methodologies like data mining, statistics or analytics can be combined with AI/ML technologies to implement data-driven intelligent solutions.
The SAP Business Technology Platform (BTP) offers AI Machine Learning (ML) Services to implement complex machine learning requirements with external data from different sources like IoT. These Side-by-Side machine learning implementations support the usage of ML libraries like TensorFlow with complex machine learning algorithms such as deep learning e.g. to recognize objects in images.
SAP Data Intelligence offers a Machine Learning (ML) Client, on top of the Business Technology Platform (BTP), to orchestrate ML scenarios connected with S/4HANA ISLM Side-by-Side. Side-by-Side explorative predictive analytics leverage SAP Analytics Cloud (SAC) dashboards created with smart assist or predict services. Side-by-Side ML scenarios require large training datasets which can be integrated between S/4HANA and data lakes on cloud platforms like BTP, Azure or AWS.
SAP S/4HANA Intelligent Scenario Lifecycle Management (ISLM) harmonizes the management of pre-delivered and custom intelligent scenarios. SAP S/4HANA ISLM scenarios are categorized into S/4HANA embedded based on SAP HANA Machine Learning (ML) Libraries (PAL, APL) and Side-by-Side deployed on the SAP Business Technology Platform (BTP).
S/4HANA offers the ISLM Fiori Apps Intelligent Scenarios and Intelligent Scenario Management. The ISLM Fiori Intelligent Scenarios app lists all existing intelligent scenarios and allows to create new embedded or Side-by-Side scenarios. Available SAP S/4HANA ISLM Side-by-Side scenario types are currently (12/2022) SAP Data Intelligence, specific SAP AI Business Services or SAP AI Core.
Operations on machine models like configuration, training, deployment of Side-by-Side scenarios and activations are offered with the Intelligent Scenario Management app. These lifecycle capabilities enable the adaption of existing and creation of new predictive scenarios according to business needs.
SAP S/4HANA ISLM embedded intelligent scenarios are ABAP representations of moderate machine learning (ML) scenarios with low computing resource requirements. Typical examples are trend forecasting, classifications or categorizations on structured S/4HANA data. S/4HANA embedded ISLM is seamlessly integrated into the ABAP layer with access to SAP HANA Machine Learning Libraries.
SAP AI Core and AI Launchpad are two components on the SAP Business Technology Platform (BTP) platform to implement end-to-end machine learning (ML) workflows. SAP AI Core enables to build advanced AI machine learning (ML) use-cases with open-source frameworks Argo Workflows and KServe.
SAP AI Core provides an engine that lets you run AI workflows and model serving workloads configured with template YAML files hosted in a Git repository. Both templates are mapped to executables with Kubernetes CRDs (Custom Resource Definition) for model training as Argo workflows and deployments with KServe.
Workflow templates specify workflow pipelines for CI/CD with ArgoCD in the machine learning (ML) training phase with access to training data in hyperscaler object storage. Serving templates define how models are to be deployed on interference servers with Docker images.
The SAP AI Core API offers a general lifecycle management specification for machine learning (ML) artifacts which is implemented with the SAP AI Core and AI API Client SDKs. Also other runtime implementations of the AI Core SDK are possible. The metaflow library enables to run ML training pipelines as Argo Workflows and is also integrated with the SAP AI Core SDK to manage resources or templates. AI clients for executing scenarios can be implemented with the AI API Client SDK.
The SAP AI Launchpad UI acts as HTTP client to access and manage AI runtimes in a unified way such as SAP AI Core, SAP Data Intelligence Pipelines, SAP AI Business Services or external hyperscaler AI services.
SAP BTP AI Core enables to build predictive maintenance solutions with image or sound based defect detection.
Popular machine learning (ML) frameworks like TensorFlow2 and Detectron2 offer algorithms to detect objects in images with localization and classification. The SAP AI Core SDK Computer Vision package extends Detectron2 to integrate image processing machine learning (ML) scenarios.
The image classification quality can be measured e.g. with the Intersection over Union (IoU) to evaluate the interference accuracy.
SAP HANA offers machine learning (ML) libraries with application functions written in C++ to perform data intensive and complex operations. ML functions for specific topics are grouped together into three libraries (AFL):
PAL and APL provide algorithms for classic machine learning use cases like classification, regression, time series forecasting, cluster analysis, and more. As prerequisite, a tenant database with running script server and a development user with specific authorizations have to be created.
Hybrid Multi-Cloud AI/ML Platforms are offered as a Service (PaaS) to manage the complete lifecycle of machine learning projects. Some cloud platforms are SAP BTP AI.core, AWS SageMaker Studio, Azure Machine Learning as a Service or the Google Cloud AI platform.
AI/ML PaaS provide scalable compute and storage resources to train machine learning models and development environments with tools like Jupyter Notebooks and popular ML frameworks e.g. Tensorflow or Scikit-learn.
PaaS AI/ML enable implementations with methologies like Microsoft Team Data Science Process (TDSP) and CRISP-DM Methodology to organizing data mining and machine learning projects. AI/ML frameworks define process steps to process multidisciplinary Data Mining or Machine Learning projects, with business and data understanding, modeling and deployment steps.
Monitoring phases can be added for deployed models to control the degrade of the predictive performance over time, changes of data or data distribution applied to the model and business environment changes.
Data preparation is the prerequisite to find and understand patterns which are needed to make predictions for new data points. Quality measures need to be applied on data, feature and algorithm level to optimize the performance of machine learning modules.
The Hybrid Multi-Cloud AI/ML Data Ingestion Layer offers capabilities to import and transform data from different data sources into machine learning environments. Large volumes of data need to be prepared to enable feature engineering.
Feature engineering includes steps to determine features as input data for machine learning models from raw data to improve the quality and performance of machine learning models. Feature engineering entails feature creation, transformations of predictor variables, automatic feature extraction, feature selection and priorization.
AI/ML Data Preparation Steps
AI/ML Data Preparation includes multiple steps to optimize data quality such as:
Data categories group data with regard to data type, measurement, storage format and role characteristics.
Maschine model data can be grouped into numerical (or quantitative) and categorical (or qualitative) data types. Numerical data can be counted, measured and used within mathematical operations like age or height.
Data of type categorical can be divided into groups (of usually fixed number of values) and summarized by frequency count like gender or race. Categorical data does not support mathematical operations and can't be used as input for most machine learning models.
Measurement characteristics divide data into nominal, ordinal and continuous levels. Nominal describes discrete unsortable data of type numerical, textual (with complete text sentences or phrases) or binary (e.g. gender, race). Ordinal data is discrete (numerical or textual), sortable (alphabetically or by values), rankable and not sufficient for mathematical operations (like risk level, priorities or zip code). Continuous (or quantitative) data variables are real numbers like ranges (e.g. shoe size, IQ level) or ratio measured with equidistant scale (e.g. age, height).
Variable Roles divide data into explanatory (or independent model input) and target (or dependent) variables. Target variables represent the to be predicted domain-specific business issue. For binary target values, the least frequently occurring value (< 50%) is considered as target category. Weight variables are continuous positive numbers which can be assigned to tell machine learning algorithms the importance of a feature.
Descriptive Statistics describes datasets summarized with simplifications or organizational to highlight key information e.g. for visualizations. Descriptive measures describe the middle (center, typical value) of data sets as Central Tendency and data Dispersion (Variation) around this measure of central.
Median, mode and mean (geometric or arithmetic) are the most common measures to describe the Central Tendency. Mean is most commonly used, calculated as average value (sum divided by count) for data measured in ratio or interval scale with all distributed values take into account.
In contrast to mean, median or mode are not calculated with all values. Median is the middle number in an ordered dataset, preferred for data with extreme values as outliers. Mode is the value that occurs most often (highest frequency) as least powerful measure that can be applied to categorical and numerical data without calculation.
Dispersion is the degree to which data is distributed around the central tendency, represented by e.g. range, variance or standard deviation. Variance and standard deviation are most commonly used dispersion measures calculated with all data points. Variance is the average of the squared differences from the mean. Standard deviation is calculated as square root of variance with same unit as mean and original scale.
Inferential statistics makes inferences (decisions, generalization, predictions, estimates) on dataset (populations) properties (e.g. weight, height) based on information of sample data. Hypothesis testing is a inferential statistics procedure to evaluate a hypothesis about a population with sample data.
Predictive Analytics analyzes datasets with historical information using multiple techniques (e.g. data mining, statistics, machine learning, artificial intelligence) to outcome with predictions or forecasts as basis for informed decisions.
In contrast to Probability Density Functions which defines propabilities for continuous variables, Probability Distribution Functions define outputs for continuous variables.
Examples of Probability Distribution Functions are:
AI/ML Modeling is supported by improvements of processing capabilities (GPU) and learning algorithms (e.g. deep learning) using basic machine learning approaches with labeled targets (supervised) and without labeled targets (unsupervised, reinforcement training).
Supervised Machine Learning
Supervised ML trains models with given input (instances) and correct answer (output, label). The instances are represented by features (attributes) as numerical vectors. Goal of the training is to find decision functions (algorithms) with matching patterns (e.g. word count frequency) and correlations (statistical relationship between variables) in the training data. The accuracy of the output prediction or classification has to be valuated with test datasets.
Unsupervised Machine Learning
Unsupervised learning is a training method for models without superviser and with unlabeled targets, where the algorithm tries to find unknown pattern in the data.
Reinforcement Learning
Reinforcement Training learns by interacting with rewards as positive feedback for correct actions. Agents are programs or solutions which make decisions within environments with complex problems and feedback algorithms. Deep Reinforcement Learning is a combination of Deep Learning and Reinforcement Learning.
Deep Learning is a Machine Learning (ML) subset which simplifies human brain processing with artificial neural networks (algorithms) to solve a variety of supervised and unsupervised machine learning tasks. In contrast to Machine Learning, Deep Learning automates Feature Engineering and is able to process non-linear, complex correlations which requires GPU processing.
Convolutional (CNN), Recurrent (RNN) and Artificial (ANN) Neural Networks are deep learning types composed of multiple layers of interconnected neurons as processing units. Some simplified characteristics of these deep learning types are:
Training machine learning models is an interactive feature engineering process with hyperparameter (parameter controlling the learning process) tuning, like Gradient Decent learning rate or batch size, until the model outcome meets the business goals.
Input data has to be splitted into estimation sub-set for training (sample) purposes and validation sub-set to finally test the model performance. Mostly the training data is sampled randomly to train the machine learning models functions with the chosen learning method. Next models can be tested with datasets to evaluate their output results such as predictions, classifications or recognitions.
Deployed machine learning models shall have the ability to recalibrate automatically in real-time learning from data running on their procedures.
Bias (systematic pattern of deviation) and variance (average of squared differences of the mean) in datasets can lead to overfitted trained models with prediction errors. Dataset Bias misguide the algorithm to learn a central tendency and may reduce the performance of the model to predict dispersions or variations like variances. But learning the variances can also result in overfitted models and increase false predictions caused by Bias.
Overfitting models are not able to generalize because of too many explanatory variables, relative to the number of observation points and target variables. Overfitting is often characterized by weights with large magnitudes and can be prevented with more or other training data, removal of irrelevant features or early stopping of the learning process before new iterations reduce the ability to generalize on the validation dataset.
Feature selection reduces independent input (explanatory) variables, without losing relevant information. Traditional approaches to facilitate the selection process are stepwise regression (combination of forward selection and backward elimination), forward selection (starts without features and adds) and backward elimination.
Subsets of high-dimensional datasets can be selected with different methods:
Neural networks embeddings (vector instance included into neural network model) are learned mappings and associations between discrete objects. Examples are word dictionaries or other high-dimensional vectors mapped to low-dimensional vectors of real numbers, processable by machine learning models such as Word2Vec.
Embeddings represent and organize unstructured data like images, audio or text as learned feature vectors. Distances between embedding vectors capture similarities between different data points and essential concepts in the original input.
Reusing model agnostic embeddings facilitates modeling and makes machine learning processes more efficient.
The model quality can be measured with different methods likes graphs, indicators or statistics. Lift charts are graphical representations of the model effectiveness as ratio between the results with predicted model and without (random) model.
Model performance and accuracy can be evaluated with Predictive Power (KI) and Prediction Confidence (KR) indicators. Predictive Power describes the proportion of information contained in the target variable that the explanatory variables of the model are able to explain. Prediction Confidence describes the model robustness or ability to achieve the same performance when it is applied to a new dataset.
Some classification metrics with descriptions are:
FPR | ratio between FP to all negative predictions (FP + TN)
Classification or decision thresholds map prediction probabilities (likelihood as score between 0 and 1) to a binary category or label and can be used for model tuning of imbalanced classifications. Profits are associated with desirable positive (or expected) values of target variables and costs are associated with negative (or unexpected) values.
Model evaluation can be visualized with:
https://youtube.com/playlist?list=PLkzo92owKnVzjYmJJMk17pu567BAKW5NL
https://blogs.sap.com/2022/08/16/sap-ai-core-launchpad-a-visual-introduction-part-1/
S/4HANA ML resources
ISLM AI.core
- comment end -