From 4e64635377a6864c990140d3b1668eabf3599dbd Mon Sep 17 00:00:00 2001
From: Avvari1830S <76546836+Avvari1830S@users.noreply.github.com>
Date: Wed, 31 Jan 2024 22:15:06 +0900
Subject: [PATCH 01/10] Created using Colaboratory
---
.../createGeoreferentialTemporal | 108 ++++++++++++++++++
1 file changed, 108 insertions(+)
create mode 100644 notebooks/extras/SyntheticDataGenerators/createGeoreferentialTemporal
diff --git a/notebooks/extras/SyntheticDataGenerators/createGeoreferentialTemporal b/notebooks/extras/SyntheticDataGenerators/createGeoreferentialTemporal
new file mode 100644
index 00000000..13709c3d
--- /dev/null
+++ b/notebooks/extras/SyntheticDataGenerators/createGeoreferentialTemporal
@@ -0,0 +1,108 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "provenance": [],
+ "authorship_tag": "ABX9TyNI7p56TkPdMTcnUmTx0yHX",
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ "
"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "import random as _rd\n",
+ "import sys as _sys\n",
+ "\n",
+ "\n",
+ "class createGeoreferentialTemporalDatabase:\n",
+ " \"\"\"\n",
+ " This class create synthetic geo-referential temporal database.\n",
+ "\n",
+ " Attribute:\n",
+ " ----------\n",
+ " totalTransactions : int\n",
+ " No of transactions\n",
+ " noOfItems : int or float\n",
+ " No of items\n",
+ " avgTransactionLength : str\n",
+ " The length of average transaction\n",
+ " outputFile: str\n",
+ " Name of the output file.\n",
+ "\n",
+ " Methods:\n",
+ " --------\n",
+ " createGeoreferentialTemporalDatabase(outputFile)\n",
+ " Create geo-referential temporal database and store into outputFile\n",
+ "\n",
+ " Credits:\n",
+ " ---------\n",
+ " The complete program was written by P.Likhitha under the supervision of Professor Rage Uday Kiran.\n",
+ "\n",
+ " \"\"\"\n",
+ "\n",
+ " def __init__(self, transactions: int, items: int, avgTransaction: int) -> None:\n",
+ " self._totalTransactions = transactions\n",
+ " self._noOfItems = items\n",
+ " self._avgTransactionLength = avgTransaction\n",
+ "\n",
+ " def createGeoreferentialTemporalDatabase(self, outputFile: str) -> None:\n",
+ " \"\"\"\n",
+ " create transactional database and return outputFileName\n",
+ " :param outputFile: file name or path to store database\n",
+ " :type outputFile: str\n",
+ " :return: outputFile name\n",
+ " \"\"\"\n",
+ " writer = open(outputFile, 'w+')\n",
+ " items = []\n",
+ " count = 1\n",
+ " for i in range(self._noOfItems):\n",
+ " lat = _rd.randint(1, self._noOfItems)\n",
+ " lon = _rd.randint(1, self._noOfItems)\n",
+ " if lat == lon:\n",
+ " lon = _rd.randint(1, self._noOfItems)\n",
+ " stt = '(' + str(lat) + ' ' + str(lon) + ')'\n",
+ " items.append(stt)\n",
+ " for i in range(self._totalTransactions):\n",
+ " length = _rd.randint(1, self._avgTransactionLength + 20)\n",
+ " st = str(count)\n",
+ " for i in range(length):\n",
+ " rd = _rd.randint(0, len(items) - 1)\n",
+ " item = items[rd]\n",
+ " st = st + str(item) + '\\t'\n",
+ " writer.write(\"%s \\n\" % st)\n",
+ " count += 1\n",
+ "\n",
+ "if __name__ == \"__main__\":\n",
+ " _ap = str()\n",
+ " _ap = createSyntheticGeoreferentialTemporal(100000, 870, 10)\n",
+ " _ap.createGeoreferentialTemporalDatabase(\"T10_geo_temp.txt\")\n",
+ "else:\n",
+ " print(\"Error! The number of input parameters do not match the total number of parameters provided\")"
+ ],
+ "metadata": {
+ "id": "Ki5GoZnNoGAD"
+ },
+ "execution_count": null,
+ "outputs": []
+ }
+ ]
+}
\ No newline at end of file
From 68279fbefb678fc90fc0f0d6a0b46634a9afcf21 Mon Sep 17 00:00:00 2001
From: Avvari1830S <76546836+Avvari1830S@users.noreply.github.com>
Date: Wed, 31 Jan 2024 22:20:54 +0900
Subject: [PATCH 02/10] Created using Colaboratory
---
.../createSyntheticGeoreferentialTransactions | 107 ++++++++++++++++++
1 file changed, 107 insertions(+)
create mode 100644 notebooks/extras/SyntheticDataGenerator/createSyntheticGeoreferentialTransactions
diff --git a/notebooks/extras/SyntheticDataGenerator/createSyntheticGeoreferentialTransactions b/notebooks/extras/SyntheticDataGenerator/createSyntheticGeoreferentialTransactions
new file mode 100644
index 00000000..9732f7e0
--- /dev/null
+++ b/notebooks/extras/SyntheticDataGenerator/createSyntheticGeoreferentialTransactions
@@ -0,0 +1,107 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "provenance": [],
+ "authorship_tag": "ABX9TyM6EuNv+Gl3hUE5pVRiqaTa",
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ "
"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "JOpIZF41aqsp"
+ },
+ "outputs": [],
+ "source": [
+ "import random as _rd\n",
+ "import sys as _sys\n",
+ "\n",
+ "\n",
+ "class createSyntheticGeoreferentialTransaction:\n",
+ " \"\"\"\n",
+ " This class create synthetic geo-referential transaction database.\n",
+ "\n",
+ " Attribute:\n",
+ " ----------\n",
+ " totalTransactions : int\n",
+ " No of transactions\n",
+ " items : int\n",
+ " No of items\n",
+ " avgTransactionLength : str\n",
+ " The length of average transaction\n",
+ " outputFile: str\n",
+ " Name of the output file.\n",
+ "\n",
+ " Methods:\n",
+ " --------\n",
+ " createGeoreferentialTransactionDatabase(outputFile)\n",
+ " Create geo-referential transactional database and store into outputFile\n",
+ "\n",
+ "\n",
+ " Credits:\n",
+ " ---------\n",
+ " The complete program was written by P.Likhitha under the supervision of Professor Rage Uday Kiran.\n",
+ "\n",
+ " \"\"\"\n",
+ "\n",
+ " def __init__(self, transactions, items, avgTransaction):\n",
+ " self._totalTransactions = transactions\n",
+ " self._noOfItems = items\n",
+ " self._avgTransactionLength = avgTransaction\n",
+ "\n",
+ " def createGeoreferentialTransactionalDatabase(self, outputFile):\n",
+ " \"\"\"\n",
+ " create transactional database and return outputFileName\n",
+ " :param outputFile: file name or path to store database\n",
+ " :type outputFile: str\n",
+ " :return: outputFile name\n",
+ " \"\"\"\n",
+ " writer = open(outputFile, 'w+')\n",
+ " items = []\n",
+ " for i in range(self._noOfItems):\n",
+ " lat = _rd.randint(1, self._noOfItems)\n",
+ " lon = _rd.randint(1, self._noOfItems)\n",
+ " if lat == lon:\n",
+ " lon = _rd.randint(1, self._noOfItems)\n",
+ " stt = '(' + str(lat) + ' ' + str(lon) + ')'\n",
+ " items.append(stt)\n",
+ " for i in range(self._totalTransactions):\n",
+ " length = _rd.randint(1, self._avgTransactionLength + 20)\n",
+ " st = str()\n",
+ " for i in range(length):\n",
+ " rd = _rd.randint(0, len(items) - 1)\n",
+ " item = items[rd]\n",
+ " st = st + str(item) + '\\t'\n",
+ " writer.write(\"%s \\n\" % st)\n",
+ "\n",
+ "if __name__ == \"__main__\":\n",
+ " _ap = str()\n",
+ " _ap = createSyntheticGeoreferentialTransaction(100000, 870, 10)\n",
+ " _ap.createGeoreferentialTransactionalDatabase(\"T10_geo.txt\")\n",
+ "else:\n",
+ " print(\"Error! The number of input parameters do not match the total number of parameters provided\")"
+ ]
+ }
+ ]
+}
\ No newline at end of file
From 5a73cbb71c7a379605bf43cf0e3663a4e71aa5cb Mon Sep 17 00:00:00 2001
From: Avvari1830S <76546836+Avvari1830S@users.noreply.github.com>
Date: Wed, 31 Jan 2024 22:22:37 +0900
Subject: [PATCH 03/10] Delete notebooks/extras/SyntheticDataGenerator
directory
---
.../createSyntheticGeoreferentialTransactions | 107 ------------------
1 file changed, 107 deletions(-)
delete mode 100644 notebooks/extras/SyntheticDataGenerator/createSyntheticGeoreferentialTransactions
diff --git a/notebooks/extras/SyntheticDataGenerator/createSyntheticGeoreferentialTransactions b/notebooks/extras/SyntheticDataGenerator/createSyntheticGeoreferentialTransactions
deleted file mode 100644
index 9732f7e0..00000000
--- a/notebooks/extras/SyntheticDataGenerator/createSyntheticGeoreferentialTransactions
+++ /dev/null
@@ -1,107 +0,0 @@
-{
- "nbformat": 4,
- "nbformat_minor": 0,
- "metadata": {
- "colab": {
- "provenance": [],
- "authorship_tag": "ABX9TyM6EuNv+Gl3hUE5pVRiqaTa",
- "include_colab_link": true
- },
- "kernelspec": {
- "name": "python3",
- "display_name": "Python 3"
- },
- "language_info": {
- "name": "python"
- }
- },
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {
- "id": "view-in-github",
- "colab_type": "text"
- },
- "source": [
- "
"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "id": "JOpIZF41aqsp"
- },
- "outputs": [],
- "source": [
- "import random as _rd\n",
- "import sys as _sys\n",
- "\n",
- "\n",
- "class createSyntheticGeoreferentialTransaction:\n",
- " \"\"\"\n",
- " This class create synthetic geo-referential transaction database.\n",
- "\n",
- " Attribute:\n",
- " ----------\n",
- " totalTransactions : int\n",
- " No of transactions\n",
- " items : int\n",
- " No of items\n",
- " avgTransactionLength : str\n",
- " The length of average transaction\n",
- " outputFile: str\n",
- " Name of the output file.\n",
- "\n",
- " Methods:\n",
- " --------\n",
- " createGeoreferentialTransactionDatabase(outputFile)\n",
- " Create geo-referential transactional database and store into outputFile\n",
- "\n",
- "\n",
- " Credits:\n",
- " ---------\n",
- " The complete program was written by P.Likhitha under the supervision of Professor Rage Uday Kiran.\n",
- "\n",
- " \"\"\"\n",
- "\n",
- " def __init__(self, transactions, items, avgTransaction):\n",
- " self._totalTransactions = transactions\n",
- " self._noOfItems = items\n",
- " self._avgTransactionLength = avgTransaction\n",
- "\n",
- " def createGeoreferentialTransactionalDatabase(self, outputFile):\n",
- " \"\"\"\n",
- " create transactional database and return outputFileName\n",
- " :param outputFile: file name or path to store database\n",
- " :type outputFile: str\n",
- " :return: outputFile name\n",
- " \"\"\"\n",
- " writer = open(outputFile, 'w+')\n",
- " items = []\n",
- " for i in range(self._noOfItems):\n",
- " lat = _rd.randint(1, self._noOfItems)\n",
- " lon = _rd.randint(1, self._noOfItems)\n",
- " if lat == lon:\n",
- " lon = _rd.randint(1, self._noOfItems)\n",
- " stt = '(' + str(lat) + ' ' + str(lon) + ')'\n",
- " items.append(stt)\n",
- " for i in range(self._totalTransactions):\n",
- " length = _rd.randint(1, self._avgTransactionLength + 20)\n",
- " st = str()\n",
- " for i in range(length):\n",
- " rd = _rd.randint(0, len(items) - 1)\n",
- " item = items[rd]\n",
- " st = st + str(item) + '\\t'\n",
- " writer.write(\"%s \\n\" % st)\n",
- "\n",
- "if __name__ == \"__main__\":\n",
- " _ap = str()\n",
- " _ap = createSyntheticGeoreferentialTransaction(100000, 870, 10)\n",
- " _ap.createGeoreferentialTransactionalDatabase(\"T10_geo.txt\")\n",
- "else:\n",
- " print(\"Error! The number of input parameters do not match the total number of parameters provided\")"
- ]
- }
- ]
-}
\ No newline at end of file
From 7bc1994c7a974d53d5fe27a2198e9ab27d2004ce Mon Sep 17 00:00:00 2001
From: Avvari1830S <76546836+Avvari1830S@users.noreply.github.com>
Date: Wed, 31 Jan 2024 22:28:17 +0900
Subject: [PATCH 04/10] Created using Colaboratory
---
.../createSyntheticGeoreferentialTransactions | 107 ++++++++++++++++++
1 file changed, 107 insertions(+)
create mode 100644 notebooks/extras/SyntheticDataGenerators/createSyntheticGeoreferentialTransactions
diff --git a/notebooks/extras/SyntheticDataGenerators/createSyntheticGeoreferentialTransactions b/notebooks/extras/SyntheticDataGenerators/createSyntheticGeoreferentialTransactions
new file mode 100644
index 00000000..02cbd33f
--- /dev/null
+++ b/notebooks/extras/SyntheticDataGenerators/createSyntheticGeoreferentialTransactions
@@ -0,0 +1,107 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "provenance": [],
+ "authorship_tag": "ABX9TyM6EuNv+Gl3hUE5pVRiqaTa",
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ "
"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "JOpIZF41aqsp"
+ },
+ "outputs": [],
+ "source": [
+ "import random as _rd\n",
+ "import sys as _sys\n",
+ "\n",
+ "\n",
+ "class createSyntheticGeoreferentialTransaction:\n",
+ " \"\"\"\n",
+ " This class create synthetic geo-referential transaction database.\n",
+ "\n",
+ " Attribute:\n",
+ " ----------\n",
+ " totalTransactions : int\n",
+ " No of transactions\n",
+ " items : int\n",
+ " No of items\n",
+ " avgTransactionLength : str\n",
+ " The length of average transaction\n",
+ " outputFile: str\n",
+ " Name of the output file.\n",
+ "\n",
+ " Methods:\n",
+ " --------\n",
+ " createGeoreferentialTransactionDatabase(outputFile)\n",
+ " Create geo-referential transactional database and store into outputFile\n",
+ "\n",
+ "\n",
+ " Credits:\n",
+ " ---------\n",
+ " The complete program was written by P.Likhitha under the supervision of Professor Rage Uday Kiran.\n",
+ "\n",
+ " \"\"\"\n",
+ "\n",
+ " def __init__(self, transactions, items, avgTransaction):\n",
+ " self._totalTransactions = transactions\n",
+ " self._noOfItems = items\n",
+ " self._avgTransactionLength = avgTransaction\n",
+ "\n",
+ " def createGeoreferentialTransactionalDatabase(self, outputFile):\n",
+ " \"\"\"\n",
+ " create transactional database and return outputFileName\n",
+ " :param outputFile: file name or path to store database\n",
+ " :type outputFile: str\n",
+ " :return: outputFile name\n",
+ " \"\"\"\n",
+ " writer = open(outputFile, 'w+')\n",
+ " items = []\n",
+ " for i in range(self._noOfItems):\n",
+ " lat = _rd.randint(1, self._noOfItems)\n",
+ " lon = _rd.randint(1, self._noOfItems)\n",
+ " if lat == lon:\n",
+ " lon = _rd.randint(1, self._noOfItems)\n",
+ " stt = '(' + str(lat) + ' ' + str(lon) + ')'\n",
+ " items.append(stt)\n",
+ " for i in range(self._totalTransactions):\n",
+ " length = _rd.randint(1, self._avgTransactionLength + 20)\n",
+ " st = str()\n",
+ " for i in range(length):\n",
+ " rd = _rd.randint(0, len(items) - 1)\n",
+ " item = items[rd]\n",
+ " st = st + str(item) + '\\t'\n",
+ " writer.write(\"%s \\n\" % st)\n",
+ "\n",
+ "if __name__ == \"__main__\":\n",
+ " _ap = str()\n",
+ " _ap = createSyntheticGeoreferentialTransaction(100000, 870, 10)\n",
+ " _ap.createGeoreferentialTransactionalDatabase(\"T10_geo.txt\")\n",
+ "else:\n",
+ " print(\"Error! The number of input parameters do not match the total number of parameters provided\")"
+ ]
+ }
+ ]
+}
\ No newline at end of file
From 6247f93543662fc682a6abfae8018446311bad16 Mon Sep 17 00:00:00 2001
From: Avvari1830S <76546836+Avvari1830S@users.noreply.github.com>
Date: Wed, 31 Jan 2024 22:32:31 +0900
Subject: [PATCH 05/10] Created using Colaboratory
---
.../createSyntheticTransactions | 97 +++++++++++++++++++
1 file changed, 97 insertions(+)
create mode 100644 notebooks/extras/SyntheticDataGenerators/createSyntheticTransactions
diff --git a/notebooks/extras/SyntheticDataGenerators/createSyntheticTransactions b/notebooks/extras/SyntheticDataGenerators/createSyntheticTransactions
new file mode 100644
index 00000000..451208a5
--- /dev/null
+++ b/notebooks/extras/SyntheticDataGenerators/createSyntheticTransactions
@@ -0,0 +1,97 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "provenance": [],
+ "authorship_tag": "ABX9TyN97Pf6jYA+yOhaxccpgPXc",
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ "
"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "LcnZXu2wcRk1"
+ },
+ "outputs": [],
+ "source": [
+ "import random as _rd\n",
+ "import sys as _sys\n",
+ "class createSyntheticTransaction:\n",
+ " \"\"\"\n",
+ " This class create synthetic transaction database.\n",
+ "\n",
+ " Attribute:\n",
+ " ----------\n",
+ " totalTransactions : int\n",
+ " No of transactions\n",
+ " noOfItems : int\n",
+ " No of items\n",
+ " avgTransactionLength : int\n",
+ " The length of average transaction\n",
+ " outputFile: str\n",
+ " Name of the output file.\n",
+ "\n",
+ " Methods:\n",
+ " --------\n",
+ " createTransactionalDatabase(outputFile)\n",
+ " Create transactional database and store into outputFile\n",
+ "\n",
+ " Credits:\n",
+ " ---------\n",
+ " The complete program was written by P.Likhitha under the supervision of Professor Rage Uday Kiran.\n",
+ "\n",
+ "\n",
+ "\n",
+ " \"\"\"\n",
+ "\n",
+ " def __init__(self, totalTransactions: int, items: int, avgTransactionLength: int) -> None:\n",
+ " self._totalTransactions = totalTransactions\n",
+ " self._noOfItems = items\n",
+ " self._avgTransactionLength = avgTransactionLength\n",
+ "\n",
+ " def createTransactionalDatabase(self, outputFile: str) -> None:\n",
+ " \"\"\"\n",
+ " create transactional database and return outputFileName\n",
+ " :param outputFile: file name or path to store database\n",
+ " :type outputFile: str\n",
+ " :return: outputFile name\n",
+ " \"\"\"\n",
+ " writer = open(outputFile, 'w+')\n",
+ " for i in range(self._totalTransactions):\n",
+ " length = _rd.randint(1, self._avgTransactionLength + 20)\n",
+ " st = str()\n",
+ " for i in range(length):\n",
+ " item = _rd.randint(1, self._noOfItems)\n",
+ " st = st + str(item) + '\\t'\n",
+ " writer.write(\"%s \\n\" % st)\n",
+ "\n",
+ "if __name__ == \"__main__\":\n",
+ " _ap = str()\n",
+ " _ap = createSyntheticTransaction(100000, 870, 10)\n",
+ " _ap.createTransactionalDatabase(\"T10.txt\")\n",
+ "else:\n",
+ " print(\"Error! The number of input parameters do not match the total number of parameters provided\")"
+ ]
+ }
+ ]
+}
\ No newline at end of file
From ee27e1c2369c796e5adb1df207a3bdf85b7f6c29 Mon Sep 17 00:00:00 2001
From: Avvari1830S <76546836+Avvari1830S@users.noreply.github.com>
Date: Wed, 31 Jan 2024 22:35:42 +0900
Subject: [PATCH 06/10] Created using Colaboratory
---
.../createSyntheticTemporal | 98 +++++++++++++++++++
1 file changed, 98 insertions(+)
create mode 100644 notebooks/extras/SyntheticDataGenerators/createSyntheticTemporal
diff --git a/notebooks/extras/SyntheticDataGenerators/createSyntheticTemporal b/notebooks/extras/SyntheticDataGenerators/createSyntheticTemporal
new file mode 100644
index 00000000..84694d0b
--- /dev/null
+++ b/notebooks/extras/SyntheticDataGenerators/createSyntheticTemporal
@@ -0,0 +1,98 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "provenance": [],
+ "authorship_tag": "ABX9TyMuKfiZg/rnE3ytTXwxkCoO",
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ "
"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "TUSJp6cKb0kl"
+ },
+ "outputs": [],
+ "source": [
+ "import random as _rd\n",
+ "import sys as _sys\n",
+ "class createSyntheticTemporal:\n",
+ " \"\"\"\n",
+ " This class create synthetic temporal database.\n",
+ "\n",
+ " Attribute:\n",
+ " ----------\n",
+ " totalTransactions : int\n",
+ " No of transactions\n",
+ " noOfItems : int\n",
+ " No of items\n",
+ " avgTransactionLength : str\n",
+ " The length of average transaction\n",
+ " outputFile: str\n",
+ " Name of the output file.\n",
+ "\n",
+ " Methods:\n",
+ " --------\n",
+ " createTemporallDatabase(outputFile)\n",
+ " Create temporal database from DataFrame and store into outputFile\n",
+ "\n",
+ " Credits:\n",
+ " ---------\n",
+ " The complete program was written by P.Likhitha under the supervision of Professor Rage Uday Kiran.\n",
+ "\n",
+ "\n",
+ " \"\"\"\n",
+ "\n",
+ " def __init__(self, transactions: int, items: int, avgTransaction: int) -> None:\n",
+ " self._totalTransactions = transactions\n",
+ " self._noOfItems = items\n",
+ " self._avgTransactionLength = avgTransaction\n",
+ "\n",
+ " def createTemporalDatabase(self, outputFile: str) -> None:\n",
+ " \"\"\"\n",
+ " create transactional database and return outputFileName\n",
+ " :param outputFile: file name or path to store database\n",
+ " :type outputFile: str\n",
+ " :return: outputFile name\n",
+ " \"\"\"\n",
+ " count = 1\n",
+ " writer = open(outputFile, 'w+')\n",
+ " for i in range(self._totalTransactions):\n",
+ " length = _rd.randint(1, self._avgTransactionLength + 20)\n",
+ " st = str(count) + '\\t'\n",
+ " for i in range(length):\n",
+ " item = _rd.randint(1, self._noOfItems)\n",
+ " st = st + str(item) + '\\t'\n",
+ " writer.write(\"%s \\n\" % st)\n",
+ " count += 1\n",
+ "\n",
+ "if __name__ == \"__main__\":\n",
+ " _ap = str()\n",
+ " _ap = createSyntheticTemporal(100000, 870, 10)\n",
+ " _ap.createTemporalDatabase(\"temporal_T10.txt\")\n",
+ "else:\n",
+ " print(\"Error! The number of input parameters do not match the total number of parameters provided\")"
+ ]
+ }
+ ]
+}
\ No newline at end of file
From c567a714a64de5a2c9b2075bb48fa06335f4b93c Mon Sep 17 00:00:00 2001
From: Avvari1830S <76546836+Avvari1830S@users.noreply.github.com>
Date: Wed, 31 Jan 2024 22:37:21 +0900
Subject: [PATCH 07/10] Created using Colaboratory
---
.../createSyntheticUtility | 108 ++++++++++++++++++
1 file changed, 108 insertions(+)
create mode 100644 notebooks/extras/SyntheticDataGenerators/createSyntheticUtility
diff --git a/notebooks/extras/SyntheticDataGenerators/createSyntheticUtility b/notebooks/extras/SyntheticDataGenerators/createSyntheticUtility
new file mode 100644
index 00000000..3371c8e5
--- /dev/null
+++ b/notebooks/extras/SyntheticDataGenerators/createSyntheticUtility
@@ -0,0 +1,108 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "provenance": [],
+ "authorship_tag": "ABX9TyPa9Z5IsqA99nzl8M/FT7Ap",
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ "
"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "RLFeRRqneKor"
+ },
+ "outputs": [],
+ "source": [
+ "import random as _rd\n",
+ "import sys as _sys\n",
+ "\n",
+ "\n",
+ "class createSyntheticUtility:\n",
+ " \"\"\"\n",
+ " This class create synthetic utility database.\n",
+ "\n",
+ " Attribute:\n",
+ " ----------\n",
+ " totalTransactions : int\n",
+ " No of transactions\n",
+ " noOfItems : int\n",
+ " No of items\n",
+ " maxUtilRange: int\n",
+ " Maximum utility range\n",
+ " avgTransactionLength : int\n",
+ " The length of average transaction\n",
+ " outputFile: str\n",
+ " Name of the output file.\n",
+ "\n",
+ " Nethods:\n",
+ " --------\n",
+ " createUtilitylDatabase(outputFile)\n",
+ " Create utility database from DataFrame and store into outputFile\n",
+ "\n",
+ " Credits:\n",
+ " ---------\n",
+ " The complete program was written by P.Likhitha under the supervision of Professor Rage Uday Kiran.\n",
+ "\n",
+ " \"\"\"\n",
+ "\n",
+ " def __init__(self, transactions: int, items: int, maxUtilRange: int, avgTransaction: int) -> None:\n",
+ " self._totalTransactions = transactions\n",
+ " self._noOfItems = items\n",
+ " self._maxUtilRange = maxUtilRange\n",
+ " self._avgTransactionLength = avgTransaction\n",
+ "\n",
+ " def createUtilityDatabase(self, outputFile: str) -> None:\n",
+ " \"\"\"\n",
+ " create transactional database and return outputFileName\n",
+ " :param outputFile: file name or path to store database\n",
+ " :type outputFile: str\n",
+ " :return: outputFile name\n",
+ " \"\"\"\n",
+ " writer = open(outputFile, 'w+')\n",
+ " for i in range(self._totalTransactions):\n",
+ " length = _rd.randint(1, self._avgTransactionLength + 20)\n",
+ " st = str()\n",
+ " st1 = str()\n",
+ " su = []\n",
+ " for i in range(length):\n",
+ " item = _rd.randint(1, self._noOfItems)\n",
+ " utility = _rd.randint(1, self._maxUtilRange)\n",
+ " st = st + str(item) + '\\t'\n",
+ " su.append(utility)\n",
+ " st1 = st1 + str(utility) + '\\t'\n",
+ " summation = sum([i for i in su])\n",
+ " st = st + \":\" + str(summation) + \":\"\n",
+ " writer.write(\"%s\" % st)\n",
+ " writer.write(\"%s \\n\" % st1)\n",
+ "\n",
+ "if __name__ == \"__main__\":\n",
+ " _ap = str()\n",
+ " _ap = createSyntheticUtility(100000, 870, 100, 10)\n",
+ " _ap.createUtilityDatabase(\"T10_util.txt\")\n",
+ "else:\n",
+ " print(\"Error! The number of input parameters do not match the total number of parameters provided\")"
+ ]
+ }
+ ]
+}
\ No newline at end of file
From 29d042bcb5c0f5e0bae9da2e3fc49abcf03bf5f1 Mon Sep 17 00:00:00 2001
From: Avvari1830S <76546836+Avvari1830S@users.noreply.github.com>
Date: Wed, 31 Jan 2024 22:40:41 +0900
Subject: [PATCH 08/10] Created using Colaboratory
---
.../createSyntheticUncertainTransactions | 102 ++++++++++++++++++
1 file changed, 102 insertions(+)
create mode 100644 notebooks/extras/SyntheticDataGenerators/createSyntheticUncertainTransactions
diff --git a/notebooks/extras/SyntheticDataGenerators/createSyntheticUncertainTransactions b/notebooks/extras/SyntheticDataGenerators/createSyntheticUncertainTransactions
new file mode 100644
index 00000000..91d69592
--- /dev/null
+++ b/notebooks/extras/SyntheticDataGenerators/createSyntheticUncertainTransactions
@@ -0,0 +1,102 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "provenance": [],
+ "authorship_tag": "ABX9TyNDWANqCiSu7694y74TBwrO",
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ "
"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "Wy5dlYIgcoSl"
+ },
+ "outputs": [],
+ "source": [
+ "import random as _rd\n",
+ "import sys as _sys\n",
+ "\n",
+ "\n",
+ "class createSyntheticUncertainTransaction:\n",
+ " \"\"\"\n",
+ " This class create synthetic transaction database.\n",
+ "\n",
+ " Attribute:\n",
+ " ----------\n",
+ " totalTransactions : int\n",
+ " No of transactions\n",
+ " noOfItems : int\n",
+ " No of items\n",
+ " avgTransactionLength : str\n",
+ " The length of average transaction\n",
+ " outputFile: str\n",
+ " Name of the output file.\n",
+ "\n",
+ " Nethods:\n",
+ " --------\n",
+ " createUncertainTransactionalDatabase(outputFile)\n",
+ " Create uncertain transactional database and store into outputFile\n",
+ "\n",
+ " Credits:\n",
+ " ---------\n",
+ " The complete program was written by P.Likhitha under the supervision of Professor Rage Uday Kiran.\n",
+ "\n",
+ " \"\"\"\n",
+ "\n",
+ " def __init__(self, transactions: int, items: int, avgTransaction: int) -> None:\n",
+ " self._totalTransactions = transactions\n",
+ " self._noOfItems = items\n",
+ " self._avgTransactionLength = avgTransaction\n",
+ "\n",
+ " def createUncertainTransactionalDatabase(self, outputFile: str) -> None:\n",
+ " \"\"\"\n",
+ " create transactional database and return outputFileName\n",
+ " :param outputFile: file name or path to store database\n",
+ " :type outputFile: str\n",
+ " :return: outputFile name\n",
+ " \"\"\"\n",
+ " writer = open(outputFile, 'w+')\n",
+ " for i in range(self._totalTransactions):\n",
+ " length = _rd.randint(1, self._avgTransactionLength + 20)\n",
+ " st = str()\n",
+ " st1 = str()\n",
+ " for i in range(length):\n",
+ " item = _rd.randint(1, self._noOfItems)\n",
+ " probability = _rd.uniform(0, 1)\n",
+ " st = st + str(item) + '\\t'\n",
+ " st1 = st1 + str(probability) + '\\t'\n",
+ " writer.write(\"%s:\" % st)\n",
+ " writer.write(\"%s \\n\" % st1)\n",
+ "\n",
+ "\n",
+ "if __name__ == \"__main__\":\n",
+ " _ap = str()\n",
+ " _ap = createSyntheticUncertainTransaction(100000, 870, 10)\n",
+ " _ap.createUncertainTransactionalDatabase(\"T10_uncertain.txt\")\n",
+ "else:\n",
+ " print(\"Error! The number of input parameters do not match the total number of parameters provided\")"
+ ]
+ }
+ ]
+}
\ No newline at end of file
From 58e8a0836a2aad5d1f13aa48c738727b9be31d5c Mon Sep 17 00:00:00 2001
From: Avvari1830S <76546836+Avvari1830S@users.noreply.github.com>
Date: Wed, 31 Jan 2024 22:43:59 +0900
Subject: [PATCH 09/10] Created using Colaboratory
---
...yntheticGeoreferentialUncertainTransaction | 115 ++++++++++++++++++
1 file changed, 115 insertions(+)
create mode 100644 notebooks/extras/SyntheticDataGenerators/createSyntheticGeoreferentialUncertainTransaction
diff --git a/notebooks/extras/SyntheticDataGenerators/createSyntheticGeoreferentialUncertainTransaction b/notebooks/extras/SyntheticDataGenerators/createSyntheticGeoreferentialUncertainTransaction
new file mode 100644
index 00000000..e3ff178c
--- /dev/null
+++ b/notebooks/extras/SyntheticDataGenerators/createSyntheticGeoreferentialUncertainTransaction
@@ -0,0 +1,115 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "provenance": [],
+ "authorship_tag": "ABX9TyNQFi8Ix9MUHg+zbJ3JkvBd",
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ "
"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "47uCALmhbxOB"
+ },
+ "outputs": [],
+ "source": [
+ "import random as _rd\n",
+ "import sys as _sys\n",
+ "\n",
+ "\n",
+ "class createSyntheticGeoreferentialUncertainTransaction:\n",
+ " \"\"\"\n",
+ " This class is to create synthetic geo-referential uncertain transaction database.\n",
+ "\n",
+ " Attribute:\n",
+ " ----------\n",
+ " totalTransactions : int\n",
+ " No of transactions\n",
+ " noOfItems : int\n",
+ " No of items\n",
+ " avgTransactionLength : int\n",
+ " The length of average transaction\n",
+ " outputFile: str\n",
+ " Name of the output file.\n",
+ "\n",
+ " Methods:\n",
+ " --------\n",
+ " createGeoreferentialuncertainTransactionDatabase(outputFile)\n",
+ " Create geo-referential transactional database store into outputFile\n",
+ "\n",
+ " Credits:\n",
+ " ---------\n",
+ " The complete program was written by P.Likhitha under the supervision of Professor Rage Uday Kiran.\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ " \"\"\"\n",
+ "\n",
+ " def __init__(self, transactions: int, items: int, avgTransaction: int) -> None:\n",
+ " self._totalTransactions = transactions\n",
+ " self._noOfItems = items\n",
+ " self._avgTransactionLength = avgTransaction\n",
+ "\n",
+ " def createGeoreferentialUncertainTransactionalDatabase(self, outputFile: str) -> None:\n",
+ " \"\"\"\n",
+ " create transactional database and return outputFileName\n",
+ " :param outputFile: file name or path to store database\n",
+ " :type outputFile: str\n",
+ " :return: outputFile name\n",
+ " \"\"\"\n",
+ " writer = open(outputFile, 'w+')\n",
+ " items = []\n",
+ " for i in range(self._noOfItems):\n",
+ " lat = _rd.randint(1, self._noOfItems)\n",
+ " lon = _rd.randint(1, self._noOfItems)\n",
+ " if lat == lon:\n",
+ " lon = _rd.randint(1, self._noOfItems)\n",
+ " stt = '(' + str(lat) + ' ' + str(lon) + ')'\n",
+ " items.append(stt)\n",
+ " for i in range(self._totalTransactions):\n",
+ " length = _rd.randint(1, self._avgTransactionLength + 20)\n",
+ " st = str()\n",
+ " st1 = str()\n",
+ " for i in range(length):\n",
+ " rd = _rd.randint(0, len(items) - 1)\n",
+ " item = items[rd]\n",
+ " probability = _rd.uniform(0, 1)\n",
+ " st = st + str(item) + '\\t'\n",
+ " st1 = st1 + str(probability) + '\\t'\n",
+ " writer.write(\"%s\" % st)\n",
+ " writer.write(\":\")\n",
+ " writer.write(\"%s \\n\" % st1)\n",
+ "\n",
+ "if __name__ == \"__main__\":\n",
+ " _ap = str()\n",
+ " _ap = createSyntheticGeoreferentialUncertainTransaction(100000, 870, 10)\n",
+ " _ap.createGeoreferentialUncertainTransactionalDatabase(\"T10_geo_un.txt\")\n",
+ "else:\n",
+ " print(\"Error! The number of input parameters do not match the total number of parameters provided\")"
+ ]
+ }
+ ]
+}
\ No newline at end of file
From 686e46eb8aaeed68c8be70403feceb22ed547acb Mon Sep 17 00:00:00 2001
From: Avvari1830S <76546836+Avvari1830S@users.noreply.github.com>
Date: Wed, 31 Jan 2024 22:45:51 +0900
Subject: [PATCH 10/10] Created using Colaboratory
---
.../createSyntheticUncertainTemporal | 106 ++++++++++++++++++
1 file changed, 106 insertions(+)
create mode 100644 notebooks/extras/SyntheticDataGenerators/createSyntheticUncertainTemporal
diff --git a/notebooks/extras/SyntheticDataGenerators/createSyntheticUncertainTemporal b/notebooks/extras/SyntheticDataGenerators/createSyntheticUncertainTemporal
new file mode 100644
index 00000000..fff26162
--- /dev/null
+++ b/notebooks/extras/SyntheticDataGenerators/createSyntheticUncertainTemporal
@@ -0,0 +1,106 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "provenance": [],
+ "authorship_tag": "ABX9TyMYgc+UEGUU6P2W55nbp4ab",
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ "
"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "E1AT8uMycpRJ"
+ },
+ "outputs": [],
+ "source": [
+ "import random as _rd\n",
+ "import sys as _sys\n",
+ "\n",
+ "\n",
+ "class createSyntheticUncertainTemporal:\n",
+ " \"\"\"\n",
+ " This class create synthetic temporal database.\n",
+ "\n",
+ " Attribute:\n",
+ " ----------\n",
+ " totalTransactions : int\n",
+ " Total no of transactions\n",
+ " noOfItems : int\n",
+ " No of items\n",
+ " avgTransactionLength : int\n",
+ " The length of average transaction\n",
+ " outputFile: str\n",
+ " Name of the output file.\n",
+ "\n",
+ " Methods:\n",
+ " --------\n",
+ " createUncertainTemporalDatabase(outputFile)\n",
+ " Create temporal database from DataFrame and store into outputFile\n",
+ "\n",
+ " Credits:\n",
+ " ---------\n",
+ " The complete program was written by P.Likhitha under the supervision of Professor Rage Uday Kiran.\n",
+ "\n",
+ "\n",
+ "\n",
+ " \"\"\"\n",
+ "\n",
+ " def __init__(self, totalTransactions: int, items: int, avgTransaction: int) -> None:\n",
+ " self._totalTransactions = totalTransactions\n",
+ " self._noOfItems = items\n",
+ " self._avgTransactionLength = avgTransaction\n",
+ "\n",
+ " def createUncertainTemporalDatabase(self, outputFile: str) -> None:\n",
+ " \"\"\"\n",
+ " create transactional database and return outputFileName\n",
+ " :param outputFile: file name or path to store database\n",
+ " :type outputFile: str\n",
+ " :return: outputFile name\n",
+ " \"\"\"\n",
+ " writer = open(outputFile, 'w+')\n",
+ " count = 1\n",
+ " for i in range(self._totalTransactions):\n",
+ " length = _rd.randint(1, self._avgTransactionLength + 20)\n",
+ " st = str(count) + '\\t'\n",
+ " st1 = str()\n",
+ " for i in range(length):\n",
+ " item = _rd.randint(1, self._noOfItems)\n",
+ " probability = _rd.uniform(0, 1)\n",
+ " st = st + str(item) + '\\t'\n",
+ " st1 = st1 + str(probability) + '\\t'\n",
+ " writer.write(\"%s:\" % st)\n",
+ " writer.write(\"%s \\n\" % st1)\n",
+ " count += 1\n",
+ "\n",
+ "\n",
+ "if __name__ == \"__main__\":\n",
+ " _ap = str()\n",
+ " _ap = createSyntheticUncertainTemporal(50000, 870, 10)\n",
+ " _ap.createUncertainTemporalDatabase(\"T10_uncertain_temp.txt\")\n",
+ "else:\n",
+ " print(\"Error! The number of input parameters do not match the total number of parameters provided\")"
+ ]
+ }
+ ]
+}
\ No newline at end of file