{ "cells": [ { "cell_type": "code", "execution_count": 13, "id": "85bab64d", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[Errno 2] No such file or directory: '../../IRL-MOOC/'\n", "/Users/huonglan/Documents/codeproject/IRL-MOOC\n" ] } ], "source": [ "cd ../../IRL-MOOC/" ] }, { "cell_type": "code", "execution_count": 2, "id": "53d2c43e", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import tensorflow as tf\n", "import numpy as np\n", "import os\n", "import pickle\n", "import models.maxcausal as maxcausal\n", "from utils.data_helper import *\n", "from environment import raw_world as Env" ] }, { "cell_type": "code", "execution_count": 3, "id": "f3039f07", "metadata": {}, "outputs": [], "source": [ "course_id = 'dsp-002'\n", "datadir = 'data/mooc_raw/coursera'" ] }, { "cell_type": "code", "execution_count": 4, "id": "ced9e2a8", "metadata": {}, "outputs": [], "source": [ "with open('trajectories_each_week.pkl', 'rb') as f:\n", " trajectories_each_week = pickle.load(f)\n", "\n", "with open('trajectories_each_week_pass.pkl', 'rb') as f:\n", " trajectories_each_week_pass = pickle.load(f)\n", " \n", "with open('trajectories_each_week_fail.pkl', 'rb') as f:\n", " trajectories_each_week_fail = pickle.load(f)\n", "\n", "with open('trajectories.pkl', 'rb') as f:\n", " trajectories = pickle.load(f)" ] }, { "cell_type": "code", "execution_count": 5, "id": "c6d4d368", "metadata": {}, "outputs": [], "source": [ "with open('history_whatif_fail_300.pkl', 'rb') as f:\n", " history_whatif_fail = pickle.load(f)\n", "\n", "with open('history_whatif_pass_300.pkl', 'rb') as f:\n", " history_whatif_pass = pickle.load(f)" ] }, { "cell_type": "code", "execution_count": 6, "id": "ee098a42", "metadata": {}, "outputs": [], "source": [ "# load combinedg, dict_event, dict_action, map_week, map_event_id, map_action\n", "combinedg = pd.read_csv(f'data/{course_id}/combinedg_features_{course_id}.csv')\n", "with open(f'data/{course_id}/dict_event.pkl', 'rb') as f:\n", " dict_event = pickle.load(f)\n", "with open(f'data/{course_id}/dict_action.pkl', 'rb') as f:\n", " dict_action = pickle.load(f)\n", "with open(f'data/{course_id}/map_week.pkl', 'rb') as f:\n", " map_week = pickle.load(f)\n", "with open(f'data/{course_id}/map_event_id.pkl', 'rb') as f:\n", " map_event_id = pickle.load(f)\n", "with open(f'data/{course_id}/map_action.pkl', 'rb') as f:\n", " map_action = pickle.load(f)\n", "with open(f'data/{course_id}/problem_event.pkl', 'rb') as f:\n", " problem_event = pickle.load(f)\n", "with open(f'data/{course_id}/video_event.pkl', 'rb') as f:\n", " video_event = pickle.load(f)" ] }, { "cell_type": "code", "execution_count": 14, "id": "4df5608e", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/Users/huonglan/Documents/codeproject/IRL-MOOC/utils/data_helper.py:247: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " video_length['duration'] = (video_length['duration']-min_len)/(max_len-min_len)\n", "/Users/huonglan/Documents/codeproject/IRL-MOOC/utils/data_helper.py:252: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.\n", "The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.\n", "\n", "For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.\n", "\n", "\n", " event_value['duration'].fillna(event_value['duration'].mean(), inplace=True)\n" ] } ], "source": [ "schedule = pd.read_csv(f'{datadir}/schedule/{course_id}.csv')\n", "values = whatif_values(combinedg, schedule, map_event_id=map_event_id, problem_event=problem_event)" ] }, { "cell_type": "code", "execution_count": 21, "id": "f2f688b1", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['video' 'problem']\n" ] } ], "source": [ "print(schedule.type.unique())" ] }, { "cell_type": "code", "execution_count": 25, "id": "510e39ad", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " Unnamed: 0 id type subtype chapter subchapter date duration \\\n", "0 0 55 video NaN 1 1.0 2013-10-13 202.0 \n", "1 1 21 video NaN 1 1.1 2013-10-13 926.0 \n", "2 2 53 video NaN 2 2.1 2013-10-20 588.0 \n", "3 3 27 video NaN 2 2.2 2013-10-20 648.0 \n", "4 4 25 video NaN 2 2.3 2013-10-20 1061.0 \n", "\n", " grade_max title \\\n", "0 NaN 1.0 - Welcome to the DSP course [3:22] \n", "1 NaN 1.1 - Introduction to signal processing [15:25] \n", "2 NaN 2.1 - Discrete time signals [9:48] \n", "3 NaN 2.2 - The complex exponential [10:48] \n", "4 NaN 2.3 - The Karplus-Strong Algorithm [17:41] \n", "\n", " source event_id \n", "0 DSP Introduction video.mov 22.0 \n", "1 Module 1-h264 for Coursera.mp4 6.0 \n", "2 Module 2_1-h264 for Coursera.mp4 21.0 \n", "3 Module 2_2-h264 for Coursera.mp4 9.0 \n", "4 Module 2_3-h264 for Coursera.mp4 8.0 \n", " chapter count videos count quizzes\n", "0 1 2 2\n", "1 2 3 4\n", "2 3 4 4\n", "3 4 13 10\n", "4 5 12 7\n" ] } ], "source": [ "print(schedule.head(5))\n", "presiquilite_skills = pd.read_csv(f'dsp_prerequisite_skills.csv')\n", "# Count videos and quizzes per chapter\n", "video_counts = schedule[schedule.type == 'video'].groupby('chapter')['type'].count().reset_index()\n", "video_counts.columns = ['chapter', 'count videos']\n", "\n", "quiz_counts = schedule[schedule.type == 'problem'].groupby('chapter')['type'].count().reset_index()\n", "quiz_counts.columns = ['chapter', 'count quizzes']\n", "\n", "# Merge video and quiz counts into one table\n", "count_b = pd.merge(video_counts, quiz_counts, on='chapter', how='outer')\n", "\n", "# Fill missing counts with 0\n", "count_b[['count videos', 'count quizzes']] = count_b[['count videos', 'count quizzes']].fillna(0).astype(int)\n", "print(count_b.head(5))\n", "# Merge with A\n", "df_merged = presiquilite_skills.merge(count_b, left_on='Topic', right_on='chapter', how='left')\n", "\n", "# Optional: count total objects per topic\n", "df_merged['count_objects'] = df_merged['count videos'].fillna(0) + df_merged['count quizzes'].fillna(0)\n", "df_merged['count_objects'] = df_merged['count_objects'].astype(int)\n", "\n", "# Drop unnecessary column\n", "df_merged.drop(columns=['chapter'], inplace=True)\n", "\n", "# Export to CSV\n", "df_merged.to_csv('dsp_prerequisite_skills_2.csv', index=False)" ] }, { "cell_type": "code", "execution_count": null, "id": "6c068109", "metadata": {}, "outputs": [], "source": [ "import streamlit as st\n", "import pandas as pd\n", "import plotly.express as px\n", "\n", "# ---------------------\n", "# Meta Information\n", "# ---------------------\n", "st.set_page_config(page_title=\"DSP Prerequisite Skills\", layout=\"wide\")\n", "st.title(\"📘 DSP Prerequisite Skills Analysis\")\n", "st.markdown(\"\"\"\n", "This dashboard shows the mapping between prerequisite topics and their actual content.\n", "On the left is the skill table; on the right is a bar chart of object counts per topic.\n", "\"\"\")\n", "\n", "# ---------------------\n", "# Load or simulate data\n", "# ---------------------\n", "# Replace this with your actual merged DataFrame\n", "df_merged = pd.DataFrame({\n", " 'Topic': ['Digital Signals', 'FFT', 'Filter Design'],\n", " 'count videos': [5, 3, 4],\n", " 'count quizzes': [2, 1, 3],\n", " 'count_objects': [7, 4, 7]\n", "})\n", "\n", "# ---------------------\n", "# Layout: Two columns\n", "# ---------------------\n", "col1, col2 = st.columns([1, 2]) # Left: Table, Right: Plot\n", "\n", "with col1:\n", " st.subheader(\"📋 Topic Table\")\n", " st.dataframe(df_merged)\n", "\n", "with col2:\n", " st.subheader(\"📊 Content Count per Topic\")\n", " fig = px.bar(\n", " df_merged,\n", " x='Topic',\n", " y=['count videos', 'count quizzes'],\n", " barmode='group',\n", " title=\"Videos and Quizzes per Topic\",\n", " labels={\"value\": \"Count\", \"variable\": \"Content Type\"},\n", " )\n", " st.plotly_chart(fig, use_container_width=True)" ] }, { "cell_type": "code", "execution_count": 7, "id": "22f27762", "metadata": {}, "outputs": [], "source": [ "ids = np.load('/Users/huonglan/Documents/codeproject/IRL-MOOC/results/whatif/dsp-002/test_students_5.npy')" ] }, { "cell_type": "code", "execution_count": 11, "id": "e9979fe1", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Logging: p_transition updated\n", "Skills set: {1: 'Digital Signals', 2: 'Hilbert/Linear Algebra', 3: 'DFT', 4: 'DTFT & DFS', 5: 'Modulation', 6: 'FFT', 7: 'Ideal Filters', 8: 'Filter Design', 9: 'De-Modulation', 10: 'Interpolation & Sampling', 11: 'Multirate', 12: 'Quantization', 13: 'Applications'}\n", "Complexity Level of each Week: {1: 0.0, 2: 0.0, 3: 0.0, 4: 0.42857142857142855, 5: 0.6428571428571429, 6: 0.7857142857142857, 7: 0.8571428571428571, 8: 0.42857142857142855, 9: 0.7857142857142857, 10: 1.0}\n" ] }, { "ename": "AttributeError", "evalue": "'StateManager' object has no attribute 'create_interactive_state_manager'", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", "Cell \u001b[0;32mIn[11], line 16\u001b[0m\n\u001b[1;32m 2\u001b[0m world \u001b[38;5;241m=\u001b[39m Env\u001b[38;5;241m.\u001b[39mClickstreamWorld(trajectories\u001b[38;5;241m=\u001b[39mtrajectories,\n\u001b[1;32m 3\u001b[0m dict_action\u001b[38;5;241m=\u001b[39mdict_action, \n\u001b[1;32m 4\u001b[0m dict_event\u001b[38;5;241m=\u001b[39mdict_event,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 7\u001b[0m values\u001b[38;5;241m=\u001b[39mvalues,\n\u001b[1;32m 8\u001b[0m add_state\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n\u001b[1;32m 9\u001b[0m interactive_state_manager \u001b[38;5;241m=\u001b[39m trajectory_comparison\u001b[38;5;241m.\u001b[39mStateManager(world\u001b[38;5;241m=\u001b[39mworld, trajectories\u001b[38;5;241m=\u001b[39mtrajectories, test_ids\u001b[38;5;241m=\u001b[39mids,\n\u001b[1;32m 10\u001b[0m trajectories_each_week\u001b[38;5;241m=\u001b[39mtrajectories_each_week,\n\u001b[1;32m 11\u001b[0m trajectories_each_week_pass\u001b[38;5;241m=\u001b[39mtrajectories_each_week_pass,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 14\u001b[0m history_whatif_fail\u001b[38;5;241m=\u001b[39mhistory_whatif_fail,\n\u001b[1;32m 15\u001b[0m week_list\u001b[38;5;241m=\u001b[39m[\u001b[38;5;241m6\u001b[39m])\n\u001b[0;32m---> 16\u001b[0m \u001b[43minteractive_state_manager\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcreate_interactive_state_manager\u001b[49m()\n", "\u001b[0;31mAttributeError\u001b[0m: 'StateManager' object has no attribute 'create_interactive_state_manager'" ] } ], "source": [ "import utils.trajectory_comparison as trajectory_comparison\n", "world = Env.ClickstreamWorld(trajectories=trajectories,\n", " dict_action=dict_action, \n", " dict_event=dict_event,\n", " video_arr=video_event,\n", " problem_arr=problem_event,\n", " values=values,\n", " add_state=True)\n", "interactive_state_manager = trajectory_comparison.StateManager(world=world, trajectories=trajectories, test_ids=ids,\n", " trajectories_each_week=trajectories_each_week,\n", " trajectories_each_week_pass=trajectories_each_week_pass,\n", " trajectories_each_week_fail=trajectories_each_week_fail,\n", " history_whatif_pass=history_whatif_pass,\n", " history_whatif_fail=history_whatif_fail,\n", " week_list=[6])\n", "interactive_state_manager.create_interactive_state_manager()" ] }, { "cell_type": "code", "execution_count": null, "id": "e0e2b10b", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "2025-06-22 19:52:18.401 WARNING streamlit.runtime.scriptrunner_utils.script_run_context: Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.459 \n", " \u001b[33m\u001b[1mWarning:\u001b[0m to view this Streamlit app on a browser, run it with the following\n", " command:\n", "\n", " streamlit run /Users/huonglan/miniconda3/envs/irl/lib/python3.12/site-packages/ipykernel_launcher.py [ARGUMENTS]\n", "2025-06-22 19:52:18.459 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.459 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.460 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.460 Session state does not function when running a script without `streamlit run`\n", "2025-06-22 19:52:18.461 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.461 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.461 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.462 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.462 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.462 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.462 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.463 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.463 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.463 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.463 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.463 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.465 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.466 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.466 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.466 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.467 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.467 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.468 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.468 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.469 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.469 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.470 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.470 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.470 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.470 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.470 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.471 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.471 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.471 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.472 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.472 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.473 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.473 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.473 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.473 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.474 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.475 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.475 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.475 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.475 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.476 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.476 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.476 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.476 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.477 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.477 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n", "2025-06-22 19:52:18.482 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n" ] } ], "source": [] }, { "cell_type": "code", "execution_count": 25, "id": "b8184edd", "metadata": {}, "outputs": [], "source": [ "course = 'dsp-002'\n", "scores = pd.DataFrame(columns=['data_5_weeks', 'syn_week_6', 'data_6_weeks', 'model_name'])\n", "DATA_DIR = 'checkpoints/'\n", "model_path = {\n", " 5: 'lstm-bi-32-64-5-1722490972.1859/model.keras_final_e.keras',\n", " 6: 'lstm-bi-32-64-6-1722494926.4949/model.keras_final_e.keras',\n", " 7: 'lstm-bi-32-64-7-1722499225.71723/model.keras_final_e.keras',\n", " 8: 'lstm-bi-32-64-8-1722504182.3553/model.keras_final_e.keras',\n", " 9: 'lstm-bi-32-64-9-1722511435.7777/model.keras_final_e.keras',\n", " 10: 'lstm-bi-32-64-10-1722519098.62673/model.keras_final_e.keras',\n", "}" ] }, { "cell_type": "code", "execution_count": 31, "id": "90a9aa4b", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "course: dsp-002\n", "Test shape: (397, 1000, 26)\n", "\u001b[1m13/13\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m2s\u001b[0m 121ms/step\n", "Scores: {'acc': 0.9118387909319899, 'bac': 0.9051181380871534, 'prec': 0.9653979238754326, 'rec': 0.9177631578947368, 'f1': 0.9409780775716695, 'auc': 0.9051181380871532, 'feature_type': '', 'week_type': 'eq_week', 'course': 'dsp-002', 'model_name': 'Sequential', 'timestamp': 0, 'percentile': 0.6, 'data_balance': 0.7657430730478589}\n" ] } ], "source": [ "from utils.evaluation import *\n", "from utils.rnn_models import *\n", "week = 6\n", "percentile = week / 10\n", "week_type = 'eq_week'\n", "DATA_DIR = 'results/whatif/dsp-002/'\n", "labels = pd.read_csv(f'data/{course}/early-prediction_{course}_labels.csv')['label-pass-fail']\n", "reconstructed_model = tf.keras.models.load_model(f'checkpoints/{model_path[week]}')\n", "score_fail_arr, score_pass_arr = [], []\n", "course_features = np.load(f'{DATA_DIR}/real-data-early-prediction_dsp-002_1to10_ver2.npy_features.npy')\n", "test_ids = np.load(f'{DATA_DIR}/test_students_5.npy')\n", "x_test, y_test = course_features[test_ids, :, :], labels[test_ids]\n", "print('course: ', course)\n", "print('Test shape:', x_test.shape)\n", "scores = evaluate(reconstructed_model, x_test, y_test, week_type, \"\", course, percentile=percentile, current_timestamp=0)\n", "print('Scores:', scores)" ] } ], "metadata": { "kernelspec": { "display_name": "irl", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.2" } }, "nbformat": 4, "nbformat_minor": 5 }