Spaces:
Build error
Build error
Pietro Lesci
commited on
Commit
Β·
ae89532
1
Parent(s):
cb547e1
Update wordifier_nb.ipynb
Browse files- notebooks/wordifier_nb.ipynb +16 -12
notebooks/wordifier_nb.ipynb
CHANGED
|
@@ -93,12 +93,12 @@
|
|
| 93 |
"output_type": "stream",
|
| 94 |
"name": "stderr",
|
| 95 |
"text": [
|
| 96 |
-
"2021-05-10
|
| 97 |
" \u001b[33m\u001b[1mWarning:\u001b[0m to view this Streamlit app on a browser, run it with the following\n",
|
| 98 |
" command:\n",
|
| 99 |
"\n",
|
| 100 |
" streamlit run /Users/49796/miniconda3/envs/py38/lib/python3.8/site-packages/ipykernel_launcher.py [ARGUMENTS]\n",
|
| 101 |
-
"100%|ββββββββββ| 6269/6269 [00:02<00:00,
|
| 102 |
]
|
| 103 |
}
|
| 104 |
],
|
|
@@ -108,7 +108,7 @@
|
|
| 108 |
},
|
| 109 |
{
|
| 110 |
"cell_type": "code",
|
| 111 |
-
"execution_count":
|
| 112 |
"metadata": {},
|
| 113 |
"outputs": [],
|
| 114 |
"source": [
|
|
@@ -117,14 +117,14 @@
|
|
| 117 |
},
|
| 118 |
{
|
| 119 |
"cell_type": "code",
|
| 120 |
-
"execution_count":
|
| 121 |
"metadata": {},
|
| 122 |
"outputs": [],
|
| 123 |
"source": [
|
| 124 |
"clf = LogisticRegression(\n",
|
| 125 |
" penalty=\"l1\",\n",
|
| 126 |
" C=0.05,#ModelConfigs.PENALTIES.value[np.random.randint(len(ModelConfigs.PENALTIES.value))],\n",
|
| 127 |
-
" solver=\"
|
| 128 |
" multi_class=\"auto\",\n",
|
| 129 |
" max_iter=500,\n",
|
| 130 |
" class_weight=\"balanced\",\n",
|
|
@@ -133,17 +133,14 @@
|
|
| 133 |
},
|
| 134 |
{
|
| 135 |
"cell_type": "code",
|
| 136 |
-
"execution_count":
|
| 137 |
"metadata": {},
|
| 138 |
"outputs": [
|
| 139 |
{
|
| 140 |
"output_type": "stream",
|
| 141 |
"name": "stdout",
|
| 142 |
"text": [
|
| 143 |
-
"CPU times: user
|
| 144 |
-
"Wall time: 1min 24s\n",
|
| 145 |
-
"/Users/49796/miniconda3/envs/py38/lib/python3.8/site-packages/sklearn/linear_model/_sag.py:329: ConvergenceWarning: The max_iter was reached which means the coef_ did not converge\n",
|
| 146 |
-
" warnings.warn(\"The max_iter was reached which means \"\n"
|
| 147 |
]
|
| 148 |
},
|
| 149 |
{
|
|
@@ -151,11 +148,11 @@
|
|
| 151 |
"data": {
|
| 152 |
"text/plain": [
|
| 153 |
"LogisticRegression(C=0.05, class_weight='balanced', max_iter=500, penalty='l1',\n",
|
| 154 |
-
" solver='
|
| 155 |
]
|
| 156 |
},
|
| 157 |
"metadata": {},
|
| 158 |
-
"execution_count":
|
| 159 |
}
|
| 160 |
],
|
| 161 |
"source": [
|
|
@@ -163,6 +160,13 @@
|
|
| 163 |
"clf.fit(X, y)"
|
| 164 |
]
|
| 165 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
{
|
| 167 |
"cell_type": "code",
|
| 168 |
"execution_count": 14,
|
|
|
|
| 93 |
"output_type": "stream",
|
| 94 |
"name": "stderr",
|
| 95 |
"text": [
|
| 96 |
+
"2021-05-10 18:34:49.425 WARNING root: \n",
|
| 97 |
" \u001b[33m\u001b[1mWarning:\u001b[0m to view this Streamlit app on a browser, run it with the following\n",
|
| 98 |
" command:\n",
|
| 99 |
"\n",
|
| 100 |
" streamlit run /Users/49796/miniconda3/envs/py38/lib/python3.8/site-packages/ipykernel_launcher.py [ARGUMENTS]\n",
|
| 101 |
+
"100%|ββββββββββ| 6269/6269 [00:02<00:00, 2750.45it/s]\n"
|
| 102 |
]
|
| 103 |
}
|
| 104 |
],
|
|
|
|
| 108 |
},
|
| 109 |
{
|
| 110 |
"cell_type": "code",
|
| 111 |
+
"execution_count": 5,
|
| 112 |
"metadata": {},
|
| 113 |
"outputs": [],
|
| 114 |
"source": [
|
|
|
|
| 117 |
},
|
| 118 |
{
|
| 119 |
"cell_type": "code",
|
| 120 |
+
"execution_count": 21,
|
| 121 |
"metadata": {},
|
| 122 |
"outputs": [],
|
| 123 |
"source": [
|
| 124 |
"clf = LogisticRegression(\n",
|
| 125 |
" penalty=\"l1\",\n",
|
| 126 |
" C=0.05,#ModelConfigs.PENALTIES.value[np.random.randint(len(ModelConfigs.PENALTIES.value))],\n",
|
| 127 |
+
" solver=\"liblinear\",\n",
|
| 128 |
" multi_class=\"auto\",\n",
|
| 129 |
" max_iter=500,\n",
|
| 130 |
" class_weight=\"balanced\",\n",
|
|
|
|
| 133 |
},
|
| 134 |
{
|
| 135 |
"cell_type": "code",
|
| 136 |
+
"execution_count": 22,
|
| 137 |
"metadata": {},
|
| 138 |
"outputs": [
|
| 139 |
{
|
| 140 |
"output_type": "stream",
|
| 141 |
"name": "stdout",
|
| 142 |
"text": [
|
| 143 |
+
"CPU times: user 1.45 s, sys: 10.6 ms, total: 1.46 s\nWall time: 1.46 s\n"
|
|
|
|
|
|
|
|
|
|
| 144 |
]
|
| 145 |
},
|
| 146 |
{
|
|
|
|
| 148 |
"data": {
|
| 149 |
"text/plain": [
|
| 150 |
"LogisticRegression(C=0.05, class_weight='balanced', max_iter=500, penalty='l1',\n",
|
| 151 |
+
" solver='liblinear')"
|
| 152 |
]
|
| 153 |
},
|
| 154 |
"metadata": {},
|
| 155 |
+
"execution_count": 22
|
| 156 |
}
|
| 157 |
],
|
| 158 |
"source": [
|
|
|
|
| 160 |
"clf.fit(X, y)"
|
| 161 |
]
|
| 162 |
},
|
| 163 |
+
{
|
| 164 |
+
"cell_type": "code",
|
| 165 |
+
"execution_count": null,
|
| 166 |
+
"metadata": {},
|
| 167 |
+
"outputs": [],
|
| 168 |
+
"source": []
|
| 169 |
+
},
|
| 170 |
{
|
| 171 |
"cell_type": "code",
|
| 172 |
"execution_count": 14,
|