updated documentation
This commit is contained in:
parent
26c3c2abf1
commit
960ab37693
@ -1057,76 +1057,34 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 49,
|
"execution_count": 59,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"def train():\n",
|
"def train(max_size = 10000):\n",
|
||||||
" clf = OVRC(DTC())\n",
|
" clf = OVRC(DTC())\n",
|
||||||
"\n",
|
"\n",
|
||||||
" clf.fit(vec_train[:10000], y1[:10000])\n",
|
" clf.fit(vec_train[:max_size], y1[:max_size])\n",
|
||||||
" \n",
|
" \n",
|
||||||
" return clf"
|
" return clf"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 50,
|
"execution_count": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stderr",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 889 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 897 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 898 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 901 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 902 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 903 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 907 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 908 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 909 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 910 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 911 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 913 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 914 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 915 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 918 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 919 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 924 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 925 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 926 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 927 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n",
|
|
||||||
"/home/jonas/.local/lib/python3.6/site-packages/sklearn/multiclass.py:76: UserWarning: Label not 928 is present in all training examples.\n",
|
|
||||||
" str(classes[c]))\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"clf = train()"
|
"clf = train()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"* make a prediction and store it in a csv file:"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 51,
|
"execution_count": 51,
|
||||||
@ -1675,13 +1633,20 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 52,
|
"execution_count": 60,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"testlist.to_csv('test.csv')"
|
"testlist.to_csv('test.csv')"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"* a simple output widget for testing:"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 58,
|
"execution_count": 58,
|
||||||
|
Loading…
Reference in New Issue
Block a user