{"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"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Checking directory configuration","metadata":{}},{"cell_type":"code","source":"!ls ../input/predict-ai-model-runtime/npz_all/npz","metadata":{"execution":{"iopub.status.busy":"2023-08-30T02:00:19.945360Z","iopub.execute_input":"2023-08-30T02:00:19.945832Z","iopub.status.idle":"2023-08-30T02:00:21.047619Z","shell.execute_reply.started":"2023-08-30T02:00:19.945797Z","shell.execute_reply":"2023-08-30T02:00:21.046252Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!ls ../input/predict-ai-model-runtime/npz_all/npz/layout","metadata":{"execution":{"iopub.status.busy":"2023-08-30T02:00:21.051239Z","iopub.execute_input":"2023-08-30T02:00:21.051799Z","iopub.status.idle":"2023-08-30T02:00:22.156553Z","shell.execute_reply.started":"2023-08-30T02:00:21.051726Z","shell.execute_reply":"2023-08-30T02:00:22.154952Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!ls ../input/predict-ai-model-runtime/npz_all/npz/layout/nlp","metadata":{"execution":{"iopub.status.busy":"2023-08-30T02:00:22.158404Z","iopub.execute_input":"2023-08-30T02:00:22.158831Z","iopub.status.idle":"2023-08-30T02:00:23.269614Z","shell.execute_reply.started":"2023-08-30T02:00:22.158795Z","shell.execute_reply":"2023-08-30T02:00:23.268290Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!ls ../input/predict-ai-model-runtime/npz_all/npz/layout/nlp/default","metadata":{"execution":{"iopub.status.busy":"2023-08-30T02:00:23.273015Z","iopub.execute_input":"2023-08-30T02:00:23.273415Z","iopub.status.idle":"2023-08-30T02:00:24.377579Z","shell.execute_reply.started":"2023-08-30T02:00:23.273381Z","shell.execute_reply":"2023-08-30T02:00:24.376000Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!ls ../input/predict-ai-model-runtime/npz_all/npz/layout/nlp/default/train","metadata":{"execution":{"iopub.status.busy":"2023-08-30T02:00:24.379630Z","iopub.execute_input":"2023-08-30T02:00:24.380155Z","iopub.status.idle":"2023-08-30T02:00:25.496981Z","shell.execute_reply.started":"2023-08-30T02:00:24.380110Z","shell.execute_reply":"2023-08-30T02:00:25.495627Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# EDA of albert_en_base_batch_size_16_train.npz","metadata":{}},{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns","metadata":{"execution":{"iopub.status.busy":"2023-08-30T02:00:25.499481Z","iopub.execute_input":"2023-08-30T02:00:25.499893Z","iopub.status.idle":"2023-08-30T02:00:25.506408Z","shell.execute_reply.started":"2023-08-30T02:00:25.499860Z","shell.execute_reply":"2023-08-30T02:00:25.505244Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Function to plot histograms for 1D arrays\ndef plot_histogram(data, title, xlabel, ylabel):\n    plt.figure(figsize=(10, 6))\n    sns.histplot(data, bins=30, kde=True)\n    plt.title(title)\n    plt.xlabel(xlabel)\n    plt.ylabel(ylabel)\n    plt.show()","metadata":{"execution":{"iopub.status.busy":"2023-08-30T02:00:25.508325Z","iopub.execute_input":"2023-08-30T02:00:25.508705Z","iopub.status.idle":"2023-08-30T02:00:25.520242Z","shell.execute_reply.started":"2023-08-30T02:00:25.508672Z","shell.execute_reply":"2023-08-30T02:00:25.518729Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Load the .npz file\nnpz_file_path = '/kaggle/input/predict-ai-model-runtime/npz_all/npz/layout/nlp/default/train/albert_en_base_batch_size_16_train.npz'\nnpz_data = np.load(npz_file_path)\n\n# Plot histogram for node_opcode\nplot_histogram(npz_data['node_opcode'], 'Distribution of Node Opcodes', 'Opcode', 'Frequency')\n\n# Plot histogram for config_runtime\nplot_histogram(npz_data['config_runtime'], 'Distribution of Config Runtime', 'Runtime', 'Frequency')\n\n# Plot some sample histograms for node_feat (first 5 features)\nfor i in range(5):\n    plot_histogram(npz_data['node_feat'][:, i], f'Distribution of Node Feature {i+1}', f'Feature {i+1}', 'Frequency')","metadata":{"execution":{"iopub.status.busy":"2023-08-30T02:00:25.522112Z","iopub.execute_input":"2023-08-30T02:00:25.522518Z","iopub.status.idle":"2023-08-30T02:00:28.727530Z","shell.execute_reply.started":"2023-08-30T02:00:25.522472Z","shell.execute_reply":"2023-08-30T02:00:28.726627Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Node Opcodes (`node_opcode`)\n- The operation codes (opcodes) are distributed in the wide range of 0-100.\n\n### Config Runtime (`config_runtime`)\n- The runtime values are distributed between 2.15 * 10^7 and 2.31 * 10^7. There's no distinct peak, but the data is slightly right-skewed.\n\n### Node Features (`node_feat`)\n- Histograms were plotted for the first 5 features.\n- Features 1 and 5 exhibit a continuous distribution.\n- Features 2 and 3 are all zeros.\n- Feature 4 appears to be categorical (either 0 or 1).\n\nThrough this EDA, we have revealed the basic characteristics and distributions of each feature and target variable. The next step could involve investigating the correlations between features, as well as the relationship between the features and the target variables.","metadata":{}},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}],"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}}