Search
Close this search box.

Basics of Artificial Intelligence and SAP Leonardo

Machine Learning
Basics of Artificial Intelligence and SAP Leonardo®

The term Artificial Intelligence (short: AI) is an umbrella term for applications in which machines provide human-like intelligence services and tasks. There are different disciplines of AI and today the industry already offers all kind of software solutions - such as SAP Leonardo® - and products which are based on this technology

1.1. Terms and Technologies of Artificial Intelligence

The definition of Artificial Intelligence is, that machines perform tasks that normally require human intelligence. This includes Machine Learning (ML), Natural Language Processing (NLP) and Deep Learning (DL). The idea is to use machines to approximate key functions of the human brain: learning, evaluating, problem solving.

Terms of Artificial Intelligence:

Machine Learning is about an algorithm ensuring that a machine learns by observing data or past experience and can therefore predict decisions. It is the same as for human knowledge, which is based on past experiences, means that as children’s we observe behavior from our parents and adopt it. For example, humans have learned that when someone reaches out their hand, it means they want to greet us with a handshake. In response, we also put out our hand and shake the other hand. Today, machine learning is often applied to streaming services such as Spotify and Netflix. They need to ensure that customers use the service over a long term so that they continue to pay the subscription. These applications analyze our consumption behavior and suggest similar music or movies/series based on our already listened or watched content experience.

Natural Language Processing is a discipline of Machine Learning and deals with machines learning to understand human speech, both written and spoken. This involves, for example, a machine recognizing that the answer “I’m game” and “Sure” to the question “Would you like to go for a walk with me?” implies a “Yes”. Typical examples of NLP today are Amazon’s Alexa and SPAM filters at E-mail providers.

Deep Learning is the newest technology of AI and goes one step further. The machine can recognize structures on its own, evaluate them, and improve on its own in multiple forward and backward passes. In doing so, the algorithm uses neural networks to make decisions. Again, let’s return to the example of shaking hands. In Islamic societies, we can observe that it is not appropriate for men to shake hands with a woman. We adopt this knowledge and learn that we do not shake hands with an Islamic woman. Typical examples of DL are the Chat Roboter by Zendesk and the translation platform DeepL.

1.2. SAP Leonardo®

SAP Leonardo® is a system that offers various services for companies to implement their digital innovation strategy. It uses technologies such as Machine Learning, Block Chain, Data Intelligence, Big Data, Internet of Things (short: IoT) and Analytics.

Designed as a PaaS (Platform as a Service), the SAP Leonardo cloud solution is not a standalone system, but supports digitization and automation in other SAP products such as S/4 Hana, Hybris, CX Cloud, Concur, Fieldglass, Ariba, etc. Standardized and ready-to-use interfaces are used to implement Leonardo technologies in these solutions. The innovation technologies supported by SAP Leonardo are:

  • Machine Learning to provide customers a trained Model for prediction services
  • Blockchains for decentralized securing of processes
  • Data Intelligence for extracting insights from data
  • Internet of Things (IoT), which is a service where physical objects can connect so that data can be exchanged with other devices and systems over the Internet
  • Big Data to manage and process larger amounts of data and create relationships
  • Analytics of collected data and application

1.3. Key Figures of Machine Learning

In machine learning, there are four types of outcomes that can occur when predicting an observation:

  • True positives (TP) Is the outcome where the model correctly predicts a positive class
  • True negatives (TN) Is the outcome where the model correctly predicts a negative class
  • False positives (FP) Is the outcome where the model incorrectly predicts a positive clase
  • False negatives (FN) Is the outcome where the model incorrectly predicts a negative class

These terms can be illustrated using the example of a spam filter, where the spam folder is the positive class and the inbox folder the negative class:

  • True positives (TP) An e-mail is correctly identified as Spam and is placed in the spam folder.
  • True negatives (TN) A normal e-mail is delivered to the inbox.
  • False positives (FP) An e-mail is incorrectly identified as Spam and is placed in the spam folder.
  • False negatives (FN) A spam e-mail is not placed in the spam folder, but in the inbox. It is incorrectly identified as a normal e‑mail.

The outcome can also be represented in a Confusion Matrix, where the True Label is plotted on the vertical axis and the Predicted Label on the horizontal.

Based on these outputs, four important key figures can be determined: Accuracy, Precision, Recall and F1-Score.

Accuracy

Accuracy is defined as the percentage of correct predictions of all relevant data. The key figure answers the questions of how many times the Machine acts correctly in predicting an observation

Accuracy = \frac{TP+TN}{TP+TN+FP+FN}

In the example of the spam filter the following Accuracy results:

Accuracy = \frac{TP+TN}{TP+TN+FP+FN} = \frac{72+37}{72+37+4+8} = \frac{109}{121}\approx 0,9

An Accuracy of 0,9 means that 90% of all incoming mails are assigned correctly as spam or non-spam.

Precision

Precision is the percentage of relevant results. This key figure answers the question of how the proportion of positive identifications was correct. It is calculated as follow:

Precision= \frac{TP}{TP+FP}

In the example of the spam filter the following Precision results:

Precision = \frac{TP}{TP+FP} = \frac{72}{72+4} = \frac{72}{76}\approx 0,95

A Precision of 0,95 means that, when the spam filter predicts an e-mail as Spam, it is correct 95% of the time. The difference between accuracy and precision can be well illustrated by the following figure

Recall

Recall is the percentage of relevant results that were correctly classified by the algorithm. This key figure answers the question of what proportion of actual positives was identified correctly. It is calculated as follow:

Recall = \frac{TP}{TP+FN}

In the example of the spam filter the following Recall results:

Recall = \frac{TP}{TP+FN} = \frac{72}{72+8} = \frac{72}{80} = 0,9

A Recall of 0,9 means that 90% of spam-mails are correctly assigned as spam-mails.

F1-Score

F1-Score is the weighted average of Precision and Recall, so this key figure takes False Negatives and False Positives into account. The F1 score is derived from a slightly more general variant, the F-beta score.

F_{\beta}= (1+\beta^2) \sdot \frac{Precision \sdot Recall}{(\beta^2 \sdot Precision) + Recall}

For the F1 score, β is set to 1 and thus recall and precision are weighted equally. If required by the application, Recall and Precision can also be weighted differently. A β value between 0 and 1 weights Precision more heavily, a value greater than 1 weights the Recall more heavily. So, when setting β to 1 the F1-Score is calculated as follow:

F_{1}= 2 \sdot \frac{Precision \sdot Recall}{Precision + Recall}

In the example of the spam filter the following F1-Score results:

F_{1}= 2 \sdot \frac{Precision \sdot Recall}{Precision + Recall} = 2 \sdot \frac{0,95 \sdot 0,90}{0,95 + 0,90} \approx 0,92

Do you need consulting from our experts?

The Customer Experience team at Camelot ITLab deals with exciting and challenging CRM related topics every day and serves a large portfolio of different customers from a wide range of industries. Trust in this collaboration and feel free to contact us at tlil@camelot-itlab.com.

Was this article helpful?

If you like our content we would highly appreciate your review on Trustpilot

 

#SAP C4C #SAP Cloud 4 Customer #Cloud 4 Customer #Cloud for Customer #SAP Sales Cloud #Sales Cloud #Machine Learning #Machine #Learning #SAP Leonardo #AI #ML #NLP #DL #Deep Learning #Natural Language Processing #F1-Score #Recall #Precision #Accuracy #True Positive #True Negative #False Positive #False Negative

Receive the latest news

Subscribe To our SAP Sales & Service Cloud Newsletter

Get notified about new articles