diff --git a/CRM/Customer Churn Prediction/notebook.ipynb b/CRM/Customer Churn Prediction/notebook.ipynb index e5f9655bdfce8654775074db064c77a572329b1a..021312256f4fb05a05ab69955f381c780086c4c7 100644 --- a/CRM/Customer Churn Prediction/notebook.ipynb +++ b/CRM/Customer Churn Prediction/notebook.ipynb @@ -1,6 +1,7 @@ { "cells": [ { + "attachments": {}, "cell_type": "markdown", "metadata": { "editable": true, @@ -26,6 +27,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "editable": true, @@ -41,6 +43,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": true, @@ -61,6 +64,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -95,6 +99,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -365,6 +370,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -455,6 +461,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -464,6 +471,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -473,6 +481,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -528,6 +537,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -548,6 +558,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -557,6 +568,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -566,6 +578,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -575,6 +588,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -594,6 +608,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -633,6 +648,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -683,6 +699,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -692,6 +709,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -731,6 +749,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -781,6 +800,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -791,6 +811,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -830,6 +851,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -863,6 +885,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -905,6 +928,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -954,6 +978,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -964,6 +989,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1005,6 +1031,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1014,6 +1041,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1053,6 +1081,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1092,6 +1121,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1101,6 +1131,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1110,6 +1141,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1119,6 +1151,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1166,6 +1199,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1176,6 +1210,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1206,6 +1241,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1215,6 +1251,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1245,6 +1282,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1254,6 +1292,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1284,6 +1323,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1293,6 +1333,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1323,6 +1364,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1332,6 +1374,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1362,6 +1405,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1371,6 +1415,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1401,6 +1446,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1410,6 +1456,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1440,6 +1487,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1449,6 +1497,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1479,6 +1528,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1488,6 +1538,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1518,6 +1569,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1527,6 +1579,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1557,6 +1610,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1566,6 +1620,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1607,6 +1662,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1616,6 +1672,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1646,6 +1703,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1655,6 +1713,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1685,6 +1744,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1694,6 +1754,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1724,6 +1785,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -1733,6 +1795,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -1743,6 +1806,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -1763,6 +1827,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -2258,6 +2323,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -2268,6 +2334,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -2329,6 +2396,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -2397,6 +2465,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -2464,6 +2533,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -2473,6 +2543,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -2738,6 +2809,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -2758,6 +2830,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -2778,6 +2851,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -2794,10 +2868,11 @@ "paragraph": "Datenmodell" }, "source": [ - "Als Datenmodell wird eine logistische Regression verwendet. Dies bietet sich zur Klassifikation der Kunden auf eine binäre Zielvariable (= Kundenabwanderung) an." + "Als Datenmodell wird eine logisitische Regression verwendet. Dies bietet sich zur Klassifikation der Kunden auf eine binäre Zielvariable (= Kundenabwanderung) an." ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -2807,6 +2882,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -2817,6 +2893,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -2827,6 +2904,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -2899,6 +2977,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -2921,6 +3000,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -2986,6 +3066,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3064,6 +3145,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3073,6 +3155,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3092,6 +3175,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3101,6 +3185,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3132,6 +3217,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -3161,6 +3247,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -3213,6 +3300,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3291,6 +3379,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3324,6 +3413,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3333,6 +3423,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3342,6 +3433,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3419,6 +3511,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3460,6 +3553,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3473,6 +3567,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3482,6 +3577,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3708,6 +3804,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3717,6 +3814,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3805,6 +3903,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -3815,6 +3914,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false, @@ -3922,6 +4022,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3931,6 +4032,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "include": false @@ -3962,7 +4064,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.5" + "version": "3.8.9" }, "repoLink": "https://gitlab.reutlingen-university.de/ki_lab/machine-learning-services/-/blob/main/CRM/Customer%20Churn%20Prediction/notebook.ipynb?ref_type=heads", "skipNotebookInDeployment": false, diff --git a/Rating/Accommodation rating/notebook.ipynb b/Rating/Accommodation rating/notebook.ipynb index 0cddfed999d3fa53bb9581c90d8cc6f5b25bcc93..2f4db23415872cd90cfed809dc496a7f4cb34097 100644 --- a/Rating/Accommodation rating/notebook.ipynb +++ b/Rating/Accommodation rating/notebook.ipynb @@ -2,11 +2,34 @@ "cells": [ { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "include": false, + "paragraph": "Title", + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "# 1. Business Understanding\n", "\n", - "Hosts can set a price for accommodations. However, hosts often do not know the value for the accommodation they provide themselves. It would be helpful if Airbnb Inc. could calculate and suggest a price for accommodations that is in line with the market. The possibility of automated price calculation is examined in more detail in this case study. It is analyzed whether the provision of intelligent pricing on the part of Airbnb Inc. is possible. In the analysis, the features of an accommodation are analyzed and it is determined which features have an influence on the price of an accommodation. In this way, it should be possible to make as good a price prediction as possible for accommodations that are posted in the future." + "Hosts can set a price for their accommodations. However, hosts often do not know the value for the accommodation they provide themselves. It would be helpful if Airbnb Inc. could calculate and suggest a price for accommodations that is in line with the market. The possibility of automated price calculation is examined in more detail in this case study. It is analyzed whether the provision of intelligent pricing on the part of Airbnb Inc. is possible. In the analysis, the features of an accommodation are analyzed and it is determined which features have an influence on the price of an accommodation. In this way, it should be possible to make as good a price prediction as possible for accommodations that are posted in the future." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "editable": true, + "include": true, + "paragraph": "Business", + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "source": [ + "Gastgeber haben die Möglichkeit, den Preis für ihre Unterkünfte selbst festzulegen. Allerdings stehen sie oft vor der Herausforderung, den wahren Wert ihrer Unterkunft richtig einzuschätzen. Hier könnte Airbnb Inc. unterstützend eingreifen, indem sie marktgerechte Preisvorschläge für die angebotenen Unterkünfte berechnet und bereitstellt. Diese Demo untersucht die Möglichkeit einer automatisierten Preiskalkulation für die Unterkünfte durch Airbnb. Dabei wird geprüft, ob und wie eine intelligente Preisgestaltung durch Airbnb realisierbar ist. Im Rahmen der Analyse werden die verschiedenen Merkmale einer Unterkunft genauer betrachtet, um herauszufinden, welche Faktoren den Preis maßgeblich beeinflussen. Ziel ist es, eine zuverlässige Methode zur Preisprognose zu entwickeln, die es ermöglicht, zukünftige Unterkünfte möglichst präzise zu bewerten und zu bepreisen. Dies könnte nicht nur den Gastgebern helfen, sondern auch den Mietern, die nach fairen und transparenten Preisen suchen." ] }, { @@ -18,6 +41,21 @@ "The Data Understanding section is divided into an all-encompassing review of the data set, followed by an exploratory data analysis that focuses on relevant features. The features are evaluated in terms of their viability and feature selection takes place. The Airbnb-Berlin dataset consists of 16 columns and 22552 rows. The 16 columns contain the features. The data types of the features are seven Integers, five Objects (of which four are Strings and one is Date), and four Floats. " ] }, + { + "cell_type": "markdown", + "metadata": { + "editable": true, + "include": true, + "paragraph": "Daten", + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "source": [ + "Der verwendete Airbnb-Berlin-Datensatz besteht aus 22.552 Einträgen und umfasst 16 verschiedene Features, also Datenkategorien. Dabei werden die Merkmale hinsichtlich ihrer Brauchbarkeit bewertet und ausgewählt. Jede Zeile stellt eine Immobilie dar und jede Spalte beschreibt deren spezifische Merkmale oder Eigenschaften. Die Merkmale umfassen sieben Integer, vier Strings, ein Datum und vier Floats. Die Datenbasis ist umfangreich genug, um vielfältige Analysen durchzuführen. Ziel der Analyse ist es, zu ermitteln, welche Merkmale den Preis einer Immobilie beeinflussen. Die historischen Daten enthalten die Zielvariable \"price\", die den Wert der jeweiligen Immobilie angibt. Dieser Datensatz ist aufgrund der kontinuierlichen Zielvariable (später auch Ziel genannt) ein gutes Beispiel für Regressionsmodelle." + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -402,9 +440,7 @@ { "cell_type": "code", "execution_count": 59, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [ { "data": { @@ -1646,9 +1682,7 @@ { "cell_type": "code", "execution_count": 89, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [ { "name": "stderr", @@ -1769,6 +1803,21 @@ "The first read errors should be corrected here, before the actual data preparation." ] }, + { + "cell_type": "markdown", + "metadata": { + "editable": true, + "include": true, + "paragraph": "Datenvorbereitung", + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "source": [ + "Zunächst werden die Daten eingelesen und auf ihre Vollständigkeit überprüft. Danach werden die einzelnen Immobilienmerkmale einer deskriptiven Analyse unterzogen. Damit lässt sich der Zusammenhang zur Zielvariable Preis darstellen. In den Daten werden Untypische Daten ersetzt wie zum Beispiel „?“ mit „NaN“. Auf der Grundlage einer Korrelationsanalyse werden die Zusammenhänge zwischen Immobilie-Daten und der Zielvariable Preis untersucht. Merkmale die keinen Mehrwert bieten werden entfernt ( Host_id, Anzahl der Bewertungen, usw.). " + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -5259,6 +5308,21 @@ "Residuals provide information on how accurately the dependent variable can be estimated in a regression. They indicate how far the predicted value agrees with the actual value. The smaller the residual the better." ] }, + { + "cell_type": "markdown", + "metadata": { + "editable": true, + "include": true, + "paragraph": "Datenmodell", + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "source": [ + "Klassifizierungsmodelle sind vielfältig und umfassen zum Beispiel lineare Regression und Random Forest. Nach der Datenaufbereitung wurde der entsprechende maschinelle Lernalgorithmus modelliert. Bei diesem Anwendungsfall handelt es sich um ein binäres Klassifikationsproblem. Eine klassische Lösungsmethode für diese Art von Problem ist die sogenannte logistische Regression. Diese wird verwendet, um die Erfolgswahrscheinlichkeit eines Ereignisses zu schätzen, die von den unabhängigen Ereignissen abhängt. Außerdem wir hier auch ein Neuronales Netz mit Keras getestet. " + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -8256,6 +8320,21 @@ "plt.legend(['train', 'val'], loc='upper left')\n", "plt.show()" ] + }, + { + "cell_type": "markdown", + "metadata": { + "editable": true, + "include": true, + "paragraph": "Evaluation", + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "source": [ + "Für die Bewertung der Qualität der Klassifikation werden die Metrik r 2 verwendet. Dabei erreicht das Modell mit einer linearen Regression einen r 2 wert von ~ 0,375. Mit dem Randomforest hingegen wird ein r 2 Wert von ungefähr ~0,62 erreicht. Außerdem werden Werte wie der Mean Absolute Error (MAE) und der Mean Squared Error (MSE) benutzt um zu verstehen wie präzise die Modelle sind. Zum Schluss stellt sich damit heraus dass der Randomforest sich am besten für diesen Vorfall eignen und mit diesen die besten Preisvorschläge getroffen werden können. Somit kann der Gastgeber mit solch einem Service besser bestimmen wieviel er für seine Immobilie verlangen soll und somit selber einen faireren Preis erhalten. " + ] } ], "metadata": { @@ -8274,8 +8353,13 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.5" - } + "version": "3.8.9" + }, + "repoLink": "https://gitlab.reutlingen-university.de/ki_lab/machine-learning-services/-/tree/main/Rating/Accommodation%20rating?ref_type=heads", + "dataSource": "https://gitlab.reutlingen-university.de/ki_lab/machine-learning-services/-/blob/main/Rating/Accommodation%20rating/raw_data.csv?ref_type=heads", + "skipNotebookInDeployment": false, + "teaser": "Für Gastgeber auf Airbnb ist es oft schwierig zu wissen welchen Preis sie für Ihre Immobilie verlangen sollen. So ist es oft schwierig abzuschätzen ob ihr Angebot der Lage und des Zustandes der Immobilie gerecht wird. Der Datensatz welcher hier benutzt wird stellt jeweils eine Immobilie in einem Viertel von Berlin da. Zu jeder Immobilie gehören jeweils der Preis und viele weitere Merkmale. Diese Merkmale sind besonders interessant um damit eine Preisvorstellung für eine Immobilie zu schaffen, welche sowohl lukrativ für den Gastgeber ist als auch fair für den Kunden. Das Ziel ist es einen automatischen Preisvorschlag für die Immobilien zu generieren. Anhand dieses Datensatz soll mit „Machine-Learning“ ermittelt werden welcher Preis für die Immobilie angemessen ist. „Lineare Regressionen“ und „Random Forest“ -Modelle werden hierbei genutzt um Vorhersagen über den Preis zu treffen. Das finale Modell arbeitet mit einer ungefähren Genauigkeit von 62%.", + "title": "Unterkunfts Preisvorschlags Berechnung" }, "nbformat": 4, "nbformat_minor": 4