diff --git a/Project/simple_approach/simple_twitter_learning.ipynb b/Project/simple_approach/simple_twitter_learning.ipynb
index 7b8661c..a091cf1 100644
--- a/Project/simple_approach/simple_twitter_learning.ipynb
+++ b/Project/simple_approach/simple_twitter_learning.ipynb
@@ -9,8 +9,6 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "/home/jonas/.local/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
- " from ._conv import register_converters as _register_converters\n",
"Using TensorFlow backend.\n"
]
},
@@ -187,7 +185,7 @@
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
@@ -322,7 +320,7 @@
},
{
"cell_type": "code",
- "execution_count": 21,
+ "execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
@@ -503,7 +501,7 @@
},
{
"cell_type": "code",
- "execution_count": 12,
+ "execution_count": 10,
"metadata": {},
"outputs": [
{
@@ -527,7 +525,7 @@
},
{
"cell_type": "code",
- "execution_count": 22,
+ "execution_count": 11,
"metadata": {},
"outputs": [
{
@@ -535,7 +533,7 @@
"output_type": "stream",
"text": [
"Epoch 1/1\n",
- "100/100 [==============================] - 3s 27ms/step - loss: 0.1225\n"
+ "10000/10000 [==============================] - 109s 11ms/step - loss: 0.0197\n"
]
}
],
@@ -546,16 +544,9 @@
" layers=[(2500, 'relu'),(3,None)], sdm=sdm)\n",
" \n",
" tr = trainer(sdm=sdm, pm=pm)\n",
- " tr.fit(100)"
+ " tr.fit(10000)"
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": []
- },
{
"cell_type": "markdown",
"metadata": {},
@@ -566,7 +557,7 @@
},
{
"cell_type": "code",
- "execution_count": 23,
+ "execution_count": 13,
"metadata": {},
"outputs": [
{
@@ -576,6 +567,14 @@
"['keras_model']\n"
]
},
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/home/jonas/.local/lib/python3.6/site-packages/keras/engine/sequential.py:109: UserWarning: `Sequential.model` is deprecated. `Sequential` is a subclass of `Model`, you can just use your `Sequential` instance directly.\n",
+ " warnings.warn('`Sequential.model` is deprecated. '\n"
+ ]
+ },
{
"data": {
"text/plain": [
@@ -601,7 +600,9 @@
}
],
"source": [
- "pm.save('custom_classifier')"
+ "import __main__ as main\n",
+ "if not hasattr(main, '__file__'):\n",
+ " pm.save('custom_classifier')"
]
},
{
@@ -614,19 +615,19 @@
},
{
"cell_type": "code",
- "execution_count": 33,
+ "execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
- "array([[0.15801723, 0.11859037, 0.10975348],\n",
- " [0.17035495, 0.10913695, 0.09354854],\n",
- " [0.11777218, 0.06569621, 0.06620223],\n",
+ "array([[0.4423941 , 0.22976081, 0.26076168],\n",
+ " [0.75167173, 0.2919423 , 0.3423372 ],\n",
+ " [0.48943695, 0.21931192, 0.22773138],\n",
" ...,\n",
- " [0.14746301, 0.09480572, 0.08052498],\n",
- " [0.15932804, 0.11895895, 0.10343507],\n",
- " [0.17135939, 0.1061406 , 0.09402546]], dtype=float32)"
+ " [0.51003224, 0.26002786, 0.25588542],\n",
+ " [0.5808168 , 0.30632192, 0.2964917 ],\n",
+ " [0.39000767, 0.31723523, 0.24713083]], dtype=float32)"
]
},
"metadata": {},
@@ -651,7 +652,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "prediction variance: 0.0006294687\n",
+ "prediction variance: 0.009700283\n",
"teacher variance: 0.03341702104519965\n"
]
},
@@ -676,79 +677,79 @@
" \n",
" \n",
" \n",
" \n",
" \n",
- " predict \n",
- " predicted_sentiment \n",
+ " text \n",
" teacher \n",
" teacher_sentiment \n",
- " text \n",
+ " predict \n",
+ " predicted_sentiment \n",
"