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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions UseCases/Anomaly_Detection/Anomaly_Detection_PY_SQL.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@
"metadata": {},
"outputs": [],
"source": [
"%%capture\n",
"# # '%%capture' suppresses the display of installation steps of the following packages\n",
"# %%capture suppresses the display of installation steps of the following packages\n",
"# !pip install tdsense\n",
"# !pip install imblearn\n",
"# !pip install xgboost==1.7.3\n",
Expand Down Expand Up @@ -175,7 +174,7 @@
"outputs": [],
"source": [
"%%capture\n",
"execute_sql('''SET query_band='DEMO=AnomalyDetection.ipynb;' UPDATE FOR SESSION; ''')"
"execute_sql('''SET query_band='DEMO=AnomalyDetection_PY_SQL.ipynb;' UPDATE FOR SESSION; ''')"
]
},
{
Expand Down Expand Up @@ -457,6 +456,17 @@
"<p style = 'font-size:16px;font-family:Arial'>Next we calculate the derivative by using the lead function and taking the difference of the lead value and the mean value of the resistance. Applying a window function to smooth the resistance curve helps to eliminate noise and makes it easier to see the overall trend. The derivative of the resistance gives an indication of how quickly the resistance is changing, which can be a useful measure for detecting anomalies and predicting potential issues.</p>\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e520bd85-78ba-4356-b7e2-45a431458bd8",
"metadata": {},
"outputs": [],
"source": [
"copy_to_sql(welding_dataset_smooth,table_name='welding_dataset_smooth', if_exists='replace')\n",
"welding_dataset_smooth = DataFrame('welding_dataset_smooth')"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -1934,7 +1944,7 @@
"<div style=\"float:left;margin-top:14px\">ClearScape Analytics™</div>\n",
"<div style=\"float:right;\">\n",
"<div style=\"float:left; margin-top:14px\">\n",
" Copyright © Teradata Corporation - 2023, 2024. All Rights Reserved\n",
" Copyright © Teradata Corporation - 2023, 2024, 2025. All Rights Reserved\n",
"</div>\n",
"</div>\n",
"</footer>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,17 @@
"<p style = 'font-size:16px;font-family:Arial'>Next we calculate the derivative by using the lead function and taking the difference of the lead value and the mean value of the resistance. Applying a window function to smooth the resistance curve helps to eliminate noise and makes it easier to see the overall trend. The derivative of the resistance gives an indication of how quickly the resistance is changing, which can be a useful measure for detecting anomalies and predicting potential issues.</p>\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c494a795-c9bf-4d3b-8ecf-549ba4ad7b79",
"metadata": {},
"outputs": [],
"source": [
"copy_to_sql(welding_dataset_smooth,table_name='welding_dataset_smooth', if_exists='replace')\n",
"welding_dataset_smooth = DataFrame('welding_dataset_smooth')"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down