{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "##### Edit the four numeric parameters on the right (*SDMT, VFT, SCR*, and *SWR*) and press the **Play** button below to calculate the HD Composite Cognition Score (CCS)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "SQ-mj4125A1g", "outputId": "faa8dc34-8eca-4d3b-c409-7ac9e83abf71" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CCS = 0.83\n", "Group 2: medium CCS, Motor medium risk\n" ] } ], "source": [ "from numpy import array\n", "\n", "v = array([0.51,0.4,0.54,0.54])\n", "σ = array([10.62,5.07,13.07,16.23])\n", "μ = array([42.90,19.30,66.43,86.14])\n", "\n", "def CCS(X):\n", " return ((v/σ)*(X-μ)).sum()\n", "\n", "#@title Prodromic average scores:\n", "\n", "SDMT = 45 #@param {type:\"integer\"}\n", "VFT = 25 #@param {type:\"integer\"}\n", "SCR = 70 #@param {type:\"integer\"}\n", "SWR = 90 #@param {type:\"integer\"}\n", "\n", "\n", "X = array([SDMT, VFT, SCR, SWR], dtype=int)\n", "if (X<0).any():\n", " print(\"Test scores can not be negative\")\n", "else:\n", " ccs = CCS(X)\n", " print(\"CCS = %.2f\"%ccs)\n", " if ccs<-2.375:\n", " print(\"Group 1: Low CCS, Motor high risk\")\n", " elif ccs<2.375:\n", " print(\"Group 2: medium CCS, Motor medium risk\")\n", " else:\n", " print(\"Group 3: high CCS, Motor low risk\")" ] } ], "metadata": { "colab": { "provenance": [] }, "kernelspec": { "display_name": "Python 3", "name": "python3" }, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 0 }