{ "cells": [ { "cell_type": "markdown", "id": "42d04fab-1afc-4547-ab01-df3e66c8ac56", "metadata": {}, "source": [ "# Covid-19 Trends Predictions\n", "\n", "**As a Data Scientist you will login with username/password provided by the data owner and perform Remote Data Science**" ] }, { "cell_type": "markdown", "id": "7cc0b4d2-a8cb-4832-a0c2-bc4680588498", "metadata": {}, "source": [ "## Import Libraries" ] }, { "cell_type": "code", "execution_count": 1, "id": "b889d920-5f67-4f3b-a909-0d3998575d50", "metadata": {}, "outputs": [], "source": [ "import syft as sy\n", "import numpy as np\n", "import matplotlib, matplotlib.pyplot as plt\n", "import os\n", "import pandas as pd\n", "\n", "%matplotlib inline" ] }, { "cell_type": "markdown", "id": "d8e50aeb-b9ab-449d-8d90-f655543698d5", "metadata": {}, "source": [ "## Login to Domain Node as Data Scientist" ] }, { "cell_type": "code", "execution_count": 2, "id": "7969e7e1-f06b-4176-8afd-de01d42f14ef", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Connecting to None... done! \t Logging into local_node... done!\n" ] } ], "source": [ "ds_node = sy.login(email=\"zoheb@amat.com\", password=\"bazinga\", port=8081)" ] }, { "cell_type": "markdown", "id": "67194b5d-0bf1-482b-9df5-1c266f7bb1da", "metadata": {}, "source": [ "**Lets check our initial privacy budget**\n", "\n", "The privacy budget represents how much noise the data scientist can remove from a dataset when accessing it. Domains will set a privacy budget per data scientist." ] }, { "cell_type": "code", "execution_count": 3, "id": "e28db34d-faeb-4468-89b0-f6f50635aca3", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "700.0" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ds_node.privacy_budget" ] }, { "cell_type": "markdown", "id": "ff609a03-69ff-4baa-a997-728f23cf5c31", "metadata": {}, "source": [ "## View the available datasets on the Node" ] }, { "cell_type": "code", "execution_count": 4, "id": "e6c615db-b0f4-44f9-a3c2-4701773042f9", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
| Idx | \n", "Name | \n", "Description | \n", "Assets | \n", "Id | \n", "
|---|---|---|---|---|
| [0] | \n", "COVID19 Cases in 175 countries | \n", "Weekly data for an entire year | \n", "[\"Country 0\"] -> Tensor [\"Country 1\"] -> Tensor [\"Country 2\"] -> Tensor ... | \n",
" 51da7d0f-7e80-4b82-b5aa-9814a3ee9cef | \n", "
| Asset Key | \n", "Type | \n", "Shape | \n", "
|---|---|---|
| [\"Country 0\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 1\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 2\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 3\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 4\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 5\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 6\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 7\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 8\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 9\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 10\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 11\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 12\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 13\"] | \n", "Tensor | \n", "(53,) | \n", "
| [\"Country 14\"] | \n", "Tensor | \n", "(53,) | \n", "