Skip to content

Commit

Permalink
save changes
Browse files Browse the repository at this point in the history
  • Loading branch information
yul19079 committed Feb 1, 2024
1 parent 28c5478 commit 3f4624f
Show file tree
Hide file tree
Showing 2 changed files with 705 additions and 15 deletions.
34 changes: 19 additions & 15 deletions EDA.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,36 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"raw_data = pd.read_pickle(\"./data/raw_feature.pkl\")"
"import pandas as pd\n",
"import numpy as np\n",
"raw_data = pd.read_pickle(\"./data/raw_feature.pkl\")\n",
"X_train = pd.read_pickle(\"./data/X_train.pkl\")\n",
"y_train = pd.read_pickle(\"./data/y_train.pkl\")\n",
"X_test = pd.read_pickle(\"./data/X_test.pkl\")\n",
"y_test = pd.read_pickle(\"./data/y_test.pkl\")\n",
"\n",
"\n",
"trip_avg_in = y_train.mean(axis = 0)[0]\n",
"trip_avg_out = y_train.mean(axis=0)[1]"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"X_train = pd.read_pickle(\"./data/X_train.pkl\")\n",
"y_train = pd.read_pickle(\"./data/y_train.pkl\")"
]
"source": []
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"trip_avg_in = y_train.mean(axis = 0)[0]\n",
"trip_avg_out = y_train.mean(axis=0)[1]"
]
"source": []
},
{
"cell_type": "code",
Expand All @@ -64,7 +68,7 @@
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x1ed9fc2bd50>"
"<matplotlib.image.AxesImage at 0x17de86c4190>"
]
},
"execution_count": 6,
Expand Down Expand Up @@ -95,7 +99,7 @@
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x1ed9fcdbd50>"
"<matplotlib.image.AxesImage at 0x17de87647d0>"
]
},
"execution_count": 7,
Expand Down Expand Up @@ -417,7 +421,7 @@
"outputs": [],
"source": [
"import sys\n",
"file_path = \"pearson_output.txt\"\n",
"file_path = \"pearson_output_filter0.txt\"\n",
"\n",
"with open(file_path,\"w\") as file:\n",
" original_stdout = sys.stdout\n",
Expand All @@ -427,7 +431,7 @@
" feature_name_list\n",
" for feature_name in feature_name_list:\n",
" temp_feature = get_feature_in_2d(raw_data,feature_name)\n",
" cal_pearson(temp_feature,trip_avg_in,log_text=feature_name)\n",
" cal_pearson(temp_feature,trip_avg_in,log_text=feature_name,filter_zero=True)\n",
" print(\"\")\n",
" sys.stdout = original_stdout"
]
Expand All @@ -451,7 +455,7 @@
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x1edd1903d50>"
"<matplotlib.image.AxesImage at 0x17dff3d47d0>"
]
},
"execution_count": 12,
Expand Down
Loading

0 comments on commit 3f4624f

Please sign in to comment.