{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":84493,"databundleVersionId":11305158,"sourceType":"competition"}],"dockerImageVersionId":30839,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2025-04-15T11:07:47.293881Z","iopub.execute_input":"2025-04-15T11:07:47.294284Z","iopub.status.idle":"2025-04-15T11:07:48.935099Z","shell.execute_reply.started":"2025-04-15T11:07:47.294242Z","shell.execute_reply":"2025-04-15T11:07:48.933677Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"import gc\nimport glob\nimport warnings\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pylab as plt\nwarnings.simplefilter(\"ignore\")\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-15T11:07:48.936965Z","iopub.execute_input":"2025-04-15T11:07:48.937602Z","iopub.status.idle":"2025-04-15T11:07:51.022242Z","shell.execute_reply.started":"2025-04-15T11:07:48.93755Z","shell.execute_reply":"2025-04-15T11:07:51.020923Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"df_responder = pd.read_csv(\"/kaggle/input/jane-street-real-time-market-data-forecasting/responders.csv\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-15T11:07:51.024038Z","iopub.execute_input":"2025-04-15T11:07:51.024723Z","iopub.status.idle":"2025-04-15T11:07:51.044882Z","shell.execute_reply.started":"2025-04-15T11:07:51.024675Z","shell.execute_reply":"2025-04-15T11:07:51.043402Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"df_submission = pd.read_csv(\"/kaggle/input/jane-street-real-time-market-data-forecasting/sample_submission.csv\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-15T11:07:51.046261Z","iopub.execute_input":"2025-04-15T11:07:51.046753Z","iopub.status.idle":"2025-04-15T11:07:51.064327Z","shell.execute_reply.started":"2025-04-15T11:07:51.046713Z","shell.execute_reply":"2025-04-15T11:07:51.062469Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"df_feature = pd.read_csv(\"/kaggle/input/jane-street-real-time-market-data-forecasting/features.csv\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-15T11:07:51.066489Z","iopub.execute_input":"2025-04-15T11:07:51.066958Z","iopub.status.idle":"2025-04-15T11:07:51.090412Z","shell.execute_reply.started":"2025-04-15T11:07:51.066916Z","shell.execute_reply":"2025-04-15T11:07:51.089034Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"targets = [ f\"responder_{i}\" for i in range(9)]\ncolumns = [\"date_id\", \"time_id\", \"symbol_id\"]\ncolumns.extend(targets)\ndf_targets = pd.read_parquet(\"/kaggle/input/jane-street-real-time-market-data-forecasting/train.parquet\", columns=columns)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-15T11:07:51.093981Z","iopub.execute_input":"2025-04-15T11:07:51.094358Z","iopub.status.idle":"2025-04-15T11:07:57.000626Z","shell.execute_reply.started":"2025-04-15T11:07:51.094327Z","shell.execute_reply":"2025-04-15T11:07:56.999415Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"print (\"All data lenght :\" , len(df_targets))","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-15T11:07:57.002579Z","iopub.execute_input":"2025-04-15T11:07:57.003011Z","iopub.status.idle":"2025-04-15T11:07:57.010328Z","shell.execute_reply.started":"2025-04-15T11:07:57.002963Z","shell.execute_reply":"2025-04-15T11:07:57.008944Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"df= pd.read_parquet(\"/kaggle/input/jane-street-real-time-market-data-forecasting/train.parquet/partition_id=0/part-0.parquet\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-15T11:07:57.011568Z","iopub.execute_input":"2025-04-15T11:07:57.012006Z","iopub.status.idle":"2025-04-15T11:07:59.816964Z","shell.execute_reply.started":"2025-04-15T11:07:57.011967Z","shell.execute_reply":"2025-04-15T11:07:59.815789Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"df","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-15T11:07:59.818184Z","iopub.execute_input":"2025-04-15T11:07:59.818613Z","iopub.status.idle":"2025-04-15T11:08:00.136056Z","shell.execute_reply.started":"2025-04-15T11:07:59.818568Z","shell.execute_reply":"2025-04-15T11:08:00.134967Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"print(\"date_id\",df_targets[\"date_id\"].unique().min(), df_targets[\"date_id\"].unique().max())\nprint(\"time_id\",df_targets[\"time_id\"].unique().min(), df_targets[\"time_id\"].unique().max())\nprint(\"symbol_id\",df_targets[\"symbol_id\"].unique().min(), df_targets[\"symbol_id\"].unique().max())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-15T11:08:00.137078Z","iopub.execute_input":"2025-04-15T11:08:00.137572Z","iopub.status.idle":"2025-04-15T11:08:01.598591Z","shell.execute_reply.started":"2025-04-15T11:08:00.137542Z","shell.execute_reply":"2025-04-15T11:08:01.597441Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"df_targets.groupby(\"date_id\")[\"symbol_id\"].count().plot()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-15T11:08:01.599857Z","iopub.execute_input":"2025-04-15T11:08:01.60026Z","iopub.status.idle":"2025-04-15T11:08:02.755859Z","shell.execute_reply.started":"2025-04-15T11:08:01.600222Z","shell.execute_reply":"2025-04-15T11:08:02.754785Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"plt.figure(figsize=(12,12))\nfor i in range(9):\n    plt.subplot(3, 3, i+1)\n    sns.distplot(df_targets[f\"responder_{i}\"])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-04-15T11:08:02.757014Z","iopub.execute_input":"2025-04-15T11:08:02.757438Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"df_targets.corr(\"spearman\")[\"responder_6\"].sort_values(ascending=False)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"df_features.dtype","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null}]}