{ "cells": [ { "cell_type": "code", "metadata": { "id": "1005944835_0.34864291594519803" }, "execution_count": null, "source": [ "%%bash\npip install torch==1.13.1" ], "outputs": [] }, { "cell_type": "code", "metadata": { "id": "1005944835_0.3903753858877983" }, "execution_count": null, "source": [ "import torch\nprint(torch. __version__)" ], "outputs": [] }, { "cell_type": "code", "metadata": { "id": "1005944835_0.5185274770795416" }, "execution_count": null, "source": [ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as f" ], "outputs": [] }, { "cell_type": "code", "metadata": { "id": "1005944835_0.4635300909217901" }, "execution_count": 1, "source": [ "from Notebook.DSNotebook.NotebookExecutor import NotebookExecutor\nnb = NotebookExecutor()\ndf_Iris = nb.get_data('11121675159938577', '@SYS.USERID', 'True',{},[])\ndf_Iris" ], "outputs": [ { "data": { "text/plain": [ " sepal_length sepal_width petal_length petal_width species\n0 5.1 2.0 1.0 0.2 setosa\n1 4.9 2.2 1.1 0.2 setosa\n2 4.7 2.2 1.2 0.2 setosa\n3 4.6 2.2 1.2 0.2 setosa\n4 5.0 2.3 1.3 0.2 setosa\n.. ... ... ... ... ...\n145 6.7 3.9 6.4 2.3 virginica\n146 6.3 4.0 6.6 1.9 virginica\n147 6.5 4.1 6.7 2.0 virginica\n148 6.2 4.2 6.7 2.3 virginica\n149 5.9 4.4 6.9 1.8 virginica\n\n[150 rows x 5 columns]" ], "text/html": [ "
\n | sepal_length | \nsepal_width | \npetal_length | \npetal_width | \nspecies | \n
---|---|---|---|---|---|
0 | \n5.1 | \n2.0 | \n1.0 | \n0.2 | \nsetosa | \n
1 | \n4.9 | \n2.2 | \n1.1 | \n0.2 | \nsetosa | \n
2 | \n4.7 | \n2.2 | \n1.2 | \n0.2 | \nsetosa | \n
3 | \n4.6 | \n2.2 | \n1.2 | \n0.2 | \nsetosa | \n
4 | \n5.0 | \n2.3 | \n1.3 | \n0.2 | \nsetosa | \n
... | \n... | \n... | \n... | \n... | \n... | \n
145 | \n6.7 | \n3.9 | \n6.4 | \n2.3 | \nvirginica | \n
146 | \n6.3 | \n4.0 | \n6.6 | \n1.9 | \nvirginica | \n
147 | \n6.5 | \n4.1 | \n6.7 | \n2.0 | \nvirginica | \n
148 | \n6.2 | \n4.2 | \n6.7 | \n2.3 | \nvirginica | \n
149 | \n5.9 | \n4.4 | \n6.9 | \n1.8 | \nvirginica | \n
150 rows × 5 columns
\n\n | sepal_length | \nsepal_width | \npetal_length | \npetal_width | \npredictions | \n
---|---|---|---|---|---|
0 | \n5.7 | \n3.2 | \n4.8 | \n1.3 | \n1 | \n
1 | \n6.7 | \n3.0 | \n4.0 | \n1.4 | \n1 | \n
2 | \n4.7 | \n2.7 | \n1.5 | \n0.2 | \n0 | \n
3 | \n6.5 | \n2.9 | \n3.5 | \n1.5 | \n1 | \n
4 | \n6.1 | \n3.6 | \n5.8 | \n1.4 | \n2 | \n
... | \n... | \n... | \n... | \n... | \n... | \n
25 | \n6.2 | \n3.5 | \n5.6 | \n1.8 | \n2 | \n
26 | \n6.1 | \n3.1 | \n4.7 | \n1.4 | \n1 | \n
27 | \n6.1 | \n3.0 | \n4.2 | \n1.3 | \n1 | \n
28 | \n6.5 | \n4.1 | \n6.7 | \n2.0 | \n2 | \n
29 | \n5.9 | \n4.4 | \n6.9 | \n1.8 | \n2 | \n
30 rows × 5 columns
\n