Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 0 additions & 101 deletions hometask/task1-3 /generator.ipynb

This file was deleted.

46 changes: 13 additions & 33 deletions hometask/task1-3/generator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,15 @@
},
"colab": {
"name": "generator.ipynb",
"provenance": [],
"include_colab_link": true
"provenance": []
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/andriygav/MachineLearningSeminars/blob/master/hometask/task1-1/generator.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"metadata": {
"id": "9CSy43_9KwdH",
"outputId": "e6aadc47-1358-473c-8ec0-3879d56bb73e",
"outputId": "9d83fbe5-c8ed-4cad-88ef-5cad0985638c",
"colab": {
"base_uri": "https://localhost:8080/"
}
Expand All @@ -66,18 +55,18 @@
" 'url': 'https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_breast_cancer.html#sklearn.datasets.load_breast_cancer'},\n",
" {'name': 'MNIST',\n",
" 'url': 'http://yann.lecun.com/exdb/mnist/'}]}\n",
"methods = {'regression': ['Линейная регрессия',\n",
" 'Перцептрон'],\n",
" 'classification': ['Логистическая регрессия',\n",
" 'Перцептрон']}\n",
"methods = {'regression': ['kNN',\n",
" 'Метод опорных векторов', 'Надарая-Ватсона'],\n",
" 'classification': ['kNN',\n",
" 'Метод опорных векторов', 'Метод потенциальных функций']}\n",
"task = dict()\n",
"task['mail'] = input(prompt='Enter your mail: ')\n",
"task['id'] = crc32(task['mail'].encode('utf-8'))\n",
"task['id'] = crc32(b'2'+task['mail'].encode('utf-8'))\n",
"np.random.seed(task['id'])\n",
"task['type'] = np.random.choice(types)\n",
"task['dataset'] = np.random.choice(datasets[task['type']])\n",
"task['method'] = np.random.choice(\n",
" methods[task['type']], size=2, replace=False).tolist()\n",
" methods[task['type']], size=3, replace=False).tolist()\n",
"\n",
"\n",
"task"
Expand All @@ -96,26 +85,17 @@
"data": {
"text/plain": [
"{'mail': 'grabovoy.av@phystech.edu',\n",
" 'id': 1191023426,\n",
" 'type': np.str_('regression'),\n",
" 'dataset': {'name': 'Diabetes Data Set',\n",
" 'url': 'https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_diabetes.html#sklearn.datasets.load_diabetes'},\n",
" 'method': ['Перцептрон', 'Линейная регрессия']}"
" 'id': 1957435394,\n",
" 'type': np.str_('classification'),\n",
" 'dataset': {'name': 'Wine Data Set',\n",
" 'url': 'https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_wine.html#sklearn.datasets.load_wine'},\n",
" 'method': ['Метод опорных векторов', 'kNN', 'Метод потенциальных функций']}"
]
},
"metadata": {},
"execution_count": 2
}
]
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "TCeJEv7tOCKl"
},
"execution_count": null,
"outputs": []
}
]
}