{ "cells": [ { "cell_type": "markdown", "id": "2f04eee0-5928-4e74-a754-6dc2e528810c", "metadata": {}, "source": [ "# DNAmFitAgeGaitF" ] }, { "cell_type": "markdown", "id": "a3f514a3-772c-4a14-afdf-5a8376851ff4", "metadata": {}, "source": [ "## Index\n", "1. [Instantiate model class](#Instantiate-model-class)\n", "2. [Define clock metadata](#Define-clock-metadata)\n", "3. [Download clock dependencies](#Download-clock-dependencies)\n", "5. [Load features](#Load-features)\n", "6. [Load weights into base model](#Load-weights-into-base-model)\n", "7. [Load reference values](#Load-reference-values)\n", "8. [Load preprocess and postprocess objects](#Load-preprocess-and-postprocess-objects)\n", "10. [Check all clock parameters](#Check-all-clock-parameters)\n", "10. [Basic test](#Basic-test)\n", "11. [Save torch model](#Save-torch-model)\n", "12. [Clear directory](#Clear-directory)" ] }, { "cell_type": "markdown", "id": "d95fafdc-643a-40ea-a689-200bd132e90c", "metadata": {}, "source": [ "Let's first import some packages:" ] }, { "cell_type": "code", "execution_count": 18, "id": "4adfb4de-cd79-4913-a1af-9e23e9e236c9", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:23.621657Z", "iopub.status.busy": "2025-04-07T17:50:23.621346Z", "iopub.status.idle": "2025-04-07T17:50:25.088787Z", "shell.execute_reply": "2025-04-07T17:50:25.088401Z" } }, "outputs": [], "source": [ "import os\n", "import inspect\n", "import shutil\n", "import json\n", "import torch\n", "import pandas as pd\n", "import numpy as np\n", "import pyaging as pya" ] }, { "cell_type": "markdown", "id": "145082e5-ced4-47ae-88c0-cb69773e3c5a", "metadata": {}, "source": [ "## Instantiate model class" ] }, { "cell_type": "code", "execution_count": 19, "id": "8aa77372-7ed3-4da7-abc9-d30372106139", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:25.090492Z", "iopub.status.busy": "2025-04-07T17:50:25.090265Z", "iopub.status.idle": "2025-04-07T17:50:25.101917Z", "shell.execute_reply": "2025-04-07T17:50:25.101643Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "class DNAmFitAgeGaitF(pyagingModel):\n", " def __init__(self):\n", " super().__init__()\n", "\n", " def preprocess(self, x):\n", " return x\n", " \n", " def postprocess(self, x):\n", " return x\n", "\n" ] } ], "source": [ "def print_entire_class(cls):\n", " source = inspect.getsource(cls)\n", " print(source)\n", "\n", "print_entire_class(pya.models.DNAmFitAgeGaitF)" ] }, { "cell_type": "code", "execution_count": 20, "id": "914a94cf-bf6c-4b9d-862a-a2787842e07e", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:25.103160Z", "iopub.status.busy": "2025-04-07T17:50:25.103071Z", "iopub.status.idle": "2025-04-07T17:50:25.104710Z", "shell.execute_reply": "2025-04-07T17:50:25.104466Z" } }, "outputs": [], "source": [ "model = pya.models.DNAmFitAgeGaitF()" ] }, { "cell_type": "markdown", "id": "51f8615e-01fa-4aa5-b196-3ee2b35d261c", "metadata": {}, "source": [ "## Define clock metadata" ] }, { "cell_type": "code", "execution_count": 21, "id": "6609d6dc-c0a0-4137-bdf5-9fb31ea85281", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:25.105997Z", "iopub.status.busy": "2025-04-07T17:50:25.105908Z", "iopub.status.idle": "2025-04-07T17:50:25.107874Z", "shell.execute_reply": "2025-04-07T17:50:25.107633Z" } }, "outputs": [], "source": [ "model.metadata[\"clock_name\"] = \"dnamfitagegaitf\"\n", "model.metadata[\"data_type\"] = \"DNA methylation\" # Paper: Blood DNA methylation was used to develop the fitness biomarkers.\n", "model.metadata[\"species\"] = \"Homo sapiens\" # Paper: The development cohorts were human adult studies (FHS, BLSA, and Budapest).\n", "model.metadata[\"year\"] = 2023\n", "model.metadata[\"approved_by_author\"] = \"⌛\"\n", "model.metadata[\"citation\"] = \"McGreevy, K. M., et al. “DNAmFitAge: biological age indicator incorporating physical fitness.” Aging 15(10): 3904–3938 (2023).\"\n", "model.metadata[\"doi\"] = \"https://doi.org/10.18632/aging.204538\"\n", "model.metadata[\"notes\"] = \"Female-specific blood DNAm gait-speed estimator without chronological age as an input.\"\n", "model.metadata[\"research_only\"] = None\n", "model.metadata[\"tissue\"] = [\"whole blood\"] # Paper: The biomarkers were developed from blood DNAm data.\n", "model.metadata[\"predicts\"] = [\"gait speed\"] # Paper: The algorithms generate DNAmGaitspeed, DNAmGripmax, or DNAmVO2max estimates in the corresponding physical-fitness scale.\n", "model.metadata[\"training_target\"] = [\"gait speed\"] # Paper: The directly measured fitness parameter was the dependent variable in LASSO regression.\n", "model.metadata[\"unit\"] = [\"meters per second\"] # Paper: Gait speed is measured in m/s, grip force in kg, and VO2max in mL/kg/min.\n", "model.metadata[\"model_type\"] = \"LASSO regression\" # Paper: Each fitness DNAm biomarker was developed using LASSO penalized regression with ten-fold cross-validation.\n", "model.metadata[\"platform\"] = [\"Illumina 450K\"] # Paper: The reported fitness CpG background and fitted loci were on the 450K array.\n", "model.metadata[\"population\"] = \"adult women\" # Paper: The female gait-speed model was fit separately in adult women from the FHS, BLSA, and Budapest development cohorts.\n", "model.metadata[\"journal\"] = \"Aging\"\n", "model.metadata[\"last_author\"] = \"Steve Horvath\"\n", "model.metadata[\"n_features\"] = 53\n", "model.metadata[\"citations\"] = 99\n", "model.metadata[\"citations_date\"] = \"2026-07-05\"\n" ] }, { "cell_type": "markdown", "id": "74492239-5aae-4026-9d90-6bc9c574c110", "metadata": {}, "source": [ "## Download clock dependencies" ] }, { "cell_type": "markdown", "id": "7bec474f-80ce-4884-9472-30c193327117", "metadata": {}, "source": [ "#### Download GitHub repository" ] }, { "cell_type": "code", "execution_count": 22, "id": "aa4a1b59-dda3-4ea8-8f34-b3c53ecbc310", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:25.109229Z", "iopub.status.busy": "2025-04-07T17:50:25.109147Z", "iopub.status.idle": "2025-04-07T17:50:25.651487Z", "shell.execute_reply": "2025-04-07T17:50:25.650965Z" } }, "outputs": [ { "data": { "text/plain": [ "0" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "github_url = \"https://github.com/kristenmcgreevy/DNAmFitAge.git\"\n", "github_folder_name = github_url.split('/')[-1].split('.')[0]\n", "os.system(f\"git clone {github_url}\")" ] }, { "cell_type": "markdown", "id": "6bd15521-363f-4029-99ff-9f0b2ae0ed2e", "metadata": {}, "source": [ "#### Download from R package" ] }, { "cell_type": "code", "execution_count": 23, "id": "f1f9bbe4-cfc8-494c-b910-c96da88afb2b", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:25.653928Z", "iopub.status.busy": "2025-04-07T17:50:25.653723Z", "iopub.status.idle": "2025-04-07T17:50:25.657586Z", "shell.execute_reply": "2025-04-07T17:50:25.657192Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Writing download.r\n" ] } ], "source": [ "%%writefile download.r\n", "\n", "options(repos = c(CRAN = \"https://cloud.r-project.org/\"))\n", "library(jsonlite)\n", "\n", "DNAmFitnessModels <- readRDS(\"DNAmFitAge/DNAmFitnessModelsandFitAge_Oct2022.rds\")\n", "\n", "AllCpGs <- DNAmFitnessModels$AllCpGs\n", "write_json(AllCpGs, \"AllCpGs.json\")\n", "\n", "MaleMedians <- DNAmFitnessModels$Male_Medians_All\n", "write.csv(MaleMedians, \"MaleMedians.csv\")\n", "FemaleMedians <- DNAmFitnessModels$Female_Medians_All\n", "write.csv(FemaleMedians, \"FemaleMedians.csv\")\n", "\n", "Gait_noAge_Females <- DNAmFitnessModels$Gait_noAge_Females\n", "Gait_noAge_Males <- DNAmFitnessModels$Gait_noAge_Males\n", "Grip_noAge_Females <- DNAmFitnessModels$Grip_noAge_Females\n", "Grip_noAge_Males <- DNAmFitnessModels$Grip_noAge_Males\n", "VO2maxModel <- DNAmFitnessModels$VO2maxModel\n", "write.csv(Gait_noAge_Females, \"Gait_noAge_Females.csv\")\n", "write.csv(Gait_noAge_Males, \"Gait_noAge_Males.csv\")\n", "write.csv(Grip_noAge_Females, \"Grip_noAge_Females.csv\")\n", "write.csv(Grip_noAge_Males, \"Grip_noAge_Males.csv\")\n", "write.csv(VO2maxModel, \"VO2maxModel.csv\")" ] }, { "cell_type": "code", "execution_count": 24, "id": "f1965587-a6ac-47ce-bd7a-bb98ca1d91b5", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:25.659496Z", "iopub.status.busy": "2025-04-07T17:50:25.659322Z", "iopub.status.idle": "2025-04-07T17:50:27.279878Z", "shell.execute_reply": "2025-04-07T17:50:27.279562Z" } }, "outputs": [ { "data": { "text/plain": [ "0" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "os.system(\"Rscript download.r\")" ] }, { "cell_type": "markdown", "id": "5035b180-3d1b-4432-8ebe-b9c92bd93a7f", "metadata": {}, "source": [ "## Load features" ] }, { "cell_type": "markdown", "id": "d8025ed7-0013-419b-8cb5-1a2db98f9eba", "metadata": {}, "source": [ "#### From JSON file" ] }, { "cell_type": "code", "execution_count": 25, "id": "c0b63afa", "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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
termstepestimatelambdadev.ratiofeaturecoefficient
1(Intercept)13.9701340.0240.32532(Intercept)3.970134
2cg000945181-0.0586780.0240.32532cg00094518-0.058678
3cg001497161-0.0563790.0240.32532cg00149716-0.056379
4cg004574951-0.1037110.0240.32532cg00457495-0.103711
5cg0062046410.0162430.0240.32532cg006204640.016243
\n", "
" ], "text/plain": [ " term step estimate lambda dev.ratio feature coefficient\n", "1 (Intercept) 1 3.970134 0.024 0.32532 (Intercept) 3.970134\n", "2 cg00094518 1 -0.058678 0.024 0.32532 cg00094518 -0.058678\n", "3 cg00149716 1 -0.056379 0.024 0.32532 cg00149716 -0.056379\n", "4 cg00457495 1 -0.103711 0.024 0.32532 cg00457495 -0.103711\n", "5 cg00620464 1 0.016243 0.024 0.32532 cg00620464 0.016243" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = pd.read_csv('Gait_noAge_Females.csv', index_col=0)\n", "df['feature'] = df['term']\n", "df['coefficient'] = df['estimate']\n", "model.features = df['feature'][1:].tolist()\n", "df.head()" ] }, { "cell_type": "markdown", "id": "ee6d8fa0-4767-4c45-9717-eb1c95e2ddc0", "metadata": {}, "source": [ "## Load weights into base model" ] }, { "cell_type": "code", "execution_count": 27, "id": "8d58875d", "metadata": {}, "outputs": [], "source": [ "weights = torch.tensor(df['coefficient'][1:].tolist()).unsqueeze(0)\n", "intercept = torch.tensor([df['coefficient'].iloc[0]])" ] }, { "cell_type": "markdown", "id": "69901c2b-9584-4de3-a642-ddb6b43d923a", "metadata": {}, "source": [ "#### Linear model" ] }, { "cell_type": "code", "execution_count": 28, "id": "5fb10110-a89a-4caa-a62a-59899ebccd23", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.292804Z", "iopub.status.busy": "2025-04-07T17:50:27.292717Z", "iopub.status.idle": "2025-04-07T17:50:27.302996Z", "shell.execute_reply": "2025-04-07T17:50:27.302732Z" } }, "outputs": [], "source": [ "base_model = pya.models.LinearModel(input_dim=len(model.features))\n", "\n", "base_model.linear.weight.data = weights.float()\n", "base_model.linear.bias.data = intercept.float()\n", "\n", "model.base_model = base_model" ] }, { "cell_type": "markdown", "id": "ad8b4c1d-9d57-48b7-9a30-bcfea7b747b1", "metadata": {}, "source": [ "## Load reference values" ] }, { "cell_type": "markdown", "id": "f7fdae64-096a-4640-ade7-6a17b78a01d5", "metadata": {}, "source": [ "#### From CSV file" ] }, { "cell_type": "code", "execution_count": 29, "id": "e1dc004f-06b7-4e24-a937-00736e93765f", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.308644Z", "iopub.status.busy": "2025-04-07T17:50:27.308553Z", "iopub.status.idle": "2025-04-07T17:50:27.323332Z", "shell.execute_reply": "2025-04-07T17:50:27.323061Z" } }, "outputs": [], "source": [ "reference_df = pd.read_csv('FemaleMedians.csv', index_col=0)\n", "model.reference_values = list(reference_df.loc[1, model.features])" ] }, { "cell_type": "markdown", "id": "af3bcf7b-74a8-4d21-9ccb-4de0c2b0516b", "metadata": {}, "source": [ "## Load preprocess and postprocess objects" ] }, { "cell_type": "code", "execution_count": 30, "id": "79a1b3a2-00f1-42b1-9fcd-f919343391d7", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.324794Z", "iopub.status.busy": "2025-04-07T17:50:27.324706Z", "iopub.status.idle": "2025-04-07T17:50:27.326219Z", "shell.execute_reply": "2025-04-07T17:50:27.325910Z" } }, "outputs": [], "source": [ "model.preprocess_name = None\n", "model.preprocess_dependencies = None" ] }, { "cell_type": "code", "execution_count": 31, "id": "ff4a21cb-cf41-44dc-9ed1-95cf8aa15772", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.327714Z", "iopub.status.busy": "2025-04-07T17:50:27.327614Z", "iopub.status.idle": "2025-04-07T17:50:27.329350Z", "shell.execute_reply": "2025-04-07T17:50:27.329050Z" } }, "outputs": [], "source": [ "model.postprocess_name = None\n", "model.postprocess_dependencies = None" ] }, { "cell_type": "markdown", "id": "86e3d6b1-e67e-4f3d-bd39-0ebec5726c3c", "metadata": {}, "source": [ "## Check all clock parameters" ] }, { "cell_type": "code", "execution_count": 32, "id": "2168355c-47d9-475d-b816-49f65e74887c", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.330820Z", "iopub.status.busy": "2025-04-07T17:50:27.330730Z", "iopub.status.idle": "2025-04-07T17:50:27.336089Z", "shell.execute_reply": "2025-04-07T17:50:27.335809Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "%==================================== Model Details ====================================%\n", "Model Attributes:\n", "\n", "training: True\n", "metadata: {'approved_by_author': '⌛',\n", " 'citation': 'McGreevy, Kristen M., et al. \"DNAmFitAge: biological age '\n", " 'indicator incorporating physical fitness.\" Aging (Albany NY) '\n", " '15.10 (2023): 3904.',\n", " 'clock_name': 'dnamfitagegaitf',\n", " 'data_type': 'methylation',\n", " 'doi': 'https://doi.org/10.18632/aging.204538',\n", " 'notes': 'Reference values is mean between male and female training medians',\n", " 'research_only': None,\n", " 'species': 'Homo sapiens',\n", " 'version': None,\n", " 'year': 2023}\n", "reference_values: [0.115253497078786, 0.3634639598614, 0.875245484444968, 0.821546854188647, 0.275107342941108, 0.894889702144531, 0.875694533037502, 0.655817981502772, 0.688023755694219, 0.723811974825201, 0.0669232295556058, 0.0721027662094031, 0.101769898910285, 0.606080928108706, 0.660846514723889, 0.692684806440334, 0.169813568922838, 0.692395670285827, 0.946415994929112, 0.76865976935573, 0.900577681408405, 0.782582056125966, 0.875597498851315, 0.52799050796051, 0.0574926577245481, 0.0857054078140349, 0.854883089202875, 0.220147987860978, 0.932733864902247, 0.598833175052241]... [Total elements: 53]\n", "preprocess_name: None\n", "preprocess_dependencies: None\n", "postprocess_name: None\n", "postprocess_dependencies: None\n", "features: ['cg00094518', 'cg00149716', 'cg00457495', 'cg00620464', 'cg01032119', 'cg01476885', 'cg02046532', 'cg02537108', 'cg02703627', 'cg02725269', 'cg03559454', 'cg03607117', 'cg04714041', 'cg04873577', 'cg05456652', 'cg06546183', 'cg07502389', 'cg08619515', 'cg08879886', 'cg09018483', 'cg09521872', 'cg10433390', 'cg10694507', 'cg10833685', 'cg10964367', 'cg11650763', 'cg12597309', 'cg13649056', 'cg14170201', 'cg14310198']... [Total elements: 53]\n", "base_model_features: None\n", "\n", "%==================================== Model Details ====================================%\n", "Model Structure:\n", "\n", "base_model: LinearModel(\n", " (linear): Linear(in_features=53, out_features=1, bias=True)\n", ")\n", "\n", "%==================================== Model Details ====================================%\n", "Model Parameters and Weights:\n", "\n", "base_model.linear.weight: [-0.05867812782526016, -0.05637867748737335, -0.10371068120002747, 0.01624305173754692, -0.053210534155368805, -0.07633326947689056, -0.01514248363673687, -0.049918416887521744, -0.013779371976852417, 0.14702405035495758, 0.22061608731746674, -0.6326411366462708, -0.40431228280067444, 0.06633924692869186, -0.2228449434041977, -0.03177845478057861, -0.35903501510620117, 0.4153103232383728, -0.837234616279602, 0.056484829634428024, -0.13299566507339478, -0.058516617864370346, 0.04777200520038605, 0.13982263207435608, -0.1280703842639923, -0.03444225341081619, -0.05433110147714615, -0.4258767366409302, 0.0011224570916965604, 0.01846371404826641]... [Tensor of shape torch.Size([1, 53])]\n", "base_model.linear.bias: tensor([3.9701])\n", "\n", "%==================================== Model Details ====================================%\n", "\n" ] } ], "source": [ "pya.utils.print_model_details(model)" ] }, { "cell_type": "markdown", "id": "986d0262-e0c7-4036-b687-dee53ba392fb", "metadata": {}, "source": [ "## Basic test" ] }, { "cell_type": "code", "execution_count": 33, "id": "352cffb0-c5a8-4c82-8f61-fce35baf5a22", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.337690Z", "iopub.status.busy": "2025-04-07T17:50:27.337490Z", "iopub.status.idle": "2025-04-07T17:50:27.346106Z", "shell.execute_reply": "2025-04-07T17:50:27.345820Z" } }, "outputs": [ { "data": { "text/plain": [ "tensor([[1.9288],\n", " [2.7637],\n", " [5.7855],\n", " [3.2988],\n", " [2.2712],\n", " [6.3697],\n", " [4.3048],\n", " [2.6162],\n", " [1.6352],\n", " [1.3601]], dtype=torch.float64, grad_fn=)" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "torch.manual_seed(42)\n", "input = torch.randn(10, len(model.features), dtype=float)\n", "model.eval()\n", "model.to(float)\n", "pred = model(input)\n", "pred" ] }, { "cell_type": "markdown", "id": "fe8299d7-9285-4e22-82fd-b664434b4369", "metadata": {}, "source": [ "## Save torch model" ] }, { "cell_type": "code", "execution_count": 34, "id": "0c3a2d80-1b5f-458a-926c-cbc0aa9416e1", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.347459Z", "iopub.status.busy": "2025-04-07T17:50:27.347364Z", "iopub.status.idle": "2025-04-07T17:50:27.350847Z", "shell.execute_reply": "2025-04-07T17:50:27.350573Z" } }, "outputs": [], "source": [ "torch.save(model, f\"../weights/{model.metadata['clock_name']}.pt\")" ] }, { "cell_type": "markdown", "id": "bac6257b-8d08-4a90-8d0b-7f745dc11ac1", "metadata": {}, "source": [ "## Clear directory\n", "" ] }, { "cell_type": "code", "execution_count": 35, "id": "11aeaa70-44c0-42f9-86d7-740e3849a7a6", "metadata": { "execution": { "iopub.execute_input": "2025-04-07T17:50:27.352136Z", "iopub.status.busy": "2025-04-07T17:50:27.352040Z", "iopub.status.idle": "2025-04-07T17:50:27.360420Z", "shell.execute_reply": "2025-04-07T17:50:27.360132Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Deleted file: Grip_noAge_Females.csv\n", "Deleted file: Grip_noAge_Males.csv\n", "Deleted file: Gait_noAge_Females.csv\n", "Deleted file: VO2maxModel.csv\n", "Deleted file: AllCpGs.json\n", "Deleted file: Gait_noAge_Males.csv\n", "Deleted folder: DNAmFitAge\n", "Deleted file: download.r\n", "Deleted file: FemaleMedians.csv\n", "Deleted file: MaleMedians.csv\n" ] } ], "source": [ "# Function to remove a folder and all its contents\n", "def remove_folder(path):\n", " try:\n", " shutil.rmtree(path)\n", " print(f\"Deleted folder: {path}\")\n", " except Exception as e:\n", " print(f\"Error deleting folder {path}: {e}\")\n", "\n", "# Get a list of all files and folders in the current directory\n", "all_items = os.listdir('.')\n", "\n", "# Loop through the items\n", "for item in all_items:\n", " # Check if it's a file and does not end with .ipynb\n", " if os.path.isfile(item) and not item.endswith('.ipynb'):\n", " os.remove(item)\n", " print(f\"Deleted file: {item}\")\n", " # Check if it's a folder\n", " elif os.path.isdir(item):\n", " remove_folder(item)" ] } ], "metadata": { "kernelspec": { "display_name": "research", "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.9.7" } }, "nbformat": 4, "nbformat_minor": 5 }