Skip to content

Commit a0f7756

Browse files
committed
making the repository a bit better
1 parent cf62825 commit a0f7756

File tree

3 files changed

+2912
-2969
lines changed

3 files changed

+2912
-2969
lines changed

6.ipynb Anamaly_detation_1DCNN.ipynb

+1-65
Original file line numberDiff line numberDiff line change
@@ -238,20 +238,6 @@
238238
"df.isna().sum()"
239239
]
240240
},
241-
{
242-
"cell_type": "code",
243-
"execution_count": 10,
244-
"metadata": {},
245-
"outputs": [],
246-
"source": [
247-
"# # Convert to datetime\n",
248-
"# df.Date = pd.to_datetime(df.Date,unit='s')\n",
249-
"# # Set Index\n",
250-
"# df = df.set_index('Date')\n",
251-
"# # Convert to freq\n",
252-
"# df = df.asfreq(pd.infer_freq(df.index))"
253-
]
254-
},
255241
{
256242
"cell_type": "code",
257243
"execution_count": 11,
@@ -403,13 +389,7 @@
403389
],
404390
"source": [
405391
"plt.figure(figsize=(30,10))\n",
406-
"plt.plot(df)\n",
407-
"# for year in range(2004,2006):\n",
408-
"# plt.axvline(datetime(year,1,1), color='k', linestyle='--', alpha=0.5)\n",
409-
"# plt.figure(figsize=(10,4))\n",
410-
"# plt.plot(df)\n",
411-
"# for day in range(1,7):\n",
412-
"# plt.axvline(datetime(2016,1,day), color='k', linestyle='--', alpha=0.5)"
392+
"plt.plot(df)"
413393
]
414394
},
415395
{
@@ -514,50 +494,6 @@
514494
" "
515495
]
516496
},
517-
{
518-
"cell_type": "code",
519-
"execution_count": 20,
520-
"metadata": {},
521-
"outputs": [],
522-
"source": [
523-
"# def visualization4(test,anomalies,TIME_STEPS,scaler,axs,col):\n",
524-
"# test[col] =scaler.inverse_transform(test[col].values.reshape(1,-1)).reshape(-1)\n",
525-
"# test['270day_rolling_avg'] = test[col].rolling(270).mean()\n",
526-
"# test['90day_rolling_avg'] = test[col].rolling(90).mean()\n",
527-
"# test['30day_rolling_avg'] = test[col].rolling(30).mean()\n",
528-
"# test = test[~test.index.duplicated()]\n",
529-
"# # print(test)\n",
530-
" \n",
531-
"# sns.lineplot(\n",
532-
"# x= test.index, \n",
533-
"# y= test[col], \n",
534-
"# label=str(col +' price'),ax = axs\n",
535-
"# )\n",
536-
"\n",
537-
"# sns.scatterplot(\n",
538-
"# x= anomalies.index,\n",
539-
"# # y= anomalies[col],#scaler.inverse_transform(anomalies[col].values.reshape(1,-1)).reshape(-1),\n",
540-
"# y=scaler.inverse_transform(anomalies[col].values.reshape(1,-1)).reshape(-1),\n",
541-
"# color=sns.color_palette()[3],\n",
542-
"# s=52,\n",
543-
"# label='anomaly',ax = axs\n",
544-
"# )\n",
545-
"# # plot using rolling average\n",
546-
"# # sns.lineplot( x = test[col].index,\n",
547-
"# # y = '30day_rolling_avg',\n",
548-
"# # data = test,\n",
549-
"# # label = '30 Rolling avg',ax = axs)\n",
550-
"# # sns.lineplot( x = test[col].index,\n",
551-
"# # y = '90day_rolling_avg',\n",
552-
"# # data = test,\n",
553-
"# # label = '90 Rolling avg',ax = axs)\n",
554-
"# # sns.lineplot( x = test[col].index,\n",
555-
"# # y = '270day_rolling_avg',\n",
556-
"# # data = test,\n",
557-
"# # label = '270 Rolling avg',ax = axs) \n",
558-
" "
559-
]
560-
},
561497
{
562498
"cell_type": "code",
563499
"execution_count": 21,

0 commit comments

Comments
 (0)