Warum jedes Unternehmen Data Science nutzen sollte

In der heutigen datengetriebenen Welt kann der effektive Einsatz von Data Science den Unterschied zwischen dem Wachstum und Erfolg eines Unternehmens und seinem Scheitern bedeuten. Hier sind fünf Hauptgründe, warum jedes Unternehmen, unabhängig von seiner Größe und Branche, Data Science einsetzen sollte.

  1. Effektive Nutzung Ihrer Daten

Jedes Unternehmen erzeugt eine enorme Menge an Daten. Diese Daten können Informationen über Kunden, interne Prozesse, den Markt und vieles mehr enthalten. Durch den Einsatz von Data Science können Sie diese Daten nutzen und deren volles Potenzial ausschöpfen. Daten, die sorgfältig analysiert und interpretiert werden, können einen erheblichen Wert darstellen und Ihnen helfen, informierte Geschäftsentscheidungen zu treffen, die Leistung zu steigern und den Umsatz zu erhöhen.

  1. Visualisierung Ihrer Daten

Die Visualisierung von Daten ist ein mächtiges Werkzeug, um komplexe Informationen leicht verständlich und zugänglich zu machen. Mit Data Science können Sie Ihre eigenen Dashboards erstellen und Bibliotheken wie Flexdashboard, plotly, ggplotly und shiny in R verwenden, um Ihre Daten zu visualisieren. Diese Visualisierungen können dazu beitragen, Trends, Muster und Einsichten zu identifizieren, die sonst leicht übersehen werden könnten.

  1. Schnelle Analyse und Reaktion

Ein Data Scientist in Ihrem Team ermöglicht es Ihnen, Ihre Daten schnell zu analysieren und auf interessante Erkenntnisse zu reagieren. Data Science kann Ihnen helfen, schnell auf Veränderungen in Ihrem Geschäftsumfeld zu reagieren, neue Chancen zu erkennen und potenzielle Risiken zu identifizieren. In der heutigen schnelllebigen Geschäftswelt kann die Fähigkeit, schnell und fundiert zu handeln, einen bedeutenden Wettbewerbsvorteil darstellen.

  1. Einsatz von Machine Learning und neuronalen Netzen

Data Science öffnet die Tür für den Einsatz von Machine Learning und neuronalen Netzen in Ihrem Unternehmen. Diese fortschrittlichen Technologien können Ihnen helfen, komplexe Muster in Ihren Daten zu erkennen, Vorhersagen zu treffen und sogar automatisierte Entscheidungsprozesse zu erstellen. Mit Machine Learning und neuronalen Netzen können Sie Ihre Geschäftsprozesse optimieren und Ihre Effizienz und Produktivität steigern.

  1. Zeitreihenanalyse und Prognose

Schließlich ermöglicht Ihnen Data Science die Durchführung von Zeitreihenanalysen und Prognosen. Mit der FPP3-Bibliothek in R können Sie zum Beispiel historische Daten analysieren, um zukünftige Trends und Muster vorherzusagen. Dies kann besonders wertvoll sein, wenn Sie die Nachfrage nach Ihren Produkten oder Dienstleistungen prognostizieren, die zukünftige Marktentwicklung einschätzen oder strategische Geschäftsentscheidungen treffen möchten.

Zusammenfassend lässt sich sagen, dass Data Science nicht nur ein nettes Extra, sondern ein entscheidender Faktor für den Erfolg Ihres Unternehmens sein kann. Indem Sie Data Science in Ihre Geschäftsstrategie integrieren, können Sie Ihre Daten effektiv nutzen, besser informierte Entscheidungen

Holt Winter Forecast für die Produktionsplanung

Wir möchte heute ein Dashboard vorstellen, welches wir bei bestimmten Produktgruppen zum Zwecke der längerfristigen Produktionsplanung mit sehr großem Erfolg einsetzen.

Es handelt sich um ein Forecasting Dashboard, welches den Holt Winter Algorithmus verwendet, um Fertigungen 12 Monate rollierend planen zu können.

Forecast Dashboard

Der Holt Winter Algorithmus eignet sich in vielen Fällen bei Produkten die in Ihrer Zeitreihe starke Trends haben (aufwärts wie abwärts) und eine nicht zu vernachlässigende Saisonalität.

Den Link zum Dashboard finden Sie hier:

Don’t Push your Suppliers, Pull Them!

When changing Material Requirements Planning into DDMRP (Demand Driven Material Requirements Planning) you will come closer to achieve the Flow and Pull principals of lean.

Through DDMRP your orders are more aligned with the actual demands of your customers. We analyzed the delivery performance of our customer before and after the implementation of DDMRP.

The results are very convincing:

Supplier Lead times were drastically improved

On-Hand Inventory Levels were decreased – tied-up capital was decreased significantly

Defects are detected earlier and not hidden in piles of inventory

and more…

Thanks to data science / data visualization capabilities (R, shiny, flexdashboard) we are able to show and track the improvements.

You can find an interactive version of the dashboard here:

Advantages of using R and Python

There are many reasons why using R or Python has advantages over using MS Excel:

  1. It’s free
  2. It’s open source (with a huge active community!)
  3. R and Python have more data manipulation capabilities
  4. Both R and Python support larger data sets / Big Data applications
  5. You can automate your workflows
  6. Code is easily reproducible and scalable
  7. State of the art statistics and graphics capabilities
  8. Thousands  of libraries are available for specialized tasks
  9. You can do machine learning; build neural networks and use applications in the field of A.I.
  10. You can build interactive dashboards and share them online
  11. You don’t need any support from your IT/ERP Team to roll out BI Tools
  12.  You will improve your position in the job market by enhancing your capabilities in the use of data driven / analytical decision making

A disadvantage of learning R or Python (or both!), could be the steep learning curve. Nowadays, this can be considered a minor problem. Many world class online courses are available for learning data science and the associated programming languages. Sites like datacamp, udemy, udacity, edx or coursera (just for naming a few prominent ones) enable you to learn R and Python anywhere at any time.

Our experience is, that people can start using R proficiently after about 3 months, practicing 1 to 2 hours per day. We are not saying that they will become a fully proficient programmer or data scientist in that time, but it will be enough training time to start adding value to your organization. We found that people who have a strong background in quality management (e.g.: six sigma, TQM), often have a strong foundation in statistical theory, which helps when learning data science.

What surprised us a bit was the fact, that trained mathematicians and people who came from a computer science background had problems applying the tools to real world problems. They lacked intrinsic knowledge about the problems an organization faces. They could not fully grasp the business problems and implement solutions based on data science frameworks which improved the processes or added more value to the business. We think it is best to form a cross functional team of experts from all parts of the organization that face the current problem. It is best to have somebody understand the business problem and somebody who can code a solution for that problem. In our opinion, a good data scientist has to understand the problem first by talking to the people who face the challenge. Only after the problem has been fully understood, a solution should be worked on. If you have somebody who both has knowledge of the business problem and understands data science, you will have a very valuable asset.

After you understand the basics of R or Python, it is like getting into a formula one car instead of your old excel street car. The additional capabilities that data science software packages offer are staggering. Up to this date, we have not met a single person who went back to excel for advanced data analysis or statistical problem solving. It is also worth mentioning, that the visualization capabilities R offers, with the ggplot2 package, are second to none.

A word of warning! To become an expert in the field of Data Science, it is more realistic to think in years of training and not months. The body of knowledge in this field is vast and complex. It can take many years to become truly proficient! Becoming a data science professional is a lifelong journey of learning. This is also based on the fact, that this field is constantly developing and improving (e.g.: A.I., Big Data, Neural Networks, etc.).

Self Organizing Maps

Im folgenden Beispiel setzen wir uns mit Self Organizing Maps (SOM) auseinander.

Self Organinzing Maps sind sehr einfache Künstliche Neuronale Netze. Sie sind in der Lage komplexe, nicht lineare Zusammenhänge, in eine einfache geometrische Beziehungen darzustellen.

Wir werden für unsere Beispiel MiniSom verwenden. Dank dieser Anwednung lassen sich SOM relativ leicht erstellen. Dank gilt an dieser Stelle an Giuseppe Vettigli, da nach meinem Wissen der Entwickler von MiniSom ist. Seine Github Seite ist hier: https://github.com/JustGlowing/minisom

Zu Beginn werden wir die notwendigen Bibliotheken und Daten laden. Wir werden für unser Beispiel den gapminder Datensatz verwenden, den wir etwas anpassen werden. Diese Beispiel wurde in Python programmiert.

#Install gapminder Dataset
pip install gapminder
from gapminder import gapminder
gapminder.head()
export = gapminder.to_excel(r"gapminder.xlsx")

#Install MiniSom
pip install minisom 

Wenn man den oben genannten Code laufen lässt hat man den gapminder Datensatz jetzt zur Verfügung und man hat MiniSom installiert. Darüber hinaus hat man den gapminder Datensatz jetzt auch als Excel Datei vorliegen, was man aber nicht unbedingt braucht – jetzt hat man aber auch Code gelernt, der zeigt wie man etwas nach Excel exportieren kann.

Wir laden jetzt die Bibliotheken. Es handel sich hier um die Bibliotheken das fast immer bei Data Science Anwendungen in Python geladen werden. NumPy für scientific computing. pandas zum arbeiten und manipulieren von Daten und Matplotlib zur Datenvisualisierung.

#Import Libraries
Import Libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

Jetzt werden jetzt die gapminder Daten verändern, um Sie in eine Form zu bringen, die es uns erlaubt eine SOM zu berechnen.

#Wrangle with gapminder 
dataset = gapminder dataset.head() 
dataset = gapminder.groupby("country")["lifeExp","pop","gdpPercap"].mean() dataset.loc[dataset["lifeExp"] < 70, "Nice_Place"] = 0 dataset.loc[dataset["lifeExp"] > 70, "Nice_Place"] = 1     dataset["Nice_Place"] = dataset["Nice_Place"].astype(int) dataset.head(n=20) 
X = dataset.iloc[:,0:3] 
y = dataset.iloc[:,3]

Durch den Code von oben ist folgendes passiert. Wir haben uns den gapminder Datensatz angesehen und folgendes bemerkt:

   country           continent  year  lifeExp   pop      gdpPercap
 0  Afghanistan      Asia       1952   28.801   8425333  779.445314
 1  Afghanistan      Asia       1957   30.332   9240934  820.853030
 2  Afghanistan      Asia       1962   31.997  10267083  853.100710
 3  Afghanistan      Asia       1967   34.020  11537966  836.197138
 4  Afghanistan      Asia       1972   36.088  13079460  739.981106

Es ist die jährliche Veränderung der jeweiligen Länder in den Bereichen lifeExp (Lebenserwartung), pop (Population) und gdpPercap (Pro-Kopf Einkommen) aufgelistet. Für unsere SOM benötigen wir aber Durchschnittswerte pro Land. Wir haben dazu die Länder gruppiert und die Durchschnittswerte der einzelnen variablen berechnen lassen. Als nächste wurde eine weitere Spalte in die Tabelle eingefügt um zu erkennen, welche Länder eine Lebenserwartung von über, bzw. unter 70 Jahren haben. Ich habe diese Spalte als „Nice_Place“ bezeichnet, da die Länder mit einer hohen Lebenserwartung vermutlich eine bessere Lebenssituation für deren Einwohner bieten.

„Nice_Pace“ wurde dann noch von float in integer umgewandelt, was auch notwendig zur Erstellung der SOM ist. Als letztes wurden die Daten noch in X (explanatory variable) und y (response variable) eingeteilt. Diese Einteilung ist bei fast allen K.I. / maschinellen Anwendungen notwendig.

Als nächstes werden die Daten skaliert.

#Feature Scaling gapminder
from sklearn.preprocessing import MinMaxScaler
sc = MinMaxScaler(feature_range = (0,1))
X = sc.fit_transform(X)

Jetzt kann die SOM erstellt bzw. trainiert werden.

#Training the SOM gapminder
from minisom import MiniSom
som = MiniSom(x =14 , y =14 , input_len = 3, sigma = 1.0, 
              learning_rate = 0.5 ) 
som.random_weights_init(X)
som.train_random(data = X , num_iteration = 1000)

Als nächstes folgt der Code zur visuellen Darstellung der Ergebnisse.

#Visualize the Results gapminder
from pylab import bone, pcolor, colorbar, plot, show
bone()
pcolor(som.distance_map().T)
colorbar()
markers = ["o","s"]
colors = ["r","g"]
for i, x in enumerate(X):
    w = som.winner(x)
    plot(w[0] + 0.5,
         w[1] + 0.5,
         markers[y[i]],
         markeredgecolor = colors[y[i]],
         markerfacecolor = "None",
         markersize = 10,
         markeredgewidth = 2)
show()

Man erkennt, dass Länder mit einer Lebenserwartung von über 70 Jahren (grüne Vierecke) alle vom neuronalen netz, nahe beieinander angeordnet wurden. Sie sind also ähnlich. Das Land bei X = 6 und Y = 0 ist übrigens Kuwait. Es ist nahe an den Ländern mit einer hohen Lebenserwartung. Die Erklärung ist folgende: Kuwait hat ein relativ hohes Pro Kopf Einkommen (65332,91) – was sicherlich westlicher Standard ist, allerdings liegt die Lebenserwartung bei 68,9 Jahren. In diesem Land scheint man reich zu sein aber früh zu sterben. Man muss aber bedenken, dass es sich hier um Durchschnittswerte handelt. Man könnte hier z.B. die Hypothese erstellen, dass es sich um ein Land handelt mit einer relativ kleinen Elite von super reichen und vielen armen normal Bürger.

Hierarchische Clusteranalyse

In diesem Artikel möchten wir die Hierarchische Clusteranalyse vorstellen.

Ist gibt zwei grundsätzliche Verfahren für die Hierarchische Clusteranalyse. Man nennt sie Top-Down und Bottom-Up Verfahren.

Die Top-Down Verfahren werden als divisive Cluster-verfahren bezeichnet. Im englischen Sprachgebrauch wird hierfür gerne die Abkürzung DIANA verwendet. Sie steht für Divise Analysis.

Wir steigen gleich ein, indem wir die notwendigen Bibliotheken laden:

library(tidyverse)  # data manipulation
library(cluster)    # clustering algorithms
library(factoextra) # clustering visualization
library(gapminder)

Verwendet wird in unserem Beispiel der gapminder Datensatz. Wir haben diesen bereits mit library(gapminder) geladen.

Betrachten wir den Datensatz mit der funktion head().

head()
A tibble: 6 x 6
 country        continent  year   lifeExp  pop        gdpPercap
                           
 1 Afghanistan  Asia       1952    28.8    8425333      779.
 2 Afghanistan  Asia       1957    30.3    9240934      821.
 3 Afghanistan  Asia       1962    32.0   10267083      853.
 4 Afghanistan  Asia       1967    34.0   11537966      836.
 5 Afghanistan  Asia       1972    36.1   13079460      740.
 6 Afghanistan  Asia       1977    38.4   14880372      786.

Der gapminder Datensatz zeigt die Entwicklungen der einzelnen Länder pro Jahr. Da wir Länder untereinander vergleichen möchten, werden wir mit Durchschnittswerten arbeiten. Diese erzeugen wir mit folgenden Code:

df <- gapminder %>% 
   group_by(country) %>%
   summarise(lifeExp_mean = mean(lifeExp), 
   pop_mean = mean(pop),      
   gdpPercap_mean = mean(gdpPercap)) %>%
   filter(lifeExp_mean < 50) %>% 
   na.omit()

head(df)

A tibble: 6 x 4
 country               lifeExp_mean  pop_mean         gdpPercap_mean
                                
 1 Afghanistan         37.5           15823715.           803.
 2 Albania             68.4            2580249.          3255.
 3 Algeria             59.0           19875406.          4426.
 4 Angola              37.9            7309390.          3607.
 5 Argentina           69.1           28602240.          8956.
 6 Australia           74.7           14649312.         19981.

Mit den nächsten Schritten werden wir die Daten anpassen, damit man eine Hierarchische Clusteranalyse durchführen kann. Zu Beginn werden wir die erste Spalte umwandeln, damit diese als Reihen namen erkannt wird.

df <-  column_to_rownames(df,"country")
 head(df)

                 lifeExp_mean      pop_mean            gdpPercap_mean
 Afghanistan     37.47883           15823715       802.6746
 Albania         68.43292            2580249      3255.3666
 Algeria         59.03017           19875406      4426.0260
 Angola          37.88350            7309390      3607.1005
 Argentina       69.06042           28602240      8955.5538
 Australia       74.66292           14649313     19980.5956

Danach folgt die Skalierung/Standardisierung der Daten mit scale().

df <- scale(df)
d <- dist(df, method = "euclidean")
head(d)

Nachdem die Skalierung / Standardisierung abgeschlossen ist, werden die Daten auf Unterschiede untersucht, bzw. es wird eine Distanzmatrix erstellt. Wir verwenden in unserem Beispiel den häufig verwendeten euklidischen Abstand. Wir haben die dist() funktion bereits oben ausgeführt.

Die Distanzmatrix lässt sich auch bildlich darstellen. Wir verwenden dazu folgende Code:

fviz_dist(d, gradient = list(low = "white", mid = "blue", high = "red"))

Dadurch erhält man folgende Distanzmatrix als Bild:

Jetzt führen wir die Berechnung der Cluster durch. Dazu verwenden wir die „complete“ Methode.

hc1 <- hclust(d, method = "complete" )
plot(hc1, cex = 0.6, hang = -1)
rect.hclust(hc1, k = 4, border = 2:6)

Mit der Funktion rect.hclust() haben wir die Cluster noch farblich in Quadrate eingeteilt.

Eine weitere Möglichkeit ist der Verwendung des factoextra Packetes. Wie führen den folgenden Code aus um das Paket zu verwenden:

hc.cut <- hcut(d, k = 4, hc_method = "complete")
fviz_dend(hc.cut, show_labels = TRUE, rect = TRUE)
fviz_cluster(data=d,hc.cut, frame.type = "convex")

Erstell wird dadurch ein weiteres Dendrogramm und ein weitere Darstellung der Cluster.

Bedeutet mehr Geld auch ein längeres Leben?

Die Zusammenhänge lassen sich graphisch durch eine Korrelationsmatrix oder Streudiagramm darstellen.

Wir verwenden hier das corrgram package.

Bevor man eine Regression erstellt, ist es oft sinnvoll zu analysieren, wie die unabhängigen und abhängigen Variablen zueinander in Beziehung stehen.

Zu Beginn werden wir die Libraries laden und auch den Datensatz mit welchem wir arbeiten möchten:

library(gapminder)
library(tidyverse) # Das Schweizer Messer für Daten Manipulation
library(corrgram)

Nachdem man corrgram geladen hat, kann man mit der funktion cor() bereits eine erste Korrelationsmatrix erstellen. Wir verwenden als Beispiel den berühmt, berüchtigten mtcars Datensatz. Dieser ist bei jeder R installation bereits integriert.

options(digits = 2)
cor(mtcars)

  mpg   cyl  disp    hp   drat    wt   qsec    vs     am  gear   carb
 mpg   1.00 -0.85 -0.85 -0.78  0.681 -0.87  0.419  0.66  0.600  0.48 -0.551
 cyl  -0.85  1.00  0.90  0.83 -0.700  0.78 -0.591 -0.81 -0.523 -0.49  0.527
 disp -0.85  0.90  1.00  0.79 -0.710  0.89 -0.434 -0.71 -0.591 -0.56  0.395
 hp   -0.78  0.83  0.79  1.00 -0.449  0.66 -0.708 -0.72 -0.243 -0.13  0.750
 drat  0.68 -0.70 -0.71 -0.45  1.000 -0.71  0.091  0.44  0.713  0.70 -0.091
 wt   -0.87  0.78  0.89  0.66 -0.712  1.00 -0.175 -0.55 -0.692 -0.58  0.428
 qsec  0.42 -0.59 -0.43 -0.71  0.091 -0.17  1.000  0.74 -0.230 -0.21 -0.656
 vs    0.66 -0.81 -0.71 -0.72  0.440 -0.55  0.745  1.00  0.168  0.21 -0.570
 am    0.60 -0.52 -0.59 -0.24  0.713 -0.69 -0.230  0.17  1.000  0.79  0.058
 gear  0.48 -0.49 -0.56 -0.13  0.700 -0.58 -0.213  0.21  0.794  1.00  0.274
 carb -0.55  0.53  0.39  0.75 -0.091  0.43 -0.656 -0.57  0.058  0.27  1.000
 

Wir haben mit der Funktion options(digits=2) die nachkommastellen auf 2 reduziert. Dies hilft für eine bessere Darstellung der Daten. Man sieht das die Korrelationsmatrix ein sehr mächtiges Tool ist, aber den Nachteil hat, dass größere Datensätze schnell unübersichtlich werden können!

Deshalb ist es immer sinnvoll die Abhängigkeiten visuell darzustellen.

Wir werden jetzt zum gapminder Datensatz wechseln. Es ist wichtig das alle Daten welche für die Korrelationsmatrix verwendet werden, numerich sind. Eine Überprüfung des gapminder Datensatzes zeigt ein Problem

str(gapminder)

Classes ‘tbl_df’, ‘tbl’ and 'data.frame':    1704 obs. of  6 variables:
  $ country  : Factor w/ 142 levels "Afghanistan",..: 1 1 1 1 1 1 1 1 1 1 …
  $ continent: Factor w/ 5 levels "Africa","Americas",..: 3 3 3 3 3 3 3 3 3
  $ year     : int  1952 1957 1962 1967 1972 1977 1982 1987 1992 1997 …
  $ lifeExp  : num  28.8 30.3 32 34 36.1 …
  $ pop      : int  
  $ gdpPercap: num  779 821 853 836 740 …

Es befinden sich die Datentypen „Factor“ im Datensatz. Diese müssen aus dem Datensatz entfernt werden. Als erstes möchten wir aber auch die Durchschnittswerte von lifeExp und gdpPercap per Land ermitteln.

data_grouped <- gapminder %>% 
   group_by(country) %>% 
   summarise(lifeExp_mean = mean(lifeExp),
             gdpPercap_mean = mean (gdpPercap),
             pop_mean = mean(pop))

Durch den Einsatz von tidyverse tools konnte wir die Durchschnittwerte der Lebenswertung und Einkommen pro Land ermitteln. Die Daten sind jetzt pro Land. Nach überprüfen haben wir das Factor Problem aber noch nicht gelöst:

head(data_grouped)

A tibble: 6 x 4
 country     lifeExp_mean gdpPercap_mean  pop_mean
                                
 1 Afghanistan         37.5           803. 15823715.
 2 Albania             68.4          3255.  2580249.
 3 Algeria             59.0          4426. 19875406.
 4 Angola              37.9          3607.  7309390.
 5 Argentina           69.1          8956. 28602240.
 6 Australia           74.7         19981. 14649312.

str(data_grouped)

Classes ‘tbl_df’, ‘tbl’ and 'data.frame':    142 obs. of  4 variables:
  $ country       : Factor w/ 142 levels "Afghanistan",..: 1 2 3 4 5 6 7 8 
  $ lifeExp_mean  : num  37.5 68.4 59 37.9 69.1 …
  $ gdpPercap_mean: num  803 3255 4426 3607 8956 …
  $ pop_mean      : num  15823715 2580249 19875406 7309390 28602240 …

Der Lösungsansatz ist die column_to_rownames Funktion. Diese Funktion sollte sich gerade neue R user gut merken, da Sie viele Stunden suche auf stackoverflow ersparen kann!

data_grouped <- column_to_rownames(data_grouped,"country")
head(data_grouped)

              lifeExp_mean gdpPercap_mean pop_mean
 Afghanistan           37            803  1.6e+07
 Albania               68           3255  2.6e+06
 Algeria               59           4426  2.0e+07
 Angola                38           3607  7.3e+06
 Argentina             69           8956  2.9e+07
 Australia             75          19981  1.5e+07

str(data_grouped)

'data.frame':    142 obs. of  3 variables:
  $ lifeExp_mean  : num  37.5 68.4 59 37.9 69.1 …
  $ gdpPercap_mean: num  803 3255 4426 3607 8956 …
  $ pop_mean      : num  15823715 2580249 19875406 7309390 28602240 …

Nach Überprüfung mit der Funktion str() erkennt man, dass die Daten jetzt im Format „data.frame“ sind und nur aus numerischen Daten bestehen.

Die informationen über die Länder sind aber noch enthalten, auch wenn diese mit str() nicht angezeigt werden. Mit head() lassen sich die Länder mit abrufen.

Jetzt können wir die Korrelationsmatrix aufrufen.

cor(data_grouped)

                lifeExp_mean gdpPercap_mean pop_mean
 lifeExp_mean          1.000          0.675    0.021
 gdpPercap_mean        0.675          1.000   -0.047
 pop_mean              0.021         -0.047    1.000

Aus der Tabelle lassen sich eine Abhängigkeit zwischen gdpPercap_mean und lifeExp_mean erkennen. Höheres BIP pro Kopf (Gross Domestic Product per capita) trägt zu einer höheren Lebenserwartung (Liefe Expectancy) bei!

Jetzt erstellen wir eine visuelle Korrelationsmatrix mit Hilfe von corrgram.

corrgram(data_grouped, order=TRUE, lower.panel=panel.pts,
          upper.panel=panel.pie, text.panel=panel.txt,
          main="Correlogram gapminder")

Wir haben durch die Verwendung des von uns weiter vereinfachten gapminder datensatz einen Datensatz erschaffen, bei dem die stärken der Visualisierung nicht unbedingt gezeigt werden (erkennen von Muster in komplexen Datensätze). Deshalb folgt unten noch ein Beispiel mit dem mtcars Datensatz. Hier sind die Vorteile einer Visualisierung schnell zu erkennen.

corrgram(mtcars, order=TRUE, lower.panel=panel.conf,
          upper.panel=panel.bar, text.panel=panel.txt,
          main="Correlogram mtcars")

Anbei folgen Beispiele einer Streudiagramm Matrix (Scatterplot Matrix, oft auch als „SPLOM“ bezeichnet). Bitte klicken Sie auf die Bilder für eine größere Darstellung:

SPLOM mit numerischer Darstellung und Density Plots (Dichtediagramm):

Ebenso eine weiter Darstellung der Korrelationen in einer visuell einfacheren Art und Weise.

Als letzte noch ein Beispiel einer SPLOM um weitere Darstellungsmöglichkeiten aufzuzeigen.

DataCamping the Ultralearner Way

In this article, I will show you how the teaching methods of DataCamp can be combined with the principals of ultralearning, to make you a more successful data scientist.

First, it is necessary to define what is meant by „ultralearning“. Ultralearning is a term made popular by the book with the same title, written by Scott H. Young. In his book, Scott Young describes 9 principles to define what ultralearning is and what learning strategies an ultralearner uses.

The 9 principals described by Scott Young are the following:

  1. Metalearning – Learn how to learn
  2. Focus – Sharpen your ability to learn
  3. Directness – Go Straight Ahead
  4. Drill – Attack Your Weakest Point
  5. Retrieval – Test to Learn
  6. Feedback – Don’t Dodge the Punches
  7. Retention – Don’t Fill a Leaky Bucket
  8. Intuition – Dig Deep Before Building Up
  9. Experimentation – Explore Outside Your Comfort Zone

Below I will describe the 9 principals of ultralearning in a nutshell and how you can use them when you are learning data science on DataCamp. If you are interested in gaining further insight into what ultralearning is, I recommend to read the book. If you don’t know what DataCamp is, please check out the site here: www.datacamp.com

Metalearning

This is where you find out how to learn the subject you want to master. It is suggested to spend about 10 percent of your time you want to put into your learning project, on preparing how you will learn. Typical questions to ask yourself are: What are the typical ways to learn this subject or skill?  What kind of concepts, principals and facts should I master? Often, it is helpful to talk to people who are already experts in the field and ask them what concepts, facts and skills are important to master to be successful in the specific field.

Here DataCamp is already doing the job for you! The reason is, DataCamp already has defined career and skill tracks, that give you the necessary knowledge and programming skills you need to become a successful data scientist. Also, DataCamp has some of the best data scientist offering courses. They come both from academia (theory) and from companies (practice).

For you as a data scientist or somebody that wants to become a data scientist, DataCamp already shows you which skills you need. Of course, it is always good to use additional learning resources (what I highly recommend anyway), but DataCamp already gives you good ideas where to look and shows you who the top people working in the field of data science are.

Focus

How focused are you when you are learning? How can you improve your focus? What changes should you make to your environment, to help you concentrate and lower distractions? Does my learning schedule make sense? Am I procrastinating, and if so, why am I procrastinating? These are all questions you can ask yourself and try to solve to become more focused when learning.

Learning to become better at focusing is something that you have to practice by yourself. Nevertheless, I think that DataCamp helps you focus because of the XP System it uses. Gamification – which is basically used by DataCamp – helps you to focus because you want to achieve a certain goal in a certain amount of time.

Directness

Ask yourself, if what you are learning will really add value to your everyday tasks. If what you are learning does not have usage in real life, you are probably wasting your time and not improving on, or learning skills that you want to use to solve important problems.

DataCamp offers different approaches to make sure that what you learn is practical and has a direct usage in your everyday data science problems.  By using actual data sets and real world problem solving approaches, you can directly use what you have learned in your own projects. You also have the possibility of picking courses that teach exactly what you want to learn. It gives you the chance to pick the subject you are currently interested in. You don’t have to follow a defined career or skill track; you can jump right into a course that teaches you the concepts and tools you need to solve a problem you are currently facing.

Drill

When you drill, you try to improve on an aspect in your skillset that you are very weak at. You isolate the subject that you have trouble with and focus your cognitive energy on that single aspect. By doing so, you will reduce the mental load on your brain and be able to improve your weakest points with laser focus. Drilling helps you to remove learning bottlenecks that could keep you from getting better. You break down complex subjects into smaller parts and concentrate on them alone. Once you fully understand how the isolated subjects work, you increase the complexity.

DataCamp offers several opportunities to drill what you have learned, so coding becomes second nature. This will help you to move faster from a beginner to a skilled programmer. One of the easiest ways to drill what you have learned, is to use the Daily Practice exercises that DataCamp offers. These are also available on mobile devices. You practice what you have learned and can concentrate on areas that are the most difficult for you to understand. You can also download the scripts of the courses and go through the parts step by step, that are the most challenging to you.

Retrieval

Be careful not to spend most of your time reading passively. Try to recall what you studied to keep it in your long term memory! Challenge yourself to solve problems and retrieve information without going through your notes or googling the answer.

By doing the exercises after you have been taught the subject by the instructor, you retrieve what you have learned. This helps to keep the information in your long term memory. It is not enough to retrieve what you have learned once. You need to retrieve (use) what you have learned on a regular basis. Good practice is to start working on a project where you need the skills that you have learned. It is also useful to print out the scripts and go through them on a regular basis.

Feedback

The good thing about how the exercises are done in DataCamp is that you get instant feedback on your performance. You have to code first and then click on the “submit answer” button, after which you get instant information on your performance. If you can’t find the solution by yourself, you can ask for a hint. Even if the hint doesn’t get you on track, you can ask for the answer.

Retention

It is important to use what you have learned, so you will keep it in your long term memory. Constant and regular exposure to what you have learned is important. Use what you have learned and make sure it sticks. Use it or lose it!

This is where the DataCamp projects come in handy. They test your skills and force you to use what you have learned in order to be able to answer the questions.

Intuition

Do you have a deep understanding of what you have learned? Do you understand the core concepts and not just the facts. If you can only repeat information without understanding the underlying concepts and principals, you will not be able to build intuition. If you want to test yourself if you have gained a deeper understanding, then teach it to others our try to explain a concept you are learning to yourself, in your own words.

This is a principal that you have to implement by yourself. Nevertheless, DataCamp helps you to gain intuition by presenting a lot of concepts and ideas that you can then explore further. It gives you a lot of challenging questions to think about and shows you methods you can use to solve them.    

Experimentation

Experimentation is the final principal of ultralearning. This is the one principal where you have to leave DataCamp to further improve!

Experiment with what you have learned. Use the skills you have acquired and try to solve different problem sets with them. Figure out how to solve problems more efficient and effective by looking for more applications. Think outside the box.  Apply your newly acquired skills in the real world.

For example, I successfully use regression to build cost models. I use these in negotiations with suppliers to establish objective criteria for price negotiations. Here, I am able to combine a hybrid set of unrelated skills. I use my domain expertise of supply chain management and combine it with my newly acquired data science skills.

Animierte Prozesse

Heute möchten wir Ihnen kurz das R Paket bupaR vorstellen. Es handelt um ein Paket zur Analyse von Business Prozessen. Das Paket nutzt auch viele visuelle Tools um Prozess und Prozessanalyse anfassbar zu machen.

Es kleines Highlight, möchte ich die Möglichkeit vorstellen, Prozesse zu animieren. Es handelt sich hier um einen fiktiven Ablauf innerhalb einer Fertigung.

Cost Driver Analysis

Today we would like to introduce ternary plots. There is a very nice package available that is called ggtern which helps you to make ternary plots in ggplot2. ggtern is made possible by Nicholas Hamilton. You can find his website here.

Ternary plots are very useful, because they let you plot three variables on a two-dimensional graph. They also let you see the proportions of the three variables you are analyzing very quickly.

Ternary plots need a special kind of problem to work. You need to have a parts of a whole problem, to be able to successfully use them. It is important, that the three parameters you are analyzing add up to 100 percent. So when using them, you have to make sure that your problem (or the variables you are analyzing) consist of 3 variables and that in sum they add up to 100 percent.

I had to think a little to find a problem that fits this kind of solution in the area of operations-, or supply chain management. I then remembered, that product costs are almost always calculated by analyzing the material, labour and burden (also called overhead) content. In sum, these three cost elements should also add up to 100 percent of the total product cost. Not considering things like landed cost, total cost of ownership, etc.

Below you will find several products, which have been analyzed with ternary plots by using their material, labor and overhead cost elements.

Ternary plots can be a bit challenging to read, especially when you see them the first time.

To be able to better read a ternary plot, I have made an example that shows you were the different axes are and in which places to read the corresponding information.

Let’s look at the point in the lower left corner. Looking at the overhead axis (red) tells you, that 80 percent of the product costs are related to overhead costs. Roughly 10 percent is related to labour cost (which is the green axis) and another 10 percent is related to material cost. When you add up all the percentages you will have 100 percent! The product is highly driven by overhead cost.

So in this case, if our products would have a cost distribution as shown in the above plot, we would have products where many of the main cost drivers are labour cost related. If you would like to find the biggest cost saving leverage in your product portfolio, you now know, that it will be labour cost related elements.

Below is another plot that shows the concentration of the cost drivers.

Ternary plots can be a very fast way to understand the cost distribution of your product portfolio and help you see where the biggest cost saving leverage is.