SAP Certified Development Associate - SAP Extension Suite

HANA Academy

Local Metaflow

SAP S/4HANA Cloud implements the Intelligent Enterprise based on integrated S/4HANA Business Processes with emerging technologies and hybrid multi-cloud Business Technology Platform (BTP) architectures.

Intelligent SAP S/4HANA Cloud | BTP AI Core Machine Learning ML

SAP AI Machine Learning (AI/ML) technologies are deeply integrated into intelligent end-to-end business processes like Lead-to-Cash, Source-to-Pay, Design-to-Operate or Recruit-to-Retire to enable data-driven decisions and process automations.

SAP S/4HANA Intelligent Enterprise Technologies

Design-to-Operate business processes profit from machine learning implementations in manufacturing or quality management scenarios like visual inspection, predictive maintenance or predictive quality. Business process analysis is a prerequisite to implement individual custom AI Machine Learning (AI/ML) business scenarios.

SAP S/4HANA Intelligent Cloud Architectures

Hybrid multi-cloud architectures offer scalable infrastructure, compute and storage resources to develop, train, serve and operate AI Machine Learning (AI/ML) solutions for intelligent SAP S/4HANA Enterprise environments. Cloud platforms address requirements like storage of large datasets, allocation of sufficient computing resources and lifecycle management of upload, training or inference phases with appropriate tools.

SAP offers intelligent AI Machine Learning (ML) technologies like cloud services on the SAP Business Technology Platform (SAP BTP) or native SAP HANA libraries embedded into the S/4HANA Core. AI Business Services on the SAP Business Technology Platform 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.

SAP AI Machine Learning (ML) technologies can be combined with Hyperscaler AI/ML services on Microsoft Azure, Amazon AWS and Google Cloud (GCP) platforms.

Data-driven SAP S/4HANA Intelligent Enterprise

Data-driven intelligent ERP systems understand internal and external data to implement Data-to-Value workflows with predictions, recommendations or actions as outcomes. SAP offers data management, analytics and AI services on the Business Technology Platform (SAP BTP) to extend S/4HANA and to accelerate the transformation of data into business value.

SAP S/4HANA Data-driven Intelligent Enterprise Technologies for Cloud ERP Systems

Intelligent business services are built on AI Machine Learning (AI/ML) technologies:

Implementations of data-driven intelligent processes can combine data science methodologies like data mining, statistics or analytics with AI/ML technologies.

SAP S/4HANA Data Science for Data-driven Intelligent Enterprise Technologies for Cloud ERP Systems

AI Machine Learning (ML) Best Practices

MlOps best practices enable implementations of AI Machine Learning (ML) solutions with AI/ML process flows using reliable technologies.

AI/ML methodologies like CRISP-DM define phases which organize multidisciplinary data mining or machine learning projects with business and data understanding, modeling and deployment steps. Project lifecycles can be managed with services offered on hybrid multi-cloud platforms like SAP BTP AI Core, AWS SageMaker Studio, Azure Machine Learning as a Service or the Google Cloud AI platform.

AI Machine Learning (ML) PaaS environments offer scalable compute and storage resources to train or serve machine learning models. Development environments of AI/ML platforms consist of tools like Jupyter Notebooks and popular ML frameworks e.g. Tensorflow or Scikit-learn.

SAP S/4HANA Intelligent Enterprise Technologies Cross-industry standard process for data mining

In addition to data mining processes, monitoring phases for deployed AI/ML models allow to control the degrade of predictive performance over time, changes of data or data distribution applied to the model and business environment changes.

AI Machine Learning (AI/ML) Environments

The implementation of AI Machine Learning workflows can be realized with AI/ML pipelines, defined with template files, and resulting AI flows of machine learning models on containerized resources.

Docker images are environments for software bundles of applications and their dependencies to run executables standalone with allocated resources in Docker containers locally or on cloud platforms.

Kubernetes (k8s) orchestrates containers on clusters with service discovery, load balancing within clusters, automated rollouts and rollbacks, self-healing of failing containers and configuration management features. Kubernetes can deploy different kinds of containers on Pods as smallest deployable units with references to container registries like Azure ACR or Docker Hub. Kubernetes allows to build robust DevOps or MLOps CI/CD pipelines with compute intensive steps.

AI Machine Learning (ML) workflows implement low latency and high-throughput pipelines for ML model training or serving of trained inference models with frameworks like TensorFlow, Argo Workflows or Metaflow.

TensorFlow offers an end-to-end machine learning platform to build and deploy ML models with pre-trained models which can be instantly deployed for production and experiments.

The Metaflow Python library offers a unified platform to develop training pipelines as Argo workflows and to deploy machine learning models with training and serving templates definitions available in central repositories. These container-native workflows and pipelines can be modeled as single steps or direct acyclic graphs (DAG) for parallel processing.

AI/ML Ops Flow Processing

Processing AIOps flows is compute intensive and has to be controlled with suitable training parameters. AIOps requires parallel processing of machine learning algorithms with hundreds of cores provided by GPUs instead of sequential processing of one-dimensional tensors (vectors) with few Central Processing Units (CPU) cores. CUDA is a software layer that gives direct access to GPUs of Nvidia GPUs.

GPUs are often integrated in CPUs and enable optimized tensor processing. Tensors can be represented as multidimensional Arrays to process image or sound files in machine learning.

Hyperparameters like batch sizes and number of epochs have impact on required compute resources. Batch sizes define the number of samples (single row of data) to be processed before the model is updated. Epochs represent complete forward and backward passes through the complete training dataset.

Gradient descent is an iterative machine learning optimization algorithm which reduces the cost function to make model predictions to improve the model accuracy with optimized weights. Gradient descent variants are batch of all samples in single training set, mini batch and stochastic using one sample per step. Training with smaller batch sizes require less memory, update weights more frequently, with less accurate estimates of the gradient compared to gradients of full batch trainings.

SAP AI Machine Learning (ML) Portfolio

The SAP AI Machine Learning (ML) Portfolio offers enterprise ready intelligent AI Machine Learning technologies with lifecycle management to deliver trusted recommendations or predictions.

SAP BTP AI Core Machine Learning Engine

SAP AI Core offers advanced machine learning capabilities on the Business Technology Platform (SAP BTP) with an engine for running any AI workflows and model serving workloads. SAP AI Core integrates third party tools like Docker Hub, Git repositories or AWS S3 as object storage and open-source frameworks Argo Workflows or KServe. KServe serving template files define how models are to be deployed on inference servers with Docker images.

The SAP AI Core API provides a general lifecycle management specification for machine learning (ML) artifacts which is implemented with the SAP AI Core SDK for the SAP AI Core engine. AI Clients for other AI engines can be implemented with the AI API Client SDK.

SAP AI Core can map YAML template files of Argo workflows to executable Kubernetes Custom Resource Definitions (CRD) for training workflows as Pods and inference deployments. These custom resources extend Kubernetes capabilities and installations with own k8s API endpoints for pods or deployments.

SAP AI Core supports building machine learning models based on TensorFlow neural networks with high-level APIs like Keras. The Keras framework offers consistend simple APIs on top of TensorFlow2 to optimize user experience and to scale large clusters of GPU or TPU pods.

SAP AI Core Applications are synchronized representations of GitHub repository folders containing Argo workflow definitions. SAP AI Core can be authorized to access training data lf hyperscaler object stores like AWS S3 or Azure Storage. Artifacts get registered as references datasets or models stored in these object store. Resource groups segregate artifacts, developments, runtime entities to achieve multitenancy without creating new instances.

The SAP AI Launchpad is a multitenant SaaS application to manage AI use cases across multiple instances of AI runtimes. This HTTP client can access and manage AI runtimes like SAP AI Core, SAP Data Intelligence Pipelines, SAP AI Business Services or external hyperscaler AI services in a unified way.

SAP BTP AI Core Defect Detection

SAP BTP AI Core helps to implement various machine learning scenarios like for instance 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 inference accuracy.

SAP Business Technology Platform AI/ML Services

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.

S/4HANA Intelligent Scenario Lifecycle Management (ISLM)

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 HANA Machine Learning Libraries

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.

AI/ML Preparation and Quality Management

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.

AI/ML Data Preparation and Feature Engineering

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.

Machine Learning (ML) Modeling and Training

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

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:

AI/ML Model Training

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.

Model Training Techniques

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.

Model Performance Evaluation

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: