{ "cells": [ { "cell_type": "markdown", "id": "fe1e3c26-5d02-416f-a468-24c044b80592", "metadata": {}, "source": [ "# Part 3 - Modeling of Free Doctor with AI\r\n" ] }, { "cell_type": "code", "execution_count": 72, "id": "e5354d8e-f1b5-432d-a079-5f177a3fb438", "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 73, "id": "94d9a4b0-f9fd-4e27-8f0f-7782538c4a64", "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv(\"../2-Data/dialogues_embededd.csv\", sep = '\\t')" ] }, { "cell_type": "code", "execution_count": 74, "id": "cfd159ba-529b-45b6-b4a4-bacce9a59e2e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(480, 1)" ] }, "execution_count": 74, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.shape" ] }, { "cell_type": "code", "execution_count": 75, "id": "38625075-4aa7-4157-87df-fe813af57933", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Description,Patient,Doctor,combined,n_tokens,embedding
0Q. What does abutment of the nerve root mean?,...
15.47807328e-02 -1.21358521e-01 2.07694232e-...
2-1.16424695e-01 9.98343900e-02 2.16664016e-...
3-3.46464328e-02 -2.58172810e-01 -1.97700247e-...
4-1.25617221e-01 -5.18234149e-02 -3.13789278e-...
......
4759.41688716e-02 1.84736550e-01 1.91770360e-...
476-2.40704566e-01 1.08602822e-01 1.88638419e-...
477-1.51312817e-02 1.52006894e-01 -6.04057573e-...
478-1.43863291e-01 3.51222754e-01 3.39524925e-...
479-2.97551930e-01 -1.77235723e-01 -5.60616851e-...
\n", "

480 rows × 1 columns

\n", "
" ], "text/plain": [ " Description,Patient,Doctor,combined,n_tokens,embedding\n", "0 Q. What does abutment of the nerve root mean?,... \n", "1 5.47807328e-02 -1.21358521e-01 2.07694232e-... \n", "2 -1.16424695e-01 9.98343900e-02 2.16664016e-... \n", "3 -3.46464328e-02 -2.58172810e-01 -1.97700247e-... \n", "4 -1.25617221e-01 -5.18234149e-02 -3.13789278e-... \n", ".. ... \n", "475 9.41688716e-02 1.84736550e-01 1.91770360e-... \n", "476 -2.40704566e-01 1.08602822e-01 1.88638419e-... \n", "477 -1.51312817e-02 1.52006894e-01 -6.04057573e-... \n", "478 -1.43863291e-01 3.51222754e-01 3.39524925e-... \n", "479 -2.97551930e-01 -1.77235723e-01 -5.60616851e-... \n", "\n", "[480 rows x 1 columns]" ] }, "execution_count": 75, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df" ] }, { "cell_type": "markdown", "id": "935b3cb0-346d-4248-bb9c-ed642963080d", "metadata": {}, "source": [ "In ordering to create our model, we need to create an additional feature that is the Relevance" ] }, { "cell_type": "code", "execution_count": null, "id": "716785c7-81ce-42d5-bca4-2003e5ac2ddd", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python3 (GPT)", "language": "python", "name": "gpt" }, "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.10.11" } }, "nbformat": 4, "nbformat_minor": 5 }