Skip to content

Commit

Permalink
add speed test
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbohne123 committed Dec 13, 2023
1 parent e021010 commit 5329804
Showing 1 changed file with 46 additions and 2 deletions.
48 changes: 46 additions & 2 deletions spark_pipelines/ExamplePipelines.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 28,
"id": "752eb795",
"metadata": {},
"outputs": [],
Expand All @@ -19,7 +19,7 @@
"import pandas as pd\n",
"from pathlib import Path\n",
"from sklearn.pipeline import make_pipeline\n",
"\n",
"import time\n",
"from generators import *\n",
"from clean_data import *\n",
"from preprocess_data import *\n",
Expand Down Expand Up @@ -50,6 +50,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "e915186b",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -71,6 +72,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "e9588a02",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -2432,6 +2434,48 @@
"## 2.1 Generating Features"
]
},
{
"cell_type": "code",
"execution_count": 31,
"id": "0899db27",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"60.85968780517578\n"
]
}
],
"source": [
"start=time.time()\n",
"val=getAutoCovariance(df_prepared.reset_index()[:1000], 1, 10,\"volume\")\n",
"end=time.time()\n",
"print(end-start)"
]
},
{
"cell_type": "code",
"execution_count": 33,
"id": "48a90b44",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.1977696418762207\n"
]
}
],
"source": [
"start=time.time()\n",
"val=getAutoCovariance2(df_prepared.reset_index()[:1000], 1, 10,\"volume\")\n",
"end=time.time()\n",
"print(end-start)"
]
},
{
"attachments": {},
"cell_type": "markdown",
Expand Down

0 comments on commit 5329804

Please sign in to comment.