Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,706 changes: 1,706 additions & 0 deletions machine-learning/notebooks/sql/OML4SQL Anomaly Detection MSET.json

Large diffs are not rendered by default.

245 changes: 73 additions & 172 deletions machine-learning/notebooks/sql/OML4SQL Anomaly Detection SVM.json
100644 → 100755

Large diffs are not rendered by default.

387 changes: 153 additions & 234 deletions machine-learning/notebooks/sql/OML4SQL Association Rules Apriori.json
100644 → 100755

Large diffs are not rendered by default.

112 changes: 55 additions & 57 deletions machine-learning/notebooks/sql/OML4SQL Attribute Importance MDL.json
100644 → 100755

Large diffs are not rendered by default.

671 changes: 135 additions & 536 deletions machine-learning/notebooks/sql/OML4SQL Classification DT.json
100644 → 100755

Large diffs are not rendered by default.

768 changes: 185 additions & 583 deletions machine-learning/notebooks/sql/OML4SQL Classification GLM.json
100644 → 100755

Large diffs are not rendered by default.

638 changes: 124 additions & 514 deletions machine-learning/notebooks/sql/OML4SQL Classification NB.json
100644 → 100755

Large diffs are not rendered by default.

667 changes: 171 additions & 496 deletions machine-learning/notebooks/sql/OML4SQL Classification NN.json
100644 → 100755

Large diffs are not rendered by default.

985 changes: 452 additions & 533 deletions machine-learning/notebooks/sql/OML4SQL Classification RF.json
100644 → 100755

Large diffs are not rendered by default.

678 changes: 143 additions & 535 deletions machine-learning/notebooks/sql/OML4SQL Classification SVM.json
100644 → 100755

Large diffs are not rendered by default.

2,276 changes: 2,276 additions & 0 deletions machine-learning/notebooks/sql/OML4SQL Classification XGBoost.json

Large diffs are not rendered by default.

299 changes: 144 additions & 155 deletions machine-learning/notebooks/sql/OML4SQL Clustering EM.json
100644 → 100755

Large diffs are not rendered by default.

303 changes: 150 additions & 153 deletions machine-learning/notebooks/sql/OML4SQL Clustering KM.json
100644 → 100755

Large diffs are not rendered by default.

288 changes: 147 additions & 141 deletions machine-learning/notebooks/sql/OML4SQL Clustering OC.json
100644 → 100755

Large diffs are not rendered by default.

63 changes: 32 additions & 31 deletions machine-learning/notebooks/sql/OML4SQL Data Cleaning Duplicates Removal.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"paragraphs": [
{
"text": "%md\n\n## OML4SQL Data Cleaning: Duplicates Removal\nIn this notebook, we demonstrate how to remove duplicate records using Oracle SQL.\n\nWe use the customer insurance lifetime value data set which contains customer financial information, lifetime value, and whether or not the customer bought insurance.\n\nThe dataset `CUSTOMER_INSURANCE_LTV_SQL` is generated by the `\"OML Run-me-first\"` notebook, which `MUST` be run before this notebook.\n\n---\n\n##### `IMPORTANT`: The `\"OML Run-me-first\"` notebook is available under the menu Templates -\u003e Examples and is a pre-requisite to the current notebook.\n\n---\nCopyright (c) 2022 Oracle Corporation \n###### \u003ca href\u003d\"https://oss.oracle.com/licenses/upl/\" onclick\u003d\"return ! window.open(\u0027https://oss.oracle.com/licenses/upl/\u0027);\"\u003eThe Universal Permissive License (UPL), Version 1.0\u003c/a\u003e\n---",
"text": "%md\n\n## OML4SQL Data Cleaning: Duplicates Removal\nIn this notebook, we demonstrate how to remove duplicate records using Oracle SQL.\n\nWe use the customer insurance lifetime value data set which contains customer financial information, lifetime value, and whether or not the customer bought insurance.\n\nThe dataset `CUSTOMER_INSURANCE_LTV_SQL` is generated by the `\"OML Run-me-first\"` notebook, which `MUST` be run before this notebook.\n\n---\n\n##### `IMPORTANT`: The `\"OML Run-me-first\"` notebook is available under the menu Templates -\u003e Examples and is a pre-requisite to the current notebook.\n\n---\nCopyright (c) 2023 Oracle Corporation \n###### \u003ca href\u003d\"https://oss.oracle.com/licenses/upl/\" onclick\u003d\"return ! window.open(\u0027https://oss.oracle.com/licenses/upl/\u0027);\"\u003eThe Universal Permissive License (UPL), Version 1.0\u003c/a\u003e\n---",
"user": "OMLUSER",
"dateUpdated": "2022-03-10T18:04:40+0000",
"dateUpdated": "2023-02-17T22:48:27+0000",
"progress": 0,
"config": {
"editorSetting": {
Expand All @@ -26,7 +26,7 @@
"msg": [
{
"type": "HTML",
"data": "\u003ch2\u003eOML4SQL Data Cleaning: Duplicates Removal\u003c/h2\u003e\n\u003cp\u003eIn this notebook, we demonstrate how to remove duplicate records using Oracle SQL.\u003c/p\u003e\n\u003cp\u003eWe use the customer insurance lifetime value data set which contains customer financial information, lifetime value, and whether or not the customer bought insurance.\u003c/p\u003e\n\u003cp\u003eThe dataset \u003ccode\u003eCUSTOMER_INSURANCE_LTV_SQL\u003c/code\u003e is generated by the \u003ccode\u003e\"OML Run-me-first\"\u003c/code\u003e notebook, which \u003ccode\u003eMUST\u003c/code\u003e be run before this notebook.\u003c/p\u003e\n\u003chr /\u003e\n\u003ch5\u003e\u003ccode\u003eIMPORTANT\u003c/code\u003e: The \u003ccode\u003e\"OML Run-me-first\"\u003c/code\u003e notebook is available under the menu Templates -\u003e Examples and is a pre-requisite to the current notebook.\u003c/h5\u003e\n\u003chr /\u003e\n\u003cp\u003eCopyright (c) 2022 Oracle Corporation\u003c/p\u003e\n\u003ch6\u003e\u003ca href\u003d\"https: //oss.oracle.com/licenses/upl/\" onclick\u003d\"return ! window.open(\u0027https://oss.oracle.com/licenses/upl/\u0027);\"\u003eThe Universal Permissive License (UPL), Version 1.0\u003c/a\u003e\u003c/h6\u003e\n\u003chr /\u003e\n"
"data": "\u003ch2\u003eOML4SQL Data Cleaning: Duplicates Removal\u003c/h2\u003e\n\u003cp\u003eIn this notebook, we demonstrate how to remove duplicate records using Oracle SQL.\u003c/p\u003e\n\u003cp\u003eWe use the customer insurance lifetime value data set which contains customer financial information, lifetime value, and whether or not the customer bought insurance.\u003c/p\u003e\n\u003cp\u003eThe dataset \u003ccode\u003eCUSTOMER_INSURANCE_LTV_SQL\u003c/code\u003e is generated by the \u003ccode\u003e\"OML Run-me-first\"\u003c/code\u003e notebook, which \u003ccode\u003eMUST\u003c/code\u003e be run before this notebook.\u003c/p\u003e\n\u003chr /\u003e\n\u003ch5\u003e\u003ccode\u003eIMPORTANT\u003c/code\u003e: The \u003ccode\u003e\"OML Run-me-first\"\u003c/code\u003e notebook is available under the menu Templates -\u003e Examples and is a pre-requisite to the current notebook.\u003c/h5\u003e\n\u003chr /\u003e\n\u003cp\u003eCopyright (c) 2023 Oracle Corporation\u003c/p\u003e\n\u003ch6\u003e\u003ca href\u003d\"https: //oss.oracle.com/licenses/upl/\" onclick\u003d\"return ! window.open(\u0027https://oss.oracle.com/licenses/upl/\u0027);\"\u003eThe Universal Permissive License (UPL), Version 1.0\u003c/a\u003e\u003c/h6\u003e\n\u003chr /\u003e\n"
}
]
},
Expand All @@ -37,15 +37,15 @@
"jobName": "paragraph_1643055260594_1485145827",
"id": "20220124-201420_1737538741",
"dateCreated": "2020-12-15T19:55:22+0000",
"dateStarted": "2022-03-10T18:04:40+0000",
"dateFinished": "2022-03-10T18:04:42+0000",
"dateStarted": "2023-02-17T22:48:28+0000",
"dateFinished": "2023-02-17T22:48:28+0000",
"status": "FINISHED"
},
{
"title": "Check the number of distinct customer id",
"text": "%sql\n\nSELECT COUNT(DISTINCT CUSTOMER_ID)\nFROM CUSTOMER_INSURANCE_LTV_SQL",
"text": "%sql\n\nSELECT COUNT(DISTINCT CUSTOMER_ID)\nFROM CUSTOMER_INSURANCE_LTV_SQL;\n",
"user": "OMLUSER",
"dateUpdated": "2022-03-10T18:04:42+0000",
"dateUpdated": "2023-02-17T22:48:28+0000",
"progress": 0,
"config": {
"editorSetting": {
Expand Down Expand Up @@ -109,15 +109,15 @@
"jobName": "paragraph_1643055260594_-237074473",
"id": "20220124-201420_607917003",
"dateCreated": "2020-11-16T18:14:20+0000",
"dateStarted": "2022-03-10T18:04:42+0000",
"dateFinished": "2022-03-10T18:04:52+0000",
"dateStarted": "2023-02-17T22:48:28+0000",
"dateFinished": "2023-02-17T22:48:34+0000",
"status": "FINISHED"
},
{
"title": "Check the number of total rows in the table. There are duplicated rows",
"text": "%sql\n\nSELECT COUNT(1) FROM CUSTOMER_INSURANCE_LTV_SQL",
"text": "%sql\n\nSELECT COUNT(1) FROM CUSTOMER_INSURANCE_LTV_SQL;\n",
"user": "OMLUSER",
"dateUpdated": "2022-03-10T18:04:52+0000",
"dateUpdated": "2023-02-17T22:48:34+0000",
"progress": 0,
"config": {
"editorSetting": {
Expand Down Expand Up @@ -181,17 +181,18 @@
"jobName": "paragraph_1643055260594_243141663",
"id": "20220124-201420_1221297865",
"dateCreated": "2020-11-16T18:15:09+0000",
"dateStarted": "2022-03-10T18:04:53+0000",
"dateFinished": "2022-03-10T18:04:53+0000",
"dateStarted": "2023-02-17T22:48:34+0000",
"dateFinished": "2023-02-17T22:48:34+0000",
"status": "FINISHED"
},
{
"title": "Create a view with all distinct rows",
"text": "%sql\n\nCREATE OR REPLACE VIEW CUSTOMER_INSURANCE_LTV_SQL_UNIQUE AS \nselect *\nfrom CUSTOMER_INSURANCE_LTV_SQL\nwhere rowid in (\n\n select max(rowid) row_id\n from (\n select customer_id, rowid\n from CUSTOMER_INSURANCE_LTV_SQL\n )\n group by customer_id\n ) ",
"text": "%sql\n\nCREATE OR REPLACE VIEW CUSTOMER_INSURANCE_LTV_SQL_UNIQUE AS \nSELECT *\nFROM CUSTOMER_INSURANCE_LTV_SQL\nWHERE rowid IN (\n\n SELECT max(rowid) row_id\n FROM (\n SELECT customer_id, rowid\n FROM CUSTOMER_INSURANCE_LTV_SQL\n )\n GROUP BY customer_id\n ) \n ",
"user": "OMLUSER",
"dateUpdated": "2022-03-10T18:04:53+0000",
"dateUpdated": "2023-02-17T22:48:34+0000",
"progress": 0,
"config": {
"tableHide": false,
"editorSetting": {
"language": "sql",
"editOnDblClick": false,
Expand Down Expand Up @@ -248,15 +249,15 @@
"jobName": "paragraph_1643055260594_1721622550",
"id": "20220124-201420_1092363726",
"dateCreated": "2020-11-16T22:15:15+0000",
"dateStarted": "2022-03-10T18:04:54+0000",
"dateFinished": "2022-03-10T18:04:54+0000",
"dateStarted": "2023-02-17T22:48:34+0000",
"dateFinished": "2023-02-17T22:48:34+0000",
"status": "FINISHED"
},
{
"title": "Check the number of rows in the table. All rows are distinct",
"text": "%sql\n\nSELECT COUNT(1) FROM CUSTOMER_INSURANCE_LTV_SQL_UNIQUE",
"text": "%sql\n\nSELECT COUNT(1) FROM CUSTOMER_INSURANCE_LTV_SQL_UNIQUE;\n",
"user": "OMLUSER",
"dateUpdated": "2022-03-10T18:04:54+0000",
"dateUpdated": "2023-02-17T22:48:34+0000",
"progress": 0,
"config": {
"editorSetting": {
Expand Down Expand Up @@ -320,15 +321,15 @@
"jobName": "paragraph_1643055260594_376637058",
"id": "20220124-201420_587942988",
"dateCreated": "2020-11-16T18:18:28+0000",
"dateStarted": "2022-03-10T18:04:54+0000",
"dateFinished": "2022-03-10T18:04:54+0000",
"dateStarted": "2023-02-17T22:48:35+0000",
"dateFinished": "2023-02-17T22:48:35+0000",
"status": "FINISHED"
},
{
"title": "Check the number of distinct CUSTOMER_ID in the table",
"text": "%sql\n\nSELECT COUNT(DISTINCT CUSTOMER_ID) FROM CUSTOMER_INSURANCE_LTV_SQL_UNIQUE",
"text": "%sql\n\nSELECT COUNT(DISTINCT CUSTOMER_ID) FROM CUSTOMER_INSURANCE_LTV_SQL_UNIQUE;\n",
"user": "OMLUSER",
"dateUpdated": "2022-03-10T18:04:54+0000",
"dateUpdated": "2023-02-17T22:48:35+0000",
"progress": 0,
"config": {
"editorSetting": {
Expand Down Expand Up @@ -392,14 +393,14 @@
"jobName": "paragraph_1643055260594_-313119734",
"id": "20220124-201420_1743626669",
"dateCreated": "2020-11-16T18:18:40+0000",
"dateStarted": "2022-03-10T18:04:55+0000",
"dateFinished": "2022-03-10T18:04:55+0000",
"dateStarted": "2023-02-17T22:48:35+0000",
"dateFinished": "2023-02-17T22:48:35+0000",
"status": "FINISHED"
},
{
"text": "%md\n\n# End of Script\n",
"user": "OMLUSER",
"dateUpdated": "2022-03-10T18:04:55+0000",
"dateUpdated": "2023-02-17T22:48:35+0000",
"progress": 0,
"config": {
"editorSetting": {
Expand Down Expand Up @@ -434,14 +435,14 @@
"jobName": "paragraph_1643055260594_-1452388910",
"id": "20220124-201420_1929682519",
"dateCreated": "2020-11-17T00:34:19+0000",
"dateStarted": "2022-03-10T18:04:56+0000",
"dateFinished": "2022-03-10T18:04:56+0000",
"dateStarted": "2023-02-17T22:48:35+0000",
"dateFinished": "2023-02-17T22:48:35+0000",
"status": "FINISHED"
},
{
"text": "%md\n",
"user": "OMLUSER",
"dateUpdated": "2022-03-10T18:04:56+0000",
"dateUpdated": "2023-02-17T22:48:35+0000",
"progress": 0,
"config": {
"editorSetting": {
Expand Down Expand Up @@ -470,8 +471,8 @@
"jobName": "paragraph_1643055260594_1463615022",
"id": "20220124-201420_1402402732",
"dateCreated": "2020-12-15T19:58:03+0000",
"dateStarted": "2022-03-10T18:04:56+0000",
"dateFinished": "2022-03-10T18:04:56+0000",
"dateStarted": "2023-02-17T22:48:35+0000",
"dateFinished": "2023-02-17T22:48:35+0000",
"status": "FINISHED"
}
],
Expand Down
Loading