Data Science für Smart Home im familiengeführten Unternehmen Miele

Dr. Florian Nielsen ist Principal for AI und Data Science bei Miele im Bereich Smart Home und zuständig für die Entwicklung daten-getriebener digitaler Produkte und Produkterweiterungen. Der studierte Informatiker promovierte an der Universität Ulm zum Thema multimodale kognitive technische Systeme.

Data Science Blog: Herr Dr. Nielsen, viele Unternehmen und Anwender reden heute schon von Smart Home, haben jedoch eher ein Remote Home. Wie machen Sie daraus tatsächlich ein Smart Home?

Tatsächlich entspricht das auch meiner Wahrnehmung. Die bloße Steuerung vernetzter Produkte über digitale Endgeräte macht aus einem vernetzten Produkt nicht gleich ein „smartes“. Allerdings ist diese Remotefunktion ein notwendiges Puzzlestück in der Entwicklung von einem nicht vernetzten Produkt, über ein intelligentes, vernetztes Produkt hin zu einem Ökosystem von sich ergänzenden smarten Produkten und Services. Vernetzte Produkte, selbst wenn sie nur aus der Ferne gesteuert werden können, erzeugen Daten und ermöglichen uns die Personalisierung, Optimierung oder gar Automatisierung von Produktfunktionen basierend auf diesen Daten voran zu treiben. „Smart“ wird für mich ein Produkt, wenn es sich beispielsweise besser den Bedürfnissen des Nutzers anpasst oder über Assistenzfunktionen eine Arbeitserleichterung im Alltag bietet.

Data Science Blog: Smart Home wiederum ist ein großer Begriff, der weit mehr als Geräte für Küchen und Badezimmer betrifft. Wie weit werden Sie hier ins Smart Home vordringen können?

Smart Home ist für mich schon fast ein verbrannter Begriff. Der Nutzer assoziiert hiermit doch vor allem die Steuerung von Heizung und Rollladen. Im Prinzip geht es doch um eine Vision in der sich smarte, vernetzte Produkt in ein kontextbasiertes Ökosystem einbetten um den jeweiligen Nutzer in seinem Alltag, nicht nur in seinem Zuhause, Mehrwert mit intelligenten Produkten und Services zu bieten. Für uns fängt das beispielsweise nicht erst beim Starten des Kochprozesses mit Miele-Geräten an, sondern deckt potenziell die komplette „User Journey“ rund um Ernährung (z. B. Inspiration, Einkaufen, Vorratshaltung) und Kochen ab. Natürlich überlegen wir verstärkt, wie Produkte und Services unser existierendes Produktportfolio ergänzen bzw. dem Nutzer zugänglicher machen könnten, beschränken uns aber hierauf nicht. Ein zusätzlicher für uns als Miele essenzieller Aspekt ist allerdings auch die Privatsphäre des Kunden. Bei der Bewertung potenzieller Use-Cases spielt die Privatsphäre unserer Kunden immer eine wichtige Rolle.

Data Science Blog: Die meisten Data-Science-Abteilungen befassen sich eher mit Prozessen, z. B. der Qualitätsüberwachung oder Prozessoptimierung in der Produktion. Sie jedoch nutzen Data Science als Komponente für Produkte. Was gibt es dabei zu beachten?

Kundenbedürfnisse. Wir glauben an nutzerorientierte Produktentwicklung und dementsprechend fängt alles bei uns bei der Identifikation von Bedürfnissen und potenziellen Lösungen hierfür an. Meist starten wir mit „Design Thinking“ um die Themen zu identifizieren, die für den Kunden einen echten Mehrwert bieten. Wenn dann noch Data Science Teil der abgeleiteten Lösung ist, kommen wir verstärkt ins Spiel. Eine wesentliche Herausforderung ist, dass wir oft nicht auf der grünen Wiese starten können. Zumindest wenn es um ein zusätzliches Produktfeature geht, das mit bestehender Gerätehardware, Vernetzungsarchitektur und der daraus resultierenden Datengrundlage zurechtkommen muss. Zwar sind unsere neuen Produktgenerationen „Remote Update“-fähig, aber auch das hilft uns manchmal nur bedingt. Dementsprechend ist die Antizipation von Geräteanforderungen essenziell. Etwas besser sieht es natürlich bei Umsetzungen von cloud-basierten Use-Cases aus.

Data Science Blog: Es heißt häufig, dass Data Scientists kaum zu finden sind. Ist Recruiting für Sie tatsächlich noch ein Thema?

Data Scientists, hier mal nicht interpretiert als Mythos „Unicorn“ oder „Full-Stack“ sind natürlich wichtig, und auch nicht leicht zu bekommen in einer Region wie Gütersloh. Aber Engineers, egal ob Data, ML, Cloud oder Software generell, sind der viel wesentlichere Baustein für uns. Für die Umsetzung von Ideen braucht es nun mal viel Engineering. Es ist mittlerweile hinlänglich bekannt, dass Data Science einen zwar sehr wichtigen, aber auch kleineren Teil des daten-getriebenen Produkts ausmacht. Mal abgesehen davon habe ich den Eindruck, dass immer mehr „Data Science“- Studiengänge aufgesetzt werden, die uns einerseits die Suche nach Personal erleichtern und andererseits ermöglichen Fachkräfte einzustellen die nicht, wie früher einen PhD haben (müssen).

Data Science Blog: Sie haben bereits einige Analysen erfolgreich in Ihre Produkte integriert. Welche Herausforderungen mussten dabei überwunden werden? Und welche haben Sie heute noch vor sich?

Wir sind, wie viele Data-Science-Abteilungen, noch ein relativ junger Bereich. Bei den meisten unserer smarten Produkte und Services stecken wir momentan in der MVP-Entwicklung, deshalb gibt es einige Herausforderungen, die wir aktuell hautnah erfahren. Dies fängt, wie oben erwähnt, bei der Berücksichtigung von bereits vorhandenen Gerätevoraussetzungen an, geht über mitunter heterogene, inkonsistente Datengrundlagen, bis hin zur Etablierung von Data-Science- Infrastruktur und Deploymentprozessen. Aus meiner Sicht stehen zudem viele Unternehmen vor der Herausforderung die Weiterentwicklung und den Betrieb von AI bzw. Data- Science- Produkten sicherzustellen. Verglichen mit einem „fire-and-forget“ Mindset nach Start der Serienproduktion früherer Zeiten muss ein Umdenken stattfinden. Daten-getriebene Produkte und Services „leben“ und müssen dementsprechend anders behandelt und umsorgt werden – mit mehr Aufwand aber auch mit der Chance „immer besser“ zu werden. Deshalb werden wir Buzzwords wie „MLOps“ vermehrt in den üblichen Beraterlektüren finden, wenn es um die nachhaltige Generierung von Mehrwert von AI und Data Science für Unternehmen geht. Und das zu Recht.

Data Science Blog: Data Driven Thinking wird heute sowohl von Mitarbeitern in den Fachbereichen als auch vom Management verlangt. Gerade für ein Traditionsunternehmen wie Miele sicherlich eine Herausforderung. Wie könnten Sie diese Denkweise im Unternehmen fördern?

Data Driven Thinking kann nur etabliert werden, wenn überhaupt der Zugriff auf Daten und darauf aufbauende Analysen gegeben ist. Deshalb ist Daten-Demokratisierung der wichtigste erste Schritt. Aus meiner Perspektive geht es darum initial die Potenziale aufzuzeigen, um dann mithilfe von Daten Unsicherheiten zu reduzieren. Wir haben die Erfahrung gemacht, dass viele Fachbereiche echtes Interesse an einer daten-getriebenen Analyse ihrer Hypothesen haben und dankbar für eine daten-getriebene Unterstützung sind. Miele war und ist ein sehr innovatives Unternehmen, dass „immer besser“ werden will. Deshalb erfahren wir momentan große Unterstützung von ganz oben und sind sehr positiv gestimmt. Wir denken, dass ein Schritt in die richtige Richtung bereits getan ist und mit zunehmender Zahl an Multiplikatoren ein „Data Driven Thinking“ sich im gesamten Unternehmen etablieren kann.

Process Mining Tools – Artikelserie

Process Mining ist nicht länger nur ein Buzzword, sondern ein relevanter Teil der Business Intelligence. Process Mining umfasst die Analyse von Prozessen und lässt sich auf alle Branchen und Fachbereiche anwenden, die operative Prozesse haben, die wiederum über operative IT-Systeme erfasst werden. Um die zunehmende Bedeutung dieser Data-Disziplin zu verstehen, reicht ein Blick auf die Entwicklung der weltweiten Datengenerierung an. Waren es 2010 noch 2 Zettabytes (ZB), sind laut Statista für das Jahr 2020 mehr als 50 ZB an Daten zu erwarten. Für 2025 wird gar mit einem Bestand von 175 ZB gerechnet.

Hier wird das Datenvolumen nach Jahren angezeit

Abbildung 1 zeigt die Entwicklung des weltweiten Datenvolumen (Stand 2018). Quelle: https://www.statista.com/statistics/871513/worldwide-data-created/

Warum jetzt eigentlich Process Mining?

Warum aber profitiert insbesondere Process Mining von dieser Entwicklung? Der Grund liegt in der Unordnung dieser Datenmenge. Die Herausforderung der sich viele Unternehmen gegenübersehen, liegt eben genau in der Analyse dieser unstrukturierten Daten. Hinzu kommt, dass nahezu jeder Prozess Datenspuren in Informationssystemen hinterlässt. Die Betrachtung von Prozessen auf Datenebene birgt somit ein enormes Potential, welches in Anbetracht der Entwicklung zunehmend an Bedeutung gewinnt.

Was war nochmal Process Mining?

Process Mining ist eine Analysemethodik, welche dazu befähigt, aus den abgespeicherten Datenspuren der Informationssysteme eine Rekonstruktion der realen Prozesse zu schaffen. Diese Prozesse können anschließend als Prozessflussdiagramm dargestellt und ausgewertet werden. Die klassischen Anwendungsfälle reichen von dem Aufspüren (Discovery) unbekannter Prozesse, über einen Soll-Ist-Vergleich (Conformance) bis hin zur Anpassung/Verbesserung (Enhancement) bestehender Prozesse. Mittlerweile setzen viele Firmen darüber hinaus auf eine Integration von RPA und Data Science im Process Mining. Und die Analyse-Tiefe wird zunehmen und bis zur Analyse einzelner Klicks reichen, was gegenwärtig als sogenanntes „Task Mining“ bezeichnet wird.

Hier wird ein typischer Process Mining Workflow dargestellt

Abbildung 2 zeigt den typischen Workflow eines Process Mining Projektes. Oftmals dient das ERP-System als zentrale Datenquelle. Die herausgearbeiteten Event-Logs werden anschließend mittels Process Mining Tool visualisiert.

In jedem Fall liegt meistens das Gros der Arbeit auf die Bereitstellung und Vorbereitung der Daten und der Transformation dieser in sogenannte „Event-Logs“, die den Input für die Process Mining Tools darstellen. Deshalb arbeiten viele Anbieter von Process Mining Tools schon länger an Lösungen, um die mit der Datenvorbereitung verbundenen zeit -und arbeitsaufwendigen Schritte zu erleichtern. Während fast alle Tool-Anbieter vorgefertigte Protokolle für Standardprozesse anbieten, gehen manche noch weiter und bieten vollumfängliche Plattform Lösungen an, welche eine effiziente Integration der aufwendigen ETL-Prozesse versprechen. Der Funktionsumfang der Process Mining Tools geht daher mittlerweile deutlich über eine reine Darstellungsfunktion hinaus und deckt ggf. neue Trends sowie optimierte Einsteigerbarrieren mit ab.

Motivation dieser Artikelserie

Die Motivation diesen Artikel zu schreiben liegt nicht in der Erläuterung der Methode des Process Mining. Hierzu gibt es mittlerweile zahlreiche Informationsquellen. Eine besonders empfehlenswerte ist das Buch „Process Mining“ von Will van der Aalst, einem der Urväter des Process Mining. Die Motivation dieses Artikels liegt viel mehr in der Betrachtung der zahlreichen Process Mining Tools am Markt. Sehr oft erlebe ich als Data-Consultant, dass Process Mining Projekte im Vorfeld von der Frage nach dem „besten“ Tool dominiert werden. Diese Fragestellung ist in Ihrer Natur sicherlich immer individuell zu beantworten. Da individuelle Projekte auch einen individuellen Tool-Einsatz bedingen, beschäftige ich mich meist mit einem großen Spektrum von Process Mining Tools. Daher ist es mir in dieser Artikelserie ein Anliegen einen allgemeingültigen Überblick zu den üblichen Process Mining Tools zu erarbeiten. Dabei möchte ich mich nicht auf persönliche Erfahrungen stützen, sondern die Tools anhand von Testdaten einem praktischen Vergleich unterziehen, der für den Leser nachvollziehbar ist.

Um den Umfang der Artikelserie zu begrenzen, werden die verschiedenen Tools nur in Ihren Kernfunktionen angewendet und verglichen. Herausragende Funktionen oder Eigenschaften der jeweiligen Tools werden jedoch angemerkt und ggf. in anderen Artikeln vertieft. Das Ziel dieser Artikelserie soll sein, dem Leser einen ersten Einblick über die am Markt erhältlichen Tools zu geben. Daher spricht dieser Artikel insbesondere Einsteiger aber auch Fortgeschrittene im Process Mining an, welche einen Überblick über die Tools zu schätzen wissen und möglicherweise auch mal über den Tellerand hinweg schauen mögen.

Die Tools

Die Gruppe der zu betrachteten Tools besteht aus den folgenden namenhaften Anwendungen:

Die Auswahl der Tools orientiert sich an den „Market Guide for Process Mining 2019“ von Gartner. Aussortiert habe ich jene Tools, mit welchen ich bisher wenig bis gar keine Berührung hatte. Diese Auswahl an Tools verspricht meiner Meinung nach einen spannenden Einblick von verschiedene Process Mining Tools am Markt zu bekommen.

Die Anwendung in der Praxis

Um die Tools realistisch miteinander vergleichen zu können, werden alle Tools die gleichen Datengrundlage benutzen. Die Datenbasis wird folglich über die gesamte Artikelserie hinweg für die Darstellungen mit den Tools genutzt. Ich werde im nächsten Artikel explizit diese Datenbasis kurz erläutern.

Das Ziel der praktischen Untersuchung soll sein, die Beispieldaten in die verschiedenen Tools zu laden, um den enthaltenen Prozess zu visualisieren. Dabei möchte ich insbesondere darauf achten wie bedienbar und anpassungsfähig/flexibel die Tools mir erscheinen. An dieser Stelle möchte ich eindeutig darauf hinweisen, dass dieser Vergleich und seine Bewertung meine Meinung ist und keineswegs Anspruch auf Vollständigkeit beansprucht. Da der Markt in Bewegung ist, behalte ich mir ferner vor, diese Artikelserie regelmäßig anzupassen.

Die Kriterien

Neben der Bedienbarkeit und der Anpassungsfähigkeit der Tools möchte ich folgende zusätzliche Gesichtspunkte betrachten:

  • Bedienbarkeit: Wie leicht gehen die Analysen von der Hand? Wie einfach ist der Einstieg?
  • Anpassungsfähigkeit: Wie flexibel reagiert das Tool auf meine Daten und Analyse-Wünsche?
  • Integrationsfähigkeit: Welche Schnittstellen bringt das Tool mit? Läuft es auch oder nur in der Cloud?
  • Skalierbarkeit: Ist das Tool dazu in der Lage, auch große und heterogene Daten zu verarbeiten?
  • Zukunftsfähigkeit: Wie steht es um Machine Learning, ETL-Modeller oder Task Mining?
  • Preisgestaltung: Nach welchem Modell bestimmt sich der Preis?

Die Datengrundlage

Die Datenbasis bildet ein Demo-Datensatz der von Celonis für die gesamte Artikelserie netter Weise zur Verfügung gestellt wurde. Dieser Datensatz bildet einen Versand Prozess vom Zeitpunkt des Kaufes bis zur Auslieferung an den Kunden ab. In der folgenden Abbildung ist der Soll Prozess abgebildet.

Hier wird die Variante 1 der Demo Daten von Celonis als Grafik dargestellt

Abbildung 4 zeigt den gewünschten Versand Prozess der Datengrundlage von dem Kauf des Produktes bis zur Auslieferung.

Die Datengrundlage besteht aus einem 60 GB großen Event-Log, welcher lokal in einer Microsoft SQL Datenbank vorgehalten wird. Da diese Tabelle über 600 Mio. Events beinhaltet, wird die Datengrundlage für die Analyse der einzelnen Tools auf einen Ausschnitt von 60 Mio. Events begrenzt. Um die Performance der einzelnen Tools zu testen, wird jedoch auf die gesamte Datengrundlage zurückgegriffen. Der Ausschnitt der Event-Log Tabelle enthält 919 verschiedene Varianten und weisst somit eine ausreichende Komplexität auf, welche es mit den verschiednene Tools zu analysieren gilt.

Folgender Veröffentlichungsplan gilt für diese Artikelserie und wird mit jeder Veröffentlichung verlinkt:

  1. Celonis (erscheint demnächst)
  2. PAFnow (erscheint demnächst)
  3. MEHRWERK (erscheint demnächst)
  4. Lana Labs (erscheint demnächst)
  5. Signavio (erscheint demnächst)
  6. Process Gold (erscheint demnächst)
  7. Fluxicon Disco (erscheint demnächst)
  8. Aris Process Mining der Software AG (erscheint demnächst)

Zertifikatsstudium „Data Science and Big Data“ 2021 an der TU Dortmund

Anzeige

Komplexe Daten aufbereiten und analysieren, um daraus zukünftige Entwicklungen abzulesen: das lernen Sie im berufsbegleitenden Zertifikatsstudium „Data Science and Big Data“ an der TU Dortmund.

Jetzt bewerben!

Data Science & Big Data 2021

Die Zielgruppe sind Fachkräfte, die sich in ihrer Berufspraxis mit Fragestellungen zum Thema Datenanalyse und Big Data befassen, jedoch nun tiefergehende Kenntnisse in dem Themenfeld erhalten möchten. Von der Analyse über das Management bis zur zielgerichteten Darstellung der Ergebnisse lernen die Teilnehmenden dabei Methoden der Disziplinen Statistik, Informatik und Journalistik kennen.

Renommierte Wissenschaftlerinnen und Wissenschaftler vermitteln den Teilnehmerinnen und Teilnehmern die neuesten datenwissenschaftlichen Erkenntnisse und zeigen, wie dieses Wissen praxisnah im eigenen Big-Data Projekt umgesetzt werden kann.

Die nächste Studiengruppe startet im Februar 2021, der Bewerbungsschluss ist am 2. November 2020. Die Anzahl der verfügbaren Plätze ist begrenzt, eine rechtzeitige Bewerbung lohnt sich daher.

Nähere Informationen finden Sie unter: http://www.zhb.tu-dortmund.de/datascience

Simple RNN

Simple RNN: the first foothold for understanding LSTM

*In this article “Densely Connected Layers” is written as “DCL,” and “Convolutional Neural Network” as “CNN.”

In the last article, I mentioned “When it comes to the structure of RNN, many study materials try to avoid showing that RNNs are also connections of neurons, as well as DCL or CNN.” Even if you manage to understand DCL and CNN, you can be suddenly left behind once you try to understand RNN because it looks like a different field. In the second section of this article, I am going to provide a some helps for more abstract understandings of DCL/CNN , which you need when you read most other study materials.

My explanation on this simple RNN is based on a chapter in a textbook published by Massachusetts Institute of Technology, which is also recommended in some deep learning courses of Stanford University.

First of all, you should keep it in mind that simple RNN are not useful in many cases, mainly because of vanishing/exploding gradient problem, which I am going to explain in the next article. LSTM is one major type of RNN used for tackling those problems. But without clear understanding forward/back propagation of RNN, I think many people would get stuck when they try to understand how LSTM works, especially during its back propagation stage. If you have tried climbing the mountain of understanding LSTM, but found yourself having to retreat back to the foot, I suggest that you read through this article on simple RNNs. It should help you to gain a solid foothold, and you would be ready for trying to climb the mountain again.

*This article is the second article of “A gentle introduction to the tiresome part of understanding RNN.”

1, A brief review on back propagation of DCL.

Simple RNNs are straightforward applications of DCL, but if you do not even have any ideas on DCL forward/back propagation, you will not be able to understand this article. If you more or less understand how back propagation of DCL works, you can skip this first section.

Deep learning is a part of machine learning. And most importantly, whether it is classical machine learning or deep learning, adjusting parameters is what machine learning is all about. Parameters mean elements of functions except for variants. For example when you get a very simple function f(x)=a + bx + cx^2 + dx^3, then x is a variant, and a, b, c, d are parameters. In case of classical machine learning algorithms, the number of those parameters are very limited because they were originally designed manually. Such functions for classical machine learning is useful for features found by humans, after trial and errors(feature engineering is a field of finding such effective features, manually). You adjust those parameters based on how different the outputs(estimated outcome of classification/regression) are from supervising vectors(the data prepared to show ideal answers).

In the last article I said neural networks are just mappings, whose inputs are vectors, matrices, or sequence data. In case of DCLs, inputs are vectors. Then what’s the number of parameters ? The answer depends on the the number of neurons and layers. In the example of DCL at the right side, the number of the connections of the neurons is the number of parameters(Would you like to try to count them? At least I would say “No.”). Unlike classical machine learning you no longer need to do feature engineering, but instead you need to design networks effective for each task and adjust a lot of parameters.

*I think the hype of AI comes from the fact that neural networks find features automatically. But the reality is difficulty of feature engineering was just replaced by difficulty of designing proper neural networks.

It is easy to imagine that you need an efficient way to adjust those parameters, and the method is called back propagation (or just backprop). As long as it is about DCL backprop, you can find a lot of well-made study materials on that, so I am not going to cover that topic precisely in this article series. Simply putting, during back propagation, in order to adjust parameters of a layer you need errors in the next layer. And in order calculate the errors of the next layer, you need errors in the next next layer.

*You should not think too much about what the “errors” exactly mean. Such “errors” are defined in this context, and you will see why you need them if you actually write down all the mathematical equations behind backprops of DCL.

The red arrows in the figure shows how errors of all the neurons in a layer propagate backward to a neuron in last layer. The figure shows only some sets of such errors propagating backward, but in practice you have to think about all the combinations of such red arrows in the whole back propagation(this link would give you some ideas on how DCLs work).

These points are minimum prerequisites for continuing reading this  RNN this article. But if you are planning to understand RNN forward/back propagation at  an abstract/mathematical level that you can read academic papers,  I highly recommend you to actually write down all the equations of DCL backprop. And if possible you should try to implement backprop of three-layer DCL.

2, Forward propagation of simple RNN

*For better understandings of the second and third section, I recommend you to download an animated PowerPoint slide which I prepared. It should help you understand simple RNNs.

In fact the simple RNN which we are going to look at in this article has only three layers. From now on imagine that inputs of RNN come from the bottom and outputs go up. But RNNs have to keep information of earlier times steps during upcoming several time steps because as I mentioned in the last article RNNs are used for sequence data, the order of whose elements is important. In order to do that, information of the neurons in the middle layer of RNN propagate forward to the middle layer itself. Therefore in one time step of forward propagation of RNN, the input at the time step propagates forward as normal DCL, and the RNN gives out an output at the time step. And information of one neuron in the middle layer propagate forward to the other neurons like yellow arrows in the figure. And the information in the next neuron propagate forward to the other neurons, and this process is repeated. This is called recurrent connections of RNN.

*To be exact we are just looking at a type of recurrent connections. For example Elman RNNs have simpler recurrent connections. And recurrent connections of LSTM are more complicated.

Whether it is a simple one or not, basically RNN repeats this process of getting an input at every time step, giving out an output, and making recurrent connections to the RNN itself. But you need to keep the values of activated neurons at every time step, so virtually you need to consider the same RNNs duplicated for several time steps like the figure below. This is the idea of unfolding RNN. Depending on contexts, the whole unfolded DCLs with recurrent connections is also called an RNN.

In many situations, RNNs are simplified as below. If you have read through this article until this point, I bet you gained some better understanding of RNNs, so you should little by little get used to this more abstract, blackboxed  way of showing RNN.

You have seen that you can unfold an RNN, per time step. From now on I am going to show the simple RNN in a simpler way,  based on the MIT textbook which I recomment. The figure below shows how RNN propagate forward during two time steps (t-1), (t).

The input \boldsymbol{x}^{(t-1)}at time step(t-1) propagate forward as a normal DCL, and gives out the output \hat{\boldsymbol{y}} ^{(t)} (The notation on the \boldsymbol{y} ^{(t)} is called “hat,” and it means that the value is an estimated value. Whatever machine learning tasks you work on, the outputs of the functions are just estimations of ideal outcomes. You need to adjust parameters for better estimations. You should always be careful whether it is an actual value or an estimated value in the context of machine learning or statistics). But the most important parts are the middle layers.

*To be exact I should have drawn the middle layers as connections of two layers of neurons like the figure at the right side. But I made my figure closer to the chart in the MIT textbook, and also most other study materials show the combinations of the two neurons before/after activation as one neuron.

\boldsymbol{a}^{(t)} is just linear summations of \boldsymbol{x}^{(t)} (If you do not know what “linear summations” mean, please scroll this page a bit), and \boldsymbol{h}^{(t)} is a combination of activated values of \boldsymbol{a}^{(t)} and linear summations of \boldsymbol{h}^{(t-1)} from the last time step, with recurrent connections. The values of \boldsymbol{h}^{(t)} propagate forward in two ways. One is normal DCL forward propagation to \hat{\boldsymbol{y}} ^{(t)} and \boldsymbol{o}^{(t)}, and the other is recurrent connections to \boldsymbol{h}^{(t+1)} .

These are equations for each step of forward propagation.

  • \boldsymbol{a}^{(t)} = \boldsymbol{b} + \boldsymbol{W} \cdot \boldsymbol{h}^{(t-1)} + \boldsymbol{U} \cdot \boldsymbol{x}^{(t)}
  • \boldsymbol{h}^{(t)}= g(\boldsymbol{a}^{(t)})
  • \boldsymbol{o}^{(t)} = \boldsymbol{c} + \boldsymbol{V} \cdot \boldsymbol{h}^{(t)}
  • \hat{\boldsymbol{y}} ^{(t)} = f(\boldsymbol{o}^{(t)})

*Please forgive me for adding some mathematical equations on this article even though I pledged not to in the first article. You can skip the them, but for some people it is on the contrary more confusing if there are no equations. In case you are allergic to mathematics, I prescribed some treatments below.

*Linear summation is a type of weighted summation of some elements. Concretely, when you have a vector \boldsymbol{x}=(x_0, x_1, x_2), and weights \boldsymbol{w}=(w_0,w_1, w_2), then \boldsymbol{w}^T \cdot \boldsymbol{x} = w_0 \cdot x_0 + w_1 \cdot x_1 +w_2 \cdot x_2 is a linear summation of \boldsymbol{x}, and its weights are \boldsymbol{w}.

*When you see a product of a matrix and a vector, for example a product of \boldsymbol{W} and \boldsymbol{v}, you should clearly make an image of connections between two layers of a neural network. You can also say each element of \boldsymbol{u}} is a linear summations all the elements of \boldsymbol{v}} , and \boldsymbol{W} gives the weights for the summations.

A very important point is that you share the same parameters, in this case \boldsymbol{\theta \in \{\boldsymbol{U}, \boldsymbol{W}, \boldsymbol{b}, \boldsymbol{V}, \boldsymbol{c} \}}, at every time step. 

And you are likely to see this RNN in this blackboxed form.

3, The steps of back propagation of simple RNN

In the last article, I said “I have to say backprop of RNN, especially LSTM (a useful and mainstream type or RNN), is a monster of chain rules.” I did my best to make my PowerPoint on LSTM backprop straightforward. But looking at it again, the LSTM backprop part still looks like an electronic circuit, and it requires some patience from you to understand it. If you want to understand LSTM at a more mathematical level, understanding the flow of simple RNN backprop is indispensable, so I would like you to be patient while understanding this step (and you have to be even more patient while understanding LSTM backprop).

This might be a matter of my literacy, but explanations on RNN backprop are very frustrating for me in the points below.

  • Most explanations just show how to calculate gradients at each time step.
  • Most study materials are visually very poor.
  • Most explanations just emphasize that “errors are back propagating through time,” using tons of arrows, but they lack concrete instructions on how actually you renew parameters with those errors.

If you can relate to the feelings I mentioned above, the instructions from now on could somewhat help you. And with the animated PowerPoint slide I prepared, you would have clear understandings on this topic at a more mathematical level.

Backprop of RNN , as long as you are thinking about simple RNNs, is not so different from that of DCLs. But you have to be careful about the meaning of errors in the context of RNN backprop. Back propagation through time (BPTT) is one of the major methods for RNN backprop, and I am sure most textbooks explain BPTT. But most study materials just emphasize that you need errors from all the time steps, and I think that is very misleading and confusing.

You need all the gradients to adjust parameters, but you do not necessarily need all the errors to calculate those gradients. Gradients in the context of machine learning mean partial derivatives of error functions (in this case J) with respect to certain parameters, and mathematically a gradient of J with respect to \boldsymbol{\theta \in \{\boldsymbol{U}, \boldsymbol{W}, \boldsymbol{b}^{(t)}, \boldsymbol{V}, \boldsymbol{c} \}}is denoted as ( \frac{\partial J}{\partial \boldsymbol{\theta}}  ). And another confusing point in many textbooks, including the MIT one, is that they give an impression that parameters depend on time steps. For example some study materials use notations like \frac{\partial J}{\partial \boldsymbol{\theta}^{(t)}}, and I think this gives an impression that this is a gradient with respect to the parameters at time step (t). In my opinion this gradient rather should be written as ( \frac{\partial J}{\partial \boldsymbol{\theta}} )^{(t)} . But many study materials denote gradients of those errors in the former way, so from now on let me use the notations which you can see in the figures in this article.

In order to calculate the gradient \frac{\partial J}{\partial \boldsymbol{x}^{(t)}} you need errors from time steps s (s \geq t) \quad (as you can see in the figure, in order to calculate a gradient in a colored frame, you need all the errors in the same color).

*To be exact, in the figure above I am supposed prepare much more arrows in \tau + 1 different colors  to show the whole process of RNN backprop, but that is not realistic. In the figure I displayed only the flows of errors necessary for calculating each gradient at time step 0, t, \tau.

*Another confusing point is that the \frac{\partial J}{\partial \boldsymbol{\ast ^{(t)}}}, \boldsymbol{\ast} \in \{\boldsymbol{a}^{(t)}, \boldsymbol{h}^{(t)}, \boldsymbol{o}^{(t)}, \dots \} are correct notations, because \boldsymbol{\ast} are values of neurons after forward propagation. They depend on time steps, and these are very values which I have been calling “errors.” That is why parameters do not depend on time steps, whereas errors depend on time steps.

As I mentioned before, you share the same parameters at every time step. Again, please do not assume that parameters are different from time step to time step. It is gradients/errors (you need errors to calculate gradients) which depend on time step. And after calculating errors at every time step, you can finally adjust parameters one time, and that’s why this is called “back propagation through time.” (It is easy to imagine that this method can be very inefficient. If the input is the whole text on a Wikipedia link, you need to input all the sentences in the Wikipedia text to renew parameters one time. To solve this problem there is a backprop method named “truncated BPTT,” with which you renew parameters based on a part of a text. )

And after calculating those gradients \frac{\partial J}{\partial \boldsymbol{\theta}^{(t)}} you can take a summation of them: \frac{\partial J}{\partial \boldsymbol{\theta}}=\sum_{t=0}^{t=\tau}{\frac{\partial J}{\partial \boldsymbol{\theta}^{(t)}}}. With this gradient \frac{\partial J}{\partial \boldsymbol{\theta}} , you can finally renew the value of \boldsymbol{\theta} one time.

At the beginning of this article I mentioned that simple RNNs are no longer for practical uses, and that comes from exploding/vanishing problem of RNN. This problem was one of the reasons for the AI winter which lasted for some 20 years. In the next article I am going to write about LSTM, a fancier type of RNN, in the context of a history of neural network history.

* I make study materials on machine learning, sponsored by DATANOMIQ. I do my best to make my content as straightforward but as precise as possible. I include all of my reference sources. If you notice any mistakes in my materials, including grammatical errors, please let me know (email: yasuto.tamura@datanomiq.de). And if you have any advice for making my materials more understandable to learners, I would appreciate hearing it.

Severity of lockdowns and how they are reflected in mobility data

The global spread of the SARS-CoV-2 at the beginning of March 2020 forced majority of countries to introduce measures to contain the virus. The governments found themselves facing a very difficult tradeoff between limiting the spread of the virus and bearing potentially catastrophic economical costs of a lockdown. Notably, considering the level of globalization today, the response of countries varied a lot in severity and response latency. In the overwhelming amount of media and social media information feed a lot of misinformation and anecdotal evidence surfaced and remained in people’s mind. In this article, I try to have a more systematic view on the topics of severity of response from governments and change in people’s mobility due to the pandemic.

I want to look at several countries with different approach to restraining the spread of the virus. I will look at governmental regulations, when, and how they were introduced. For that I am referring to an index called Oxford COVID-19 Government Response Tracker (OxCGRT)[1]. The OxCGRT follows, records, and rates the actions taken by governments, that are available publicly. However, looking just at the regulations and taking them for granted does not provide that we have the whole picture. Therefore, equally interesting is the investigation of how the recommended levels of self-isolation and social distancing is reflected in the mobility data and we will look at it first.

The mobility dataset

The mobility data used in this article was collected by Google and made freely accessible[2]. The data reflects how the number of visits and their length changed as compared to a baseline from before the pandemic. The baseline is the median value for the corresponding day of the week in the period from 3.01.2020 – 6.02.2020. The dataset contains data in six categories. Here we look at only 4 of them: public transport stations, places of residence, workplaces, and retail/recreation (including shopping centers, libraries, gastronomy, culture). The analysis intentionally omits parks (public beaches, gardens etc.) and grocery/pharmacy category. Mobility in parks is excluded due to huge weather change confound. The baseline was created in winter and increased/decreased (depending on the hemisphere) activity in parks is expected as the weather changes. It would be difficult to detangle tis change from the change caused by the pandemic without referring to a different baseline. The grocery shops and pharmacies are excluded because the measures regarding the shopping were very similar across the countries.

Amid the Covid-19 pandemic a lot of anecdotal information surfaced, that some countries, like Sweden, acted completely against the current by not introducing a lockdown. It was reported that there were absolutely no restrictions and Sweden can be basically treated as a control group for comparing the different approaches to lockdown on the spread of the coronavirus. Looking at the mobility data (below), we can see however, that there was a change in the mobility of Swedish citizens in comparison to the baseline.

Fig. 1 Moving average (+/- 6 days) of the mobility data in Sweden in four categories.

Fig. 1 Moving average (+/- 6 days) of the mobility data in Sweden in four categories.

Looking at the change in mobility in Sweden, we can see that the change in the residential areas is small, but it is indicating some change in behavior. A change in the retail and recreational sector is more noticeable. Most interestingly it is approaching the baseline levels at the beginning of June. The most substantial changes, however, are in the workplaces and transit categories. They are also much slower to come back to the baseline, although a trend in that direction starts to be visible.

Next, let us have a look at the change in mobility in selected countries, separately for each category. Here, I compare Germany, Sweden, Italy, and New Zealand. (To see the mobility data for other countries visit https://covid19.datanomiq.de/#section-mobility).

Fig. 2 Moving average (+/- 6 days) of the mobility data.

Fig. 2 Moving average (+/- 6 days) of the mobility data.

Looking at the data, we can see that the change in mobility in Germany and Sweden was somewhat similar in orders of magnitude, in comparison to changes in mobility in countries like Italy and New Zealand. Without a doubt, the behavior in Sweden changed the least from the baseline in all the categories. Nevertheless, claiming that people’s reaction to the pandemic in Sweden in Germany were polar opposites is not necessarily correct. The biggest discrepancy between Sweden and Germany is in the retail and recreation sector out of all categories presented. The changes in Italy and New Zealand reached very comparable levels, but in New Zealand they seem to be much more dynamic, especially in approaching the baseline levels again.

The government response dataset

Oxford COVID-19 Government Response Tracker records regulations from number of countries, rates them and categorizes into a few indices. The number between 1 and 100 reflects the level of the action taken by a government. Here, I focus on the Containment and Health sub-index that includes 11 indicators from categories: containment and closure policies and health system policies[3]. The actions included in the index are for example: school and workplace closing, restrictions on public events, travel restrictions, public information campaigns, testing policy and contact tracing.

Below, we look at a plot with the Containment and Health sub-index value for the four aforementioned countries. Data and documentation is available here[4]

Fig. 3 Oxford COVID-19 Government Response Tracker, the Containment and Health sub-index.

Fig. 3 Oxford COVID-19 Government Response Tracker, the Containment and Health sub-index.

Here the difference between Sweden and the other countries that we are looking at becomes more apparent. Nevertheless, the Swedish government did take some measures in order to condemn the spread of the SARS-CoV-2. At the highest, the index reached value 45 points in Sweden, 73 in Germany, 92 in Italy and 94 in New Zealand. In all these countries except for Sweden the index started dropping again, while the drop is the most dynamic in New Zealand and the index has basically reached the level of Sweden.

Conclusions

As we have hopefully seen, the response to the COVID-19 pandemic from governments differed substantially, as well as the resulting change in mobility behavior of the inhabitants did. However, the discrepancies were probably not as big as reported in the media.

The overwhelming presence of the social media could have blown some of the mentioned differences out of proportion. For example, the discrepancy in the mobility behavior between Sweden and Germany was biggest in recreation sector, that involves cafes, restaurants, cultural resorts, and shopping centers. It is possible, that those activities were the ones that people in lockdown missed the most. Looking at Swedes, who were participating in them it was easy to extrapolate on the overall landscape of the response to the virus in the country.

It is very hard to say which of the world country’s approach will bring the best effects for the people’s well-being and the economies. The ongoing pandemic will remain a topic of extensive research for many years to come. We will (most probably) eventually find out which approach to the lockdown was the most optimal (or at least come close to finding out). For the time being, it is however important to remember that there are many factors in play and looking into one type of data might be misleading. Comparing countries with different history, weather, political and economic climate, or population density might be misleading as well. But it is still more insightful than not looking into the data at all.

[1] Hale, Thomas, Sam Webster, Anna Petherick, Toby Phillips, and Beatriz Kira (2020). Oxford COVID-19 Government Response Tracker, Blavatnik School of Government. Data use policy: Creative Commons Attribution CC BY standard.

[2] Google LLC “Google COVID-19 Community Mobility Reports”. https://www.google.com/covid19/mobility/ retrived: 04.06.2020

[3] See documentation https://github.com/OxCGRT/covid-policy-tracker/tree/master/documentation

[4] https://github.com/OxCGRT/covid-policy-tracker  retrieved on 04.06.2020

Capturing COVID: How and Why Data Mining is Being Used to Combat Coronavirus

Image Source: Pixabay (https://pixabay.com/illustrations/artificial-intelligence-brain-think-3382507/)

In just a few short months, the coronavirus pandemic has infiltrated pretty much every aspect of daily life. It has virtually decimated the global economy. It has taken our children out of their schools. It’s wrought havoc on an already overburdened healthcare system.

That, however, is changing. And technology is the reason why. Data mining is nothing new, of course, and its use in the field of healthcare is well-established.

But the importance of data mining has never been more apparent than right now, as scientists, researchers, and healthcare providers race to develop a clear and effective profile of this unseen adversary.

What is Data Mining and Why Does It Matter?

Put simply, data mining uses automated technology to scour other technologies for relevant information collected from the tech’s users. Data scientists then analyze these enormous — and we do mean enormous — quantities of data for some actionable purpose.

Big data can be used for anything from developing a targeted market plan for a large multinational based on customer research to formulating emergency preparedness plans based on community risk assessments to investigating crime scenes.

Data Mining, Healthcare, and Corona

In the face of rising healthcare costs, surging demand, and shrinking resources, data mining has proved an invaluable tool for evidence-based healthcare. For years now, anonymized patient data has been mined to identify public health concerns, individual patient risks, and customized treatment protocols. All of these are derived from the nearly instantaneous automated analysis of literally billions of gigabytes of data.

When it comes to combating coronavirus, data mining is turning out to be one of the most powerful weapons in the public health arsenal. Through healthcare data, researchers and policymakers can better describe the virus, its impacts, and its behaviors.

For example, COVID patients’ electronic health records (EHR) are being anonymized and mined for data on how the virus presented, what course it took, and what pre-existing factors, from age and gender to prior health status, the patient had. Likewise, hospital and clinical data are collected to determine how many patients, and in what demographics, were presenting with symptoms of the disease at any given time.

Once a more comprehensive description of the virus has been developed, researchers can use this information to predict who will be affected, how, and where. Armed with this knowledge, public health officials can make informed decisions on policies to help prevent or slow the spread.

Likewise, healthcare providers can devise more effective treatment plans based on success rates drawn from data accumulated from across the globe. They can even use the information drawn from mined healthcare data to determine who is at great risk for a poor outcome or severe complications, such as blood clots.

For example, these data can help determine who might be the best candidate for convalescent plasma or antivirals like Remdesivir. Scientists and healthcare providers are also increasingly cognizant of the risk of a severe autoimmune syndrome that children who have been exposed to the virus might experience, even if they had never become symptomatic for COVID.

The Really Smartphone

It’s not just patient records and other medical data that are being mined in the fight against coronavirus. As it turns out, your friendly, unassuming little smartphone is proving to be a treasure trove of essential public health data.

Your cell phone data plan allows you to live your digital life via your smartphone. When you’re streaming videos or surfing the web on your phone, you’re almost certainly using data, and that data can be mined — both for malicious (or at least questionable) purposes and for good ones.

When you link your smartphone to the network, your movements can be tracked using your phone’s geolocation capabilities. To be sure, that capability hasn’t gone without significant opposition from privacy advocates. Significant fears over the security of that data and how it might be used has fueled a long and often heated debate, both in courts of law and in the court of public opinion.

But now, in the face of a global pandemic, with the virus continuing to menace nearly every corner of the globe, the capacity to track the movements of those who have been in active hot zones, and especially of travelers coming from them, isn’t just helpful. It’s lifesaving. Through the use of cellphone data, for instance, not only can scientists track the spread of the virus, but they can also engage in more effective contract tracing. This includes the ability to warn individuals who have been in close proximity to an infected person.

The Takeaway

The coronavirus pandemic is like nothing many of us have ever seen before. This previously unknown pathogen has changed the world as we once knew it. It has not only altered the way we live, but it has threatened our own lives and the lives of those we love. But the virus will not be able to exploit its novelty for much longer. Every day, scientists and researchers are mining essential data to better understand the virus, what it does, and how it moves. Every moment, new treatment and containment strategies are emerging based on the power of big data. Every second, we are mining for the data for the weapon that will kill the enemy once and for all.

Interview – Machine Learning in Marketing und CRM

Interview mit Herrn Laurenz Wuttke von der datasolut GmbH über Machine Learning in Marketing und CRM.

Laurenz Wuttke ist Data Scientist und Gründer der datasolut GmbH. Er studierte Wirtschaftsinformatik an der Hochschule Hannover und befasst sich bereits seit 2011 mit Marketing- bzw. CRM-Systemen und der Datenanalyse. Heute ist er Dozent für Big Data im Marketing an der Hochschule Düsseldorf und unterstützt Unternehmen dabei, durch den Einsatz von künstlicher Intelligenz, individuell auf die Kundenbedürfnisse tausender Kunden einzugehen. Damit jeder Marketing Manager jedem Kunden das richtige Angebot zur richtigen Zeit machen kann.

Data Science Blog: Herr Wuttke, Marketing gilt als einer der Pionier-Bereiche der Unternehmen für den Einstieg in Big Data Analytics. Wie etabliert ist Big Data und Data Science heute im Marketing?  

Viele Unternehmen in Deutschland erkennen gerade Chancen und den Wert ihrer Daten. Dadurch investieren die Unternehmen in Big Data Infrastruktur und Data Science Teams.

Gleichzeitig denke ich, wir stehen im Marketing gerade am Anfang einer neuen Daten-Ära. Big Data und Data Science sind im Moment noch ein Thema der großen Konzerne. Viele kleine und mittelständische Unternehmen haben noch viele offene Potentiale in Bezug auf intelligente Kundenanalysen.

Durch stetig steigende Preise für die Kundenakquise, wird die Erhaltung und Steigerung einer guten Kundenbindung immer wichtiger. Und genau hier sehe ich die Vorteile durch Data Science im Marketing. Unternehmen können viel genauer auf Kundenbedürfnisse eingehen, antizipieren welches Produkt als nächstes gekauft wird und so ihr Marketing zielgenau ausrichten. Dieses „personalisierte Marketing“ führt zu einer deutlich stärkeren Kundenbindung und steigert langfristig Umsätze.

Viele amerikanische Unternehmen machen es vor, aber auch deutsche Unternehmen wie Zalando oder AboutYou investieren viel Geld in die Personalisierung ihres Marketings. Ich denke, die Erfolge sprechen für sich.

Data Science Blog: Ein häufiges Anliegen für viele Marketing Manager ist die treffsichere Kundensegmentierung nach vielerlei Kriterien. Welche Verbesserungen sind hier möglich und wie können Unternehmen diese erreichen?

Kundensegmentierungen sind ein wichtiger Bestandteil vieler Marketingstrategien. Allerdings kann man hier deutlich weitergehen und Marketing im Sinne von „Segments of One“ betreiben. Das bedeutet wir haben für jeden einzelnen Kunden eine individuelle „Next Best Action und Next Best Offer“.

Somit wird jeder Kunde aus Sicht des Marketings individuell betrachtet und bekommt individuelle Produktempfehlungen sowie Marketingmaßnahmen, welche auf das jeweilige Kundenbedürfnis zugeschnitten sind.

Dies ist auch ein wichtiger Schritt für die Marketingautomatisierung, denn wir können im Marketing schlichtweg keine tausenden von Kunden persönlich betreuen.

Data Science Blog: Sind die Kundencluster dann erkannt, stellt sich die Frage, wie diese besser angesprochen werden können. Wie funktioniert die dafür notwendige Kundenanalyse?

Ganz unterschiedlich, je nach Geschäftsmodell und Branche fällt die Kundenanalyse anders aus. Wir schauen uns unterschiedliche Merkmale zum historischen Kaufverhalten, Demografie und Produktnutzung an. Daraus ergeben sich in der Regel sehr schnell Kundenprofile oder Personas, die gezielt angesprochen werden können.

Data Science Blog: Oft werden derartige Analyse-Vorhaben auf Grund der Befürchtung, die relevanten Daten seien nicht verfügbar oder die Datenqualität sei einer solchen Analyse nicht würdig, gar nicht erst gestartet. Sind das begründete Bedenken?

Nein, denn oft kommen die Daten, die für eine Kundenanalyse oder die Vorhersage von Ergebnissen braucht, aus Datenquellen wie z.B. den Transaktionsdaten. Diese Daten hat jedes Unternehmen in guter Qualität vorliegen.

Natürlich werden die Analysen besser, wenn weitere Datenquellen wie bspw. Produktmetadaten, Kundeneigenschaften oder das Klickverhalten zur Verfügung stehen, aber es ist kein Muss.

Aus meiner Praxiserfahrung kann ich sagen, dass hier oft ungenutzte Potentiale schlummern.

Data Science Blog: Wie ist da eigentlich Ihre Erfahrung bzgl. der Interaktion zwischen Marketing und Business Intelligence? Sollten Marketing Manager ihre eigenen Datenexperten haben oder ist es besser, diese Ressourcen zentral in einer BI-Abteilung zu konzentrieren?

Aus meiner Sicht funktioniert moderenes Marketing heute nicht mehr ohne valide Datenbasis. Aus diesem Grund ist die Zusammenarbeit von Marketing und Business Intelligence unersetzbar, besonders wenn es um Bestandskundenmarketing geht. Hier laufen idealerweise alle Datenquellen in einer 360 Grad Kundensicht zusammen.

Dies kann dann auch als die Datenquelle für Machine Learning und Data Science verwendet werden. Alle wichtigen Daten können aus einer strukturierten 360 Grad Sicht zu einer Machine Learning Datenbasis (ML-Feature Store) umgewandelt werden. Das spart enorm viel Zeit und viel Geld.

Zu Ihrer zweiten Frage: Ich denke es gibt Argumente für beide Konstrukte, daher habe ich da keine klare Präferenz. Mir ist immer wichtig, dass der fachliche Austausch zwischen Technik und Fachbereich gut funktioniert. Ziele müssen besprochen und gegeben falls angepasst werden, um immer in die richtige Richtung zu gehen. Wenn diese Voraussetzung mit einer guten Data Science Infrastruktur gegeben ist, wird Data Science für wirklich skalierbar.

Data Science Blog: Benötigen Unternehmen dafür eine Customer Data Platform (CDP) oder zumindest ein CRM? Womit sollten Unternehmen beginnen, sollten sie noch ganz am Anfang stehen?

Eine Customer Data Platform (CDP) ist von Vorteil, ist aber kein Muss für den Anfang. Ein guts CRM-System oder gute gepflegte Kundendatenbank reicht zunächst für den Anfang.

Natürlich bietet eine CDP einen entscheidenden Vorteil durch die Zusammenführung von der Online- und der CRM-Welt. Das Klickverhalten hat einen enormen Einfluss auf die analytischen Modelle und hilft dabei, Kunden immer besser zu verstehen. Das ist besonders wichtig in unserer Zeit, da wir immer weniger direkten Kundenkontakt haben und zukünftig wird dieser auch noch weiter abnehmen.

Zusammengefasst: Wer diese Kundendaten intelligent miteinander verknüpft hat einen großen Vorteil.

Data Science Blog: Wie integrieren Sie App- und Webtracking in Ihre Analysen?

Trackingdaten aus Apps und Webseiten sind ein wichtiger Bestandteil unserer Machine Learning Modelle. Sie geben wichtige Informationen über das Kundenverhalten preis. So können die Trackingdaten gute Merkmale für Anwendungsfälle wie Churn Prediction, Customer Lifetime Value und Next Best Offer sein.

Häufig sind die Trackingdaten von unterschiedlichen Anbietern (Google Analytics, Piwik etc.) leicht anders in ihrer Struktur, dafür haben wir uns einen intelligenten Ansatz überlegt, um diese zu vereinheitlichen und in unseren Modellen anzuwenden.

Data Science Blog: Zurück zum Kunden. Seine Bedürfnisse stehen bei erfolgreichen Unternehmen im Fokus stehen. Einige Geschäftsmodelle basieren auf Abonnements oder Mitgliedschaften. Wie können Sie solchen Unternehmen helfen?

Abonnements und Subscriptions sind ein großer Trend: Der Kunde wird zum Nutzer und es fallen viele Kundendaten an, die gesammelt werden können. Viele unserer Kunden haben subscription- oder vertragsbasierte Geschäftsmodelle, was ich persönlich sehr interessante Geschäftsmodelle finde.

Diese haben häufig die Herausforderung ihre Kunden langfristig zu binden und eine gesunde Kundenbindung aufzubauen. Die Akquisition ist meistens sehr teuer und die Kundenabwanderung oder Customer Churn zu reduzieren damit ein strategisches Ziel. Wirklich erfolgreich werden diese dann, wenn die Churn Rate geringgehalten wird.

Die Lösung für eine niedrige Kundenabwanderung, neben einem guten Produkt und gutem Kundenservice, ist eine Churn Prediction und darauf aufbauende Churn Prevention Maßnahmen. Wir nehmen uns dazu das historische Kundenverhalten, schauen uns die Kündiger an und modellieren daraus eine Vorhersage für die Kundenabwanderung. So können Unternehmen abwanderungsgefährdete Kunden schon frühzeitig erkennen und entsprechend handeln. Das hat den entscheidenden Vorteil, dass man nicht einen schon verlorenen Kunden erneut gewinnen muss.

Es gibt aber auch Möglichkeiten schon weit vor der eigentlichen Churn-Gefahr anzusetzen, bei drohender Inaktivität. So haben wir für einen großen Fitness-App-Anbieter ein Alarmsystem entwickelt, das Kunden automatisiert Engagement-Kampagnen versendet, um bei drohender Inaktivität, den Kunden auf die Angebote aufmerksam zu machen. Sie kennen das von der Netflix-App, welche Ihnen jeden Abend einen guten Tipp für das Fernsehprogramm bereitstellt.

Data Science Blog: Gehen wir mal eine Ebene höher. So mancher CMO hat mit dem CFO den Deal, jährlich nur einen bestimmten Betrag ins Marketing zu stecken. Wie hilft Data Science bei der Budget-Verteilung auf die Bestandskunden?

Da gibt es eine einfache Lösung für „Customer Lifetime Value Prognosen“. Durch Machine Learning wird für jeden einzelnen Kunden eine Umsatz-Vorhersage für einen bestimmten Zeitraum getroffen. So kann das Bestandkundenmarketing das Marketingbudget ganz gezielt einsetzen und nach dem Kundenwert steuern. Ich gebe Ihnen ein Beispiel: Kundenreaktivierung im Handel. Sie haben ein bestimmtes Budget und können nicht jedem Kunden eine Reaktivierungsmaßnahme zukommen lassen. Wenn Sie einen gut berechneten Customer Lifetime Value haben, können Sie sich so auf die wertigen Kunden konzentrieren und diese reaktivieren.

Data Science Blog: Mit welchen Technologien arbeiten Sie bevorzugt? Welche Tools sind gerade im Kontext von analytischen Aufgaben im Marketing besonders effizient?

Wir haben uns in den letzten Jahren besonders auf Python und PySpark fokussiert. Mit der Entwicklung von Python für Data Science konnten die anderen Umgebungen kaum mithalten und somit ist Python aus meiner Sicht derzeit die beste Umgebung für unsere Lösungen.

Auch die Cloud spielt eine große Rolle für uns. Als kleines Unternehmen haben wir uns bei datasolut auf die AWS Cloud fokussiert, da wir gar nicht in der Lage wären, riesige Datenbestände unserer Kunden zu hosten.

Vor allem von dem hohen Automatisierungsgrad in Bezug auf Datenverarbeitung und Machine Learning bietet AWS alles, was das Data Science Herz begehrt.

Data Science Blog: Was würden Sie einem Junior Marketing Manager und einem Junior Data Scientist für den Ausbau seiner Karriere raten? Wie werden diese jungen Menschen zukünftig beruflich erfolgreich?

Dem Junior Marketing Manager würde ich immer raten, dass er sich Datenanalyse-Skills erarbeiten soll. Aber vor allem sollte er verstehen, was mit Daten alles möglich ist und wie diese eingesetzt werden können. Auch in meiner Vorlesung zu „Big Data im Marketing“ an der Hochschule Düsseldorf unterrichte ich Studierende, die auf Marketing spezialisiert sind. Hier gebe ich stets diesen Ratschlag.

Bei den Junior Daten Scientist ist es andersherum. Ich sehe in der Praxis immer wieder Data Scientists, die den Transfer zwischen Marketing und Data Science nicht gut hinbekommen. Daher rate ich jedem Data Scientist, der sich auf Marketing und Vertrieb fokussieren will, dass hier fachliches Know-How essentiell ist. Kein Modell oder Score hat einen Wert für ein Unternehmen, wenn es nicht gut im Marketing eingesetzt wird und dabei hilft, Marketingprozesse zu automatisieren.

Ein weiterer wichtiger Aspekt ist, dass sich Data Science und Machine Learning gerade rasant ändern. Die Automatisierung (Stichwort: AutoML) von diesen Prozessen ist auf der Überholspur, dass zeigen die großen Cloudanbieter ganz deutlich. Auch wir nutzen diese Technologie schon in der Praxis. Was der Algorithmus aber nicht übernehmen kann, ist der Transfer und Enablement der Fachbereiche.

Data Science Blog: Zum Schluss noch eine Bitte: Was ist Ihre Prophezeiung für die kommenden Jahre 2021/2022. What is the next big thing in Marketing Analytics?

Es gibt natürlich viele kleinere Trends, welche das Marketing verändern werden. Ich denke jedoch, dass die größte Veränderung für die Unternehmen sein wird, dass es einen viel großflächigeren Einsatz von Machine Learning im Marketing geben wird. Dadurch wird der Wettbewerb härter und für viele Unternehmen wird Marketing Analytics ein essentieller Erfolgsfaktor sein.

 How Text to Speech Voices Are Used In Data Science

To speak on voices, text to speech platforms are bringing versatility to a new scale by implementing voices that sound more personal and less like a robot. As these services gain traction, vocal quality, and implementation improve to give sounds that feel like they’re speaking to you from a human mouth.

The intention of most text to speech platforms have always been to provide experiences that users feel comfortable using. Voices are a huge part of that, so great strides have been taken to ensure that they sound right.

How Voices are Utilized

Voices in the text to speech are generated by a computer itself. As the computer-generated voices transcribe the text into oral responses, they make up what we hear as dialogue read to us. These voice clips initially had the problem of sounding robotic and unpersonable as they were pulled digitally together. Lately, though, the technology has improved to bring faster response time in transcribing words, as well as seamlessly stringing together. This has brought the advantage of making a computer-generated voice sound much more natural and human. As people seek to connect more with the works they read, having a human-sounding voice is a huge step in letting listeners relate to their works.

To give an example of where this works, you might have a GPS in your car. The GPS has a function where it will transcribe the car’s route and tell you each instruction. Some GPS companies have made full use of this feature and added fun voices to help entertain drivers. These include Darth Vader and Yoda from Star Wars or having Morgan Freeman and Homer Simpson narrate your route. Different voice types are utilized in services depending on the situation. Professional uses like customer service centers will keep automated voices sounding professional and courteous when assisting customers. Educational systems will keep softer and kinder sounding voices to help sound more friendly with students.

When compared to older solutions, the rise of vocal variety in Text to Speech services has taken huge leaps as more people see the value of having a voice that they can connect to. Expressive voices and emotional variance are being applied to voices to help further convey this, with happy or sad sounding voices being implemented wherever appropriate. As time goes on, these services will get better at the reading context within sentences to apply emotion and tone at the correct times, and improve overall vocal quality as well. These reinvent past methods by advancing the once static and robotic sounds that used to be commonplace among text to voice services.

More infrastructures adopt these services to expand their reach to consumers who might not have the capabilities to utilize their offerings.  Having clear and relatable voices matter because customers and users will be drawn to them considerably more than if they chose not to offer them at all. In the near future text to speech voices will develop even further, enhancing the way people of all kinds connect to the words they read.

Data Science Security Hacks

It would blow your mind if you had exposure to all the information available on the internet. The science behind it is very demanding. It could explain why there is such an explosion of intelligent systems. People come in with different skill sets, including math, data analysis, statistics, and programming, to name a few.

They all use very orthodox methods in their approach to data science. But, we have people with hacker mindsets who think out of the box. You will find them using security hacks to circumvent the scientific approach to data science. Our article will explore some of the methods they use, and why you may need an SSL certificate.

Understanding Data Science

Data science is the use of different tools, machine learning principles and algorithms to shift through raw data to discover any hidden patterns. The scientist will use the information to make predictions and decisions through the use of prescriptive analytics, machine learning, and predictive analytics. They collect data from multiple sources and organize it before translating it into results.

The scientists come to their conclusions by looking at a problem from all viewpoints and asking the right questions. Many companies are using these services to make sound business decisions. You will find the use of data science in areas such as risk and fraud detection, healthcare, advertising, and even gaming.

Data Science Security Hacks

  • Data Protection 

Data is everything to a data scientist. However, they are always at threat of losing it due to a rise in cybersecurity threats. Online hackers are getting more daring and sophisticated and are continually coming up with new ways to access people’s information. It is, therefore, critical to protecting one’s privacy and security while on the internet.

Phishing attacks and malware are genuine threats to the digital space. SSL certificates provide data security because it protects the user from unwanted third party tampering. You can find many types of SSL certificates like single domain, Code Signing certificate, multi-domain SSL, etc.

  • Having the Mindset of a Hacker

A typical scientific mindset is to build models, train, plot graphs, and analyze the different attributes to come up with a solution. The mindset of a hacker is very different from that of a scientist. They focus more on finding Solutions using simple methods.

While the data scientists use so many various components to a problem, the hacker works at eliminating complexity to come up with a solution. The hacker mindset is, therefore, freer, because the confines of the scientific mind do not bound them.

  • Data Cleaning Techniques

There are tons of raw data that data scientists have to work with. Once they collect it, it has to go through the process of cleaning. It is a very complex process because scientists will be working with unstructured data. It is, however, a critical component of data science because scientists will have to extract what they need.

They are then able to process the data and structure it into usable data that will yield the required outcome. One of the ways of achieving the best results might be to use the most straightforward models available. The sophisticated tools do not always give the desired results. Even if they do, they may make the process more tedious and time-consuming than necessary.

  • The Learning Never Ends

In the field of data science, look at it more like a journey, and not a process to get to a destination. They must, therefore, always learn because the domain is vast, and there is new information coming in every day. It is in the process of learning that they can come up with more intelligent models for use within the field. They keep abreast of the latest innovations and technologies, which they can use in their daily problem-solving processes.

The online platform has so much information for anyone interested in developing their skill sets. You do not need to go to a classroom to stay up-to-date with what is happening. You can get information online. The data scientists also share their knowledge in different forums or platforms, thereby providing invaluable resources to fellow practitioners.

  • Knowledge of Domains

One of the critical steps data scientists take is to understand precisely what it is they are working with. If, for example, they are working in the agricultural field, they have to follow the industry to understand any data they collect. It would be unreasonable to expect the scientist to give useful insights and analysis without understanding the industry.

Domain knowledge is, therefore, a critical element of data science. With proper understanding, we can expect a better output from the scientists. Those in the industry can then apply the findings within their relevant areas for better productivity.

  • Cheat Sheets Hacks

Data Science is not a simple field, and you get to learn so much every day. Unless you have one of those super memories, it will be hard to remember everything. That is why data scientists have cheat sheets. There are many such cheat sheets online for anyone who needs one.

Final Thoughts

Data science continues to gain relevance in different fields, and it will continue to grow due to the demand from various industries. It is already very critical in areas such as health care, fraud detection, and agriculture, to name a few. The most vital data security hack for a data scientist is the Installation of an SSL certificate. It will protect from hackers while on the internet. It would be a pity to lose all the data to cybercriminals because of a hack that is simple to install and inexpensive.

Simple RNN

Prerequisites for understanding RNN at a more mathematical level

Writing the A gentle introduction to the tiresome part of understanding RNN Article Series on recurrent neural network (RNN) is nothing like a creative or ingenious idea. It is quite an ordinary topic. But still I am going to write my own new article on this ordinary topic because I have been frustrated by lack of sufficient explanations on RNN for slow learners like me.

I think many of readers of articles on this website at least know that RNN is a type of neural network used for AI tasks, such as time series prediction, machine translation, and voice recognition. But if you do not understand how RNNs work, especially during its back propagation, this blog series is for you.

After reading this articles series, I think you will be able to understand RNN in more mathematical and abstract ways. But in case some of the readers are allergic or intolerant to mathematics, I tried to use as little mathematics as possible.

Ideal prerequisite knowledge:

  • Some understanding on densely connected layers (or fully connected layers, multilayer perception) and how their forward/back propagation work.
  •  Some understanding on structure of Convolutional Neural Network.

*In this article “Densely Connected Layers” is written as “DCL,” and “Convolutional Neural Network” as “CNN.”

1, Difficulty of Understanding RNN

I bet a part of difficulty of understanding RNN comes from the variety of its structures. If you search “recurrent neural network” on Google Image or something, you will see what I mean. But that cannot be helped because RNN enables a variety of tasks.

Another major difficulty of understanding RNN is understanding its back propagation algorithm. I think some of you found it hard to understand chain rules in calculating back propagation of densely connected layers, where you have to make the most of linear algebra. And I have to say backprop of RNN, especially LSTM, is a monster of chain rules. I am planing to upload not only a blog post on RNN backprop, but also a presentation slides with animations to make it more understandable, in some external links.

In order to avoid such confusions, I am going to introduce a very simplified type of RNN, which I call a “simple RNN.” The RNN displayed as the head image of this article is a simple RNN.

2, How Neurons are Connected

How to connect neurons and how to activate them is what neural networks are all about. Structures of those neurons are easy to grasp as long as that is about DCL or CNN. But when it comes to the structure of RNN, many study materials try to avoid showing that RNNs are also connections of neurons, as well as DCL or CNN(*If you are not sure how neurons are connected in CNN, this link should be helpful. Draw a random digit in the square at the corner.). In fact the structure of RNN is also the same, and as long as it is a simple RNN, and it is not hard to visualize its structure.

Even though RNN is also connections of neurons, usually most RNN charts are simplified, using blackboxes. In case of simple RNN, most study material would display it as the chart below.

But that also cannot be helped because fancier RNN have more complicated connections of neurons, and there are no longer advantages of displaying RNN as connections of neurons, and you would need to understand RNN in more abstract way, I mean, as you see in most of textbooks.

I am going to explain details of simple RNN in the next article of this series.

3, Neural Networks as Mappings

If you still think that neural networks are something like magical spider webs or models of brain tissues, forget that. They are just ordinary mappings.

If you have been allergic to mathematics in your life, you might have never heard of the word “mapping.” If so, at least please keep it in mind that the equation y=f(x), which most people would have seen in compulsory education, is a part of mapping. If you get a value x, you get a value y corresponding to the x.

But in case of deep learning, x is a vector or a tensor, and it is denoted in bold like \boldsymbol{x} . If you have never studied linear algebra , imagine that a vector is a column of Excel data (only one column), a matrix is a sheet of Excel data (with some rows and columns), and a tensor is some sheets of Excel data (each sheet does not necessarily contain only one column.)

CNNs are mainly used for image processing, so their inputs are usually image data. Image data are in many cases (3, hight, width) tensors because usually an image has red, blue, green channels, and the image in each channel can be expressed as a height*width matrix (the “height” and the “width” are number of pixels, so they are discrete numbers).

The convolutional part of CNN (which I call “feature extraction part”) maps the tensors to a vector, and the last part is usually DCL, which works as classifier/regressor. At the end of the feature extraction part, you get a vector. I call it a “semantic vector” because the vector has information of “meaning” of the input image. In this link you can see maps of pictures plotted depending on the semantic vector. You can see that even if the pictures are not necessarily close pixelwise, they are close in terms of the “meanings” of the images.

In the example of a dog/cat classifier introduced by François Chollet, the developer of Keras, the CNN maps (3, 150, 150) tensors to 2-dimensional vectors, (1, 0) or (0, 1) for (dog, cat).

Wrapping up the points above, at least you should keep two points in mind: first, DCL is a classifier or a regressor, and CNN is a feature extractor used for image processing. And another important thing is, feature extraction parts of CNNs map images to vectors which are more related to the “meaning” of the image.

Importantly, I would like you to understand RNN this way. An RNN is also just a mapping.

*I recommend you to at least take a look at the beautiful pictures in this link. These pictures give you some insight into how CNN perceive images.

4, Problems of DCL and CNN, and needs for RNN

Taking an example of RNN task should be helpful for this topic. Probably machine translation is the most famous application of RNN, and it is also a good example of showing why DCL and CNN are not proper for some tasks. Its algorithms is out of the scope of this article series, but it would give you a good insight of some features of RNN. I prepared three sentences in German, English, and Japanese, which have the same meaning. Assume that each sentence is divided into some parts as shown below and that each vector corresponds to each part. In machine translation we want to convert a set of the vectors into another set of vectors.

Then let’s see why DCL and CNN are not proper for such task.

  • The input size is fixed: In case of the dog/cat classifier I have mentioned, even though the sizes of the input images varies, they were first molded into (3, 150, 150) tensors. But in machine translation, usually the length of the input is supposed to be flexible.
  • The order of inputs does not mater: In case of the dog/cat classifier the last section, even if the input is “cat,” “cat,” “dog” or “dog,” “cat,” “cat” there’s no difference. And in case of DCL, the network is symmetric, so even if you shuffle inputs, as long as you shuffle all of the input data in the same way, the DCL give out the same outcome . And if you have learned at least one foreign language, it is easy to imagine that the orders of vectors in sequence data matter in machine translation.

*It is said English language has phrase structure grammar, on the other hand Japanese language has dependency grammar. In English, the orders of words are important, but in Japanese as long as the particles and conjugations are correct, the orders of words are very flexible. In my impression, German grammar is between them. As long as you put the verb at the second position and the cases of the words are correct, the orders are also relatively flexible.

5, Sequence Data

We can say DCL and CNN are not useful when you want to process sequence data. Sequence data are a type of data which are lists of vectors. And importantly, the orders of the vectors matter. The number of vectors in sequence data is usually called time steps. A simple example of sequence data is meteorological data measured at a spot every ten minutes, for instance temperature, air pressure, wind velocity, humidity. In this case the data is recorded as 4-dimensional vector every ten minutes.

But this “time step” does not necessarily mean “time.” In case of natural language processing (including machine translation), which you I mentioned in the last section, the numberings of each vector denoting each part of sentences are “time steps.”

And RNNs are mappings from a sequence data to another sequence data.

In case of the machine translation above, the each sentence in German, English, and German is expressed as sequence data \boldsymbol{G}=(\boldsymbol{g}_1,\dots ,\boldsymbol{g}_{12}), \boldsymbol{E}=(\boldsymbol{e}_1,\dots ,\boldsymbol{e}_{11}), \boldsymbol{J}=(\boldsymbol{j}_1,\dots ,\boldsymbol{j}_{14}), and machine translation is nothing but mappings between these sequence data.

 

*At least I found a paper on the RNN’s capability of universal approximation on many-to-one RNN task. But I have not found any papers on universal approximation of many-to-many RNN tasks. Please let me know if you find any clue on whether such approximation is possible. I am desperate to know that. 

6, Types of RNN Tasks

RNN tasks can be classified into some types depending on the lengths of input/output sequences (the “length” means the times steps of input/output sequence data).

If you want to predict the temperature in 24 hours, based on several time series data points in the last 96 hours, the task is many-to-one. If you sample data every ten minutes, the input size is 96*6=574 (the input data is a list of 574 vectors), and the output size is 1 (which is a value of temperature). Another example of many-to-one task is sentiment classification. If you want to judge whether a post on SNS is positive or negative, the input size is very flexible (the length of the post varies.) But the output size is one, which is (1, 0) or (0, 1), which denotes (positive, negative).

*The charts in this section are simplified model of RNN used for each task. Please keep it in mind that they are not 100% correct, but I tried to make them as exact as possible compared to those in other study materials.

Music/text generation can be one-to-many tasks. If you give the first sound/word you can generate a phrase.

Next, let’s look at many-to-many tasks. Machine translation and voice recognition are likely to be major examples of many-to-many tasks, but here name entity recognition seems to be a proper choice. Name entity recognition is task of finding proper noun in a sentence . For example if you got two sentences “He said, ‘Teddy bears on sale!’ ” and ‘He said, “Teddy Roosevelt was a great president!” ‘ judging whether the “Teddy” is a proper noun or a normal noun is name entity recognition.

Machine translation and voice recognition, which are more popular, are also many-to-many tasks, but they use more sophisticated models. In case of machine translation, the inputs are sentences in the original language, and the outputs are sentences in another language. When it comes to voice recognition, the input is data of air pressure at several time steps, and the output is the recognized word or sentence. Again, these are out of the scope of this article but I would like to introduce the models briefly.

Machine translation uses a type of RNN named sequence-to-sequence model (which is often called seq2seq model). This model is also very important for other natural language processes tasks in general, such as text summarization. A seq2seq model is divided into the encoder part and the decoder part. The encoder gives out a hidden state vector and it used as the input of the decoder part. And decoder part generates texts, using the output of the last time step as the input of next time step.

Voice recognition is also a famous application of RNN, but it also needs a special type of RNN.

*To be honest, I don’t know what is the state-of-the-art voice recognition algorithm. The example in this article is a combination of RNN and a collapsing function made using Connectionist Temporal Classification (CTC). In this model, the output of RNN is much longer than the recorded words or sentences, so a collapsing function reduces the output into next output with normal length.

You might have noticed that RNNs in the charts above are connected in both directions. Depending on the RNN tasks you need such bidirectional RNNs.  I think it is also easy to imagine that such networks are necessary. Again, machine translation is a good example.

And interestingly, image captioning, which enables a computer to describe a picture, is one-to-many-task. As the output is a sentence, it is easy to imagine that the output is “many.” If it is a one-to-many task, the input is supposed to be a vector.

Where does the input come from? I mentioned that the last some layers in of CNN are closely connected to how CNNs extract meanings of pictures. Surprisingly such vectors, which I call a “semantic vectors” is the inputs of image captioning task (after some transformations, depending on the network models).

I think this articles includes major things you need to know as prerequisites when you want to understand RNN at more mathematical level. In the next article, I would like to explain the structure of a simple RNN, and how it forward propagate.

* I make study materials on machine learning, sponsored by DATANOMIQ. I do my best to make my content as straightforward but as precise as possible. I include all of my reference sources. If you notice any mistakes in my materials, please let me know (email: yasuto.tamura@datanomiq.de). And if you have any advice for making my materials more understandable to learners, I would appreciate hearing it.