{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Getting start with the regression problem.\n", "\n", "Let's start with the baby step example for classification problem.\n", "Below is the basic example of the configuration for regression problem using example data contained in the package. For the required data type or more detailed configuration, please check the detailed information about each option in the [documantation](https://young-won.github.io/deepbiome/prerequisites.html#configuration) and detailed [examples](https://young-won.github.io/deepbiome/example_with_the_list_of_inputs.html)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "from pkg_resources import resource_filename" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "network_info = {\n", " 'model_info': {\n", " 'network_class': 'DeepBiomeNetwork',\n", " 'optimizer': 'adam',\n", " 'lr': '0.01',\n", " 'decay': '0.0001',\n", " 'loss': 'mean_squared_error',\n", " 'metrics': 'correlation_coefficient',\n", " 'taxa_selection_metrics': 'sensitivity, specificity, gmeasure, accuracy',\n", " 'reader_class': 'MicroBiomeRegressionReader',\n", " 'normalizer': 'normalize_minmax',\n", " },\n", " 'architecture_info': {\n", " 'weight_initial': 'glorot_uniform',\n", " 'weight_decay': 'phylogenetic_tree',\n", " 'batch_normalization': 'False',\n", " 'drop_out': '0',\n", " },\n", " 'training_info': {\n", " 'epochs': '100',\n", " 'batch_size': '30', \n", " 'callbacks': 'ModelCheckpoint',\n", " 'monitor': 'val_loss',\n", " 'mode' : 'min',\n", " 'min_delta': '1e-7',\n", " },\n", " 'validation_info': {\n", " 'validation_size': '0.2',\n", " 'batch_size': 'None', \n", " },\n", " 'test_info': {\n", " 'batch_size': 'None',\n", " },\n", "}\n", "\n", "path_info = {\n", " 'data_info': {\n", " 'data_path': resource_filename('deepbiome', 'tests/data'),\n", " 'idx_path': resource_filename('deepbiome', 'tests/data/onefile_idx.csv'),\n", " 'tree_info_path': resource_filename('deepbiome', 'tests/data/genus48_dic.csv'),\n", " 'x_path': 'onefile_x.csv',\n", " 'y_path': 'regression_y.csv'\n", " },\n", " 'model_info': {\n", " 'evaluation': 'eval.npy',\n", " 'history': 'hist.json',\n", " 'model_dir': './',\n", " 'weight': 'weight.h5'\n", " }\n", "}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For logging, we used the python logging library." ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import logging\n", "\n", "logging.basicConfig(format = '[%(name)-8s|%(levelname)s|%(filename)s:%(lineno)s] %(message)s',\n", " level=logging.DEBUG)\n", "log = logging.getLogger()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here is the `deepbiome.deepbiome_train` function for training:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "scrolled": true }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Using TensorFlow backend.\n", "[root |INFO|deepbiome.py:115] -----------------------------------------------------------------\n", "[root |INFO|deepbiome.py:153] -------1 simulation start!----------------------------------\n", "[root |INFO|readers.py:58] -----------------------------------------------------------------------\n", "[root |INFO|readers.py:59] Construct Dataset\n", "[root |INFO|readers.py:60] -----------------------------------------------------------------------\n", "[root |INFO|readers.py:61] Load data\n", "[root |INFO|deepbiome.py:164] -----------------------------------------------------------------\n", "[root |INFO|deepbiome.py:165] Build network for 1 simulation\n", "[root |INFO|build_network.py:521] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:522] Read phylogenetic tree information from /DATA/home/muha/github_repos/deepbiome/deepbiome/tests/data/genus48_dic.csv\n", "[root |INFO|build_network.py:528] Phylogenetic tree level list: ['Genus', 'Family', 'Order', 'Class', 'Phylum']\n", "[root |INFO|build_network.py:529] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:537] Genus: 48\n", "[root |INFO|build_network.py:537] Family: 40\n", "[root |INFO|build_network.py:537] Order: 23\n", "[root |INFO|build_network.py:537] Class: 17\n", "[root |INFO|build_network.py:537] Phylum: 9\n", "[root |INFO|build_network.py:546] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:547] Phylogenetic_tree_dict info: ['Phylum', 'Order', 'Genus', 'Number', 'Family', 'Class']\n", "[root |INFO|build_network.py:548] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:558] Build edge weights between [ Genus, Family]\n", "[root |INFO|build_network.py:558] Build edge weights between [Family, Order]\n", "[root |INFO|build_network.py:558] Build edge weights between [ Order, Class]\n", "[root |INFO|build_network.py:558] Build edge weights between [ Class, Phylum]\n", "[root |INFO|build_network.py:571] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:586] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:587] Build network based on phylogenetic tree information\n", "[root |INFO|build_network.py:588] ------------------------------------------------------------------------------------------\n", "[tensorflow|WARNING|deprecation.py:328] From /usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/resource_variable_ops.py:432: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\n", "Instructions for updating:\n", "Colocations handled automatically by placer.\n", "[root |INFO|build_network.py:670] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:61] Build Network\n", "[root |INFO|build_network.py:62] Optimizer = adam\n", "[root |INFO|build_network.py:63] Loss = mean_squared_error\n", "[root |INFO|build_network.py:64] Metrics = correlation_coefficient\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Model: \"model_1\"\n", "_________________________________________________________________\n", "Layer (type) Output Shape Param # \n", "=================================================================\n", "input (InputLayer) (None, 48) 0 \n", "_________________________________________________________________\n", "l1_dense (Dense_with_tree) (None, 40) 1960 \n", "_________________________________________________________________\n", "l1_activation (Activation) (None, 40) 0 \n", "_________________________________________________________________\n", "l2_dense (Dense_with_tree) (None, 23) 943 \n", "_________________________________________________________________\n", "l2_activation (Activation) (None, 23) 0 \n", "_________________________________________________________________\n", "l3_dense (Dense_with_tree) (None, 17) 408 \n", "_________________________________________________________________\n", "l3_activation (Activation) (None, 17) 0 \n", "_________________________________________________________________\n", "l4_dense (Dense_with_tree) (None, 9) 162 \n", "_________________________________________________________________\n", "l4_activation (Activation) (None, 9) 0 \n", "_________________________________________________________________\n", "last_dense_h (Dense) (None, 1) 10 \n", "_________________________________________________________________\n", "p_hat (Activation) (None, 1) 0 \n", "=================================================================\n", "Total params: 3,483\n", "Trainable params: 3,483\n", "Non-trainable params: 0\n", "_________________________________________________________________\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "[root |INFO|deepbiome.py:176] -----------------------------------------------------------------\n", "[root |INFO|deepbiome.py:177] 1 fold computing start!----------------------------------\n", "[root |INFO|build_network.py:137] Training start!\n", "[tensorflow|WARNING|deprecation.py:328] From /usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/math_ops.py:2862: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n", "Instructions for updating:\n", "Use tf.cast instead.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Train on 640 samples, validate on 160 samples\n", "Epoch 1/100\n", "640/640 [==============================] - 1s 1ms/step - loss: 13.3172 - correlation_coefficient: -0.0472 - val_loss: 7.2757 - val_correlation_coefficient: 0.2129\n", "Epoch 2/100\n", "640/640 [==============================] - 0s 278us/step - loss: 3.6398 - correlation_coefficient: -0.0156 - val_loss: 2.6015 - val_correlation_coefficient: 0.2133\n", "Epoch 3/100\n", "640/640 [==============================] - 0s 273us/step - loss: 2.7581 - correlation_coefficient: 0.0091 - val_loss: 2.5732 - val_correlation_coefficient: 0.2344\n", "Epoch 4/100\n", "640/640 [==============================] - 0s 282us/step - loss: 2.6751 - correlation_coefficient: 0.0159 - val_loss: 2.4908 - val_correlation_coefficient: 0.2443\n", "Epoch 5/100\n", "640/640 [==============================] - 0s 261us/step - loss: 2.6710 - correlation_coefficient: 0.0778 - val_loss: 2.4440 - val_correlation_coefficient: 0.2510\n", "Epoch 6/100\n", "640/640 [==============================] - 0s 257us/step - loss: 2.6701 - correlation_coefficient: 0.0685 - val_loss: 2.5758 - val_correlation_coefficient: 0.2650\n", "Epoch 7/100\n", "640/640 [==============================] - 0s 231us/step - loss: 2.6690 - correlation_coefficient: 0.1112 - val_loss: 2.4963 - val_correlation_coefficient: 0.2748\n", "Epoch 8/100\n", "640/640 [==============================] - 0s 262us/step - loss: 2.6553 - correlation_coefficient: 0.1658 - val_loss: 2.5413 - val_correlation_coefficient: 0.2856\n", "Epoch 9/100\n", "640/640 [==============================] - 0s 260us/step - loss: 2.6711 - correlation_coefficient: 0.1798 - val_loss: 2.4562 - val_correlation_coefficient: 0.2888\n", "Epoch 10/100\n", "640/640 [==============================] - 0s 256us/step - loss: 2.6503 - correlation_coefficient: 0.2148 - val_loss: 2.4907 - val_correlation_coefficient: 0.2965\n", "Epoch 11/100\n", "640/640 [==============================] - 0s 270us/step - loss: 2.6437 - correlation_coefficient: 0.2563 - val_loss: 2.4441 - val_correlation_coefficient: 0.3015\n", "Epoch 12/100\n", "640/640 [==============================] - 0s 247us/step - loss: 2.6659 - correlation_coefficient: 0.2954 - val_loss: 2.4423 - val_correlation_coefficient: 0.3054\n", "Epoch 13/100\n", "640/640 [==============================] - 0s 261us/step - loss: 2.6373 - correlation_coefficient: 0.3261 - val_loss: 2.6419 - val_correlation_coefficient: 0.3073\n", "Epoch 14/100\n", "640/640 [==============================] - 0s 283us/step - loss: 2.6996 - correlation_coefficient: 0.3367 - val_loss: 2.5728 - val_correlation_coefficient: 0.3134\n", "Epoch 15/100\n", "640/640 [==============================] - 0s 271us/step - loss: 2.6575 - correlation_coefficient: 0.3569 - val_loss: 2.4368 - val_correlation_coefficient: 0.3067\n", "Epoch 16/100\n", "640/640 [==============================] - 0s 284us/step - loss: 2.6200 - correlation_coefficient: 0.3632 - val_loss: 2.6259 - val_correlation_coefficient: 0.3060\n", "Epoch 17/100\n", "640/640 [==============================] - 0s 274us/step - loss: 2.6720 - correlation_coefficient: 0.3776 - val_loss: 2.5164 - val_correlation_coefficient: 0.3074\n", "Epoch 18/100\n", "640/640 [==============================] - 0s 260us/step - loss: 2.6302 - correlation_coefficient: 0.3716 - val_loss: 2.4447 - val_correlation_coefficient: 0.3064\n", "Epoch 19/100\n", "640/640 [==============================] - 0s 375us/step - loss: 2.6302 - correlation_coefficient: 0.3845 - val_loss: 2.4203 - val_correlation_coefficient: 0.3097\n", "Epoch 20/100\n", "640/640 [==============================] - 0s 736us/step - loss: 2.6129 - correlation_coefficient: 0.3770 - val_loss: 2.5218 - val_correlation_coefficient: 0.3109\n", "Epoch 21/100\n", "640/640 [==============================] - 1s 868us/step - loss: 2.6203 - correlation_coefficient: 0.4002 - val_loss: 2.4337 - val_correlation_coefficient: 0.3081\n", "Epoch 22/100\n", "640/640 [==============================] - 0s 539us/step - loss: 2.5872 - correlation_coefficient: 0.4077 - val_loss: 2.4044 - val_correlation_coefficient: 0.3108\n", "Epoch 23/100\n", "640/640 [==============================] - 0s 535us/step - loss: 2.5898 - correlation_coefficient: 0.3934 - val_loss: 2.4256 - val_correlation_coefficient: 0.3082\n", "Epoch 24/100\n", "640/640 [==============================] - 1s 870us/step - loss: 2.6233 - correlation_coefficient: 0.3768 - val_loss: 2.4770 - val_correlation_coefficient: 0.3134\n", "Epoch 25/100\n", "640/640 [==============================] - 0s 524us/step - loss: 2.5573 - correlation_coefficient: 0.3892 - val_loss: 2.4070 - val_correlation_coefficient: 0.3148\n", "Epoch 26/100\n", "640/640 [==============================] - 0s 645us/step - loss: 2.5359 - correlation_coefficient: 0.4066 - val_loss: 2.4710 - val_correlation_coefficient: 0.3203\n", "Epoch 27/100\n", "640/640 [==============================] - 1s 987us/step - loss: 2.5595 - correlation_coefficient: 0.3985 - val_loss: 2.5221 - val_correlation_coefficient: 0.3213\n", "Epoch 28/100\n", "640/640 [==============================] - 1s 821us/step - loss: 2.5042 - correlation_coefficient: 0.4244 - val_loss: 2.4097 - val_correlation_coefficient: 0.3251\n", "Epoch 29/100\n", "640/640 [==============================] - 0s 408us/step - loss: 2.4519 - correlation_coefficient: 0.4178 - val_loss: 2.3837 - val_correlation_coefficient: 0.3309\n", "Epoch 30/100\n", "640/640 [==============================] - 1s 790us/step - loss: 2.4525 - correlation_coefficient: 0.4047 - val_loss: 2.3355 - val_correlation_coefficient: 0.3408\n", "Epoch 31/100\n", "640/640 [==============================] - 1s 923us/step - loss: 2.3892 - correlation_coefficient: 0.4247 - val_loss: 2.5191 - val_correlation_coefficient: 0.3450\n", "Epoch 32/100\n", "640/640 [==============================] - 0s 520us/step - loss: 2.4126 - correlation_coefficient: 0.4170 - val_loss: 2.4120 - val_correlation_coefficient: 0.3581\n", "Epoch 33/100\n", "640/640 [==============================] - 0s 618us/step - loss: 2.4295 - correlation_coefficient: 0.4438 - val_loss: 2.3369 - val_correlation_coefficient: 0.3713\n", "Epoch 34/100\n", "640/640 [==============================] - 0s 288us/step - loss: 2.3767 - correlation_coefficient: 0.4402 - val_loss: 2.2498 - val_correlation_coefficient: 0.3819\n", "Epoch 35/100\n", "640/640 [==============================] - 0s 255us/step - loss: 2.3212 - correlation_coefficient: 0.4439 - val_loss: 2.2667 - val_correlation_coefficient: 0.3907\n", "Epoch 36/100\n", "640/640 [==============================] - 0s 290us/step - loss: 2.2091 - correlation_coefficient: 0.4668 - val_loss: 2.2368 - val_correlation_coefficient: 0.3996\n", "Epoch 37/100\n", "640/640 [==============================] - 0s 262us/step - loss: 2.2400 - correlation_coefficient: 0.4783 - val_loss: 2.4207 - val_correlation_coefficient: 0.4059\n", "Epoch 38/100\n", "640/640 [==============================] - 0s 291us/step - loss: 2.2897 - correlation_coefficient: 0.4858 - val_loss: 2.1287 - val_correlation_coefficient: 0.4237\n", "Epoch 39/100\n", "640/640 [==============================] - 0s 247us/step - loss: 2.1540 - correlation_coefficient: 0.4920 - val_loss: 2.1244 - val_correlation_coefficient: 0.4314\n", "Epoch 40/100\n", "640/640 [==============================] - 0s 265us/step - loss: 2.1139 - correlation_coefficient: 0.4930 - val_loss: 2.1147 - val_correlation_coefficient: 0.4435\n", "Epoch 41/100\n", "640/640 [==============================] - 0s 272us/step - loss: 2.1490 - correlation_coefficient: 0.5189 - val_loss: 2.1416 - val_correlation_coefficient: 0.4489\n", "Epoch 42/100\n", "640/640 [==============================] - 0s 261us/step - loss: 2.0228 - correlation_coefficient: 0.5028 - val_loss: 2.0760 - val_correlation_coefficient: 0.4586\n", "Epoch 43/100\n", "640/640 [==============================] - 0s 257us/step - loss: 1.9951 - correlation_coefficient: 0.5584 - val_loss: 2.0342 - val_correlation_coefficient: 0.4678\n", "Epoch 44/100\n", "640/640 [==============================] - 0s 268us/step - loss: 1.9810 - correlation_coefficient: 0.5576 - val_loss: 2.3027 - val_correlation_coefficient: 0.4773\n", "Epoch 45/100\n", "640/640 [==============================] - 0s 275us/step - loss: 1.9496 - correlation_coefficient: 0.5668 - val_loss: 1.9362 - val_correlation_coefficient: 0.4957\n", "Epoch 46/100\n", "640/640 [==============================] - 0s 282us/step - loss: 1.8442 - correlation_coefficient: 0.5925 - val_loss: 1.9427 - val_correlation_coefficient: 0.5044\n", "Epoch 47/100\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "640/640 [==============================] - 0s 278us/step - loss: 1.8373 - correlation_coefficient: 0.5957 - val_loss: 1.8818 - val_correlation_coefficient: 0.5188\n", "Epoch 48/100\n", "640/640 [==============================] - 0s 280us/step - loss: 1.7816 - correlation_coefficient: 0.5919 - val_loss: 1.8729 - val_correlation_coefficient: 0.5283\n", "Epoch 49/100\n", "640/640 [==============================] - 0s 256us/step - loss: 1.8476 - correlation_coefficient: 0.6363 - val_loss: 2.1853 - val_correlation_coefficient: 0.5370\n", "Epoch 50/100\n", "640/640 [==============================] - 0s 239us/step - loss: 1.7411 - correlation_coefficient: 0.6195 - val_loss: 1.7961 - val_correlation_coefficient: 0.5546\n", "Epoch 51/100\n", "640/640 [==============================] - 0s 253us/step - loss: 1.6690 - correlation_coefficient: 0.6416 - val_loss: 1.7886 - val_correlation_coefficient: 0.5574\n", "Epoch 52/100\n", "640/640 [==============================] - 0s 267us/step - loss: 1.6391 - correlation_coefficient: 0.6584 - val_loss: 1.7492 - val_correlation_coefficient: 0.5721\n", "Epoch 53/100\n", "640/640 [==============================] - 0s 255us/step - loss: 1.5750 - correlation_coefficient: 0.6569 - val_loss: 1.6841 - val_correlation_coefficient: 0.5794\n", "Epoch 54/100\n", "640/640 [==============================] - 0s 208us/step - loss: 1.5270 - correlation_coefficient: 0.6653 - val_loss: 1.8707 - val_correlation_coefficient: 0.5849\n", "Epoch 55/100\n", "640/640 [==============================] - 0s 224us/step - loss: 1.5578 - correlation_coefficient: 0.6705 - val_loss: 1.8342 - val_correlation_coefficient: 0.5866\n", "Epoch 56/100\n", "640/640 [==============================] - 0s 278us/step - loss: 1.5077 - correlation_coefficient: 0.6921 - val_loss: 1.6774 - val_correlation_coefficient: 0.5985\n", "Epoch 57/100\n", "640/640 [==============================] - 0s 291us/step - loss: 1.5510 - correlation_coefficient: 0.6912 - val_loss: 1.9361 - val_correlation_coefficient: 0.5994\n", "Epoch 58/100\n", "640/640 [==============================] - 0s 271us/step - loss: 1.4712 - correlation_coefficient: 0.6956 - val_loss: 1.5889 - val_correlation_coefficient: 0.6089\n", "Epoch 59/100\n", "640/640 [==============================] - 0s 277us/step - loss: 1.4170 - correlation_coefficient: 0.7042 - val_loss: 1.6166 - val_correlation_coefficient: 0.6097\n", "Epoch 60/100\n", "640/640 [==============================] - 0s 261us/step - loss: 1.4155 - correlation_coefficient: 0.7173 - val_loss: 1.6616 - val_correlation_coefficient: 0.6099\n", "Epoch 61/100\n", "640/640 [==============================] - 0s 269us/step - loss: 1.4085 - correlation_coefficient: 0.7078 - val_loss: 1.6945 - val_correlation_coefficient: 0.6141\n", "Epoch 62/100\n", "640/640 [==============================] - 0s 289us/step - loss: 1.3825 - correlation_coefficient: 0.7180 - val_loss: 1.6690 - val_correlation_coefficient: 0.6195\n", "Epoch 63/100\n", "640/640 [==============================] - 0s 311us/step - loss: 1.3681 - correlation_coefficient: 0.7100 - val_loss: 1.5628 - val_correlation_coefficient: 0.6223\n", "Epoch 64/100\n", "640/640 [==============================] - 0s 270us/step - loss: 1.3614 - correlation_coefficient: 0.7301 - val_loss: 1.5476 - val_correlation_coefficient: 0.6225\n", "Epoch 65/100\n", "640/640 [==============================] - 0s 259us/step - loss: 1.3308 - correlation_coefficient: 0.7229 - val_loss: 1.5279 - val_correlation_coefficient: 0.6296\n", "Epoch 66/100\n", "640/640 [==============================] - 0s 241us/step - loss: 1.4790 - correlation_coefficient: 0.7250 - val_loss: 1.7234 - val_correlation_coefficient: 0.6209\n", "Epoch 67/100\n", "640/640 [==============================] - 0s 266us/step - loss: 1.3390 - correlation_coefficient: 0.7195 - val_loss: 1.5748 - val_correlation_coefficient: 0.6314\n", "Epoch 68/100\n", "640/640 [==============================] - 0s 287us/step - loss: 1.2925 - correlation_coefficient: 0.7354 - val_loss: 1.5740 - val_correlation_coefficient: 0.6318\n", "Epoch 69/100\n", "640/640 [==============================] - 0s 291us/step - loss: 1.3034 - correlation_coefficient: 0.7326 - val_loss: 1.6764 - val_correlation_coefficient: 0.6307\n", "Epoch 70/100\n", "640/640 [==============================] - 0s 265us/step - loss: 1.3661 - correlation_coefficient: 0.7346 - val_loss: 1.5595 - val_correlation_coefficient: 0.6323\n", "Epoch 71/100\n", "640/640 [==============================] - 0s 263us/step - loss: 1.3256 - correlation_coefficient: 0.7368 - val_loss: 1.5264 - val_correlation_coefficient: 0.6359\n", "Epoch 72/100\n", "640/640 [==============================] - 0s 267us/step - loss: 1.2576 - correlation_coefficient: 0.7392 - val_loss: 1.5557 - val_correlation_coefficient: 0.6399\n", "Epoch 73/100\n", "640/640 [==============================] - 0s 284us/step - loss: 1.3466 - correlation_coefficient: 0.7428 - val_loss: 1.5028 - val_correlation_coefficient: 0.6387\n", "Epoch 74/100\n", "640/640 [==============================] - 0s 255us/step - loss: 1.3410 - correlation_coefficient: 0.7490 - val_loss: 1.5340 - val_correlation_coefficient: 0.6448\n", "Epoch 75/100\n", "640/640 [==============================] - 0s 272us/step - loss: 1.2933 - correlation_coefficient: 0.7412 - val_loss: 1.4825 - val_correlation_coefficient: 0.6429\n", "Epoch 76/100\n", "640/640 [==============================] - 0s 268us/step - loss: 1.3101 - correlation_coefficient: 0.7475 - val_loss: 1.5975 - val_correlation_coefficient: 0.6361\n", "Epoch 77/100\n", "640/640 [==============================] - 0s 267us/step - loss: 1.2896 - correlation_coefficient: 0.7474 - val_loss: 1.9291 - val_correlation_coefficient: 0.6309\n", "Epoch 78/100\n", "640/640 [==============================] - 0s 251us/step - loss: 1.3381 - correlation_coefficient: 0.7473 - val_loss: 1.6367 - val_correlation_coefficient: 0.6364\n", "Epoch 79/100\n", "640/640 [==============================] - 0s 296us/step - loss: 1.2642 - correlation_coefficient: 0.7433 - val_loss: 1.4892 - val_correlation_coefficient: 0.6421\n", "Epoch 80/100\n", "640/640 [==============================] - 0s 288us/step - loss: 1.2752 - correlation_coefficient: 0.7498 - val_loss: 1.4824 - val_correlation_coefficient: 0.6489\n", "Epoch 81/100\n", "640/640 [==============================] - 0s 285us/step - loss: 1.2757 - correlation_coefficient: 0.7505 - val_loss: 1.6808 - val_correlation_coefficient: 0.6387\n", "Epoch 82/100\n", "640/640 [==============================] - 0s 283us/step - loss: 1.2903 - correlation_coefficient: 0.7474 - val_loss: 1.5281 - val_correlation_coefficient: 0.6486\n", "Epoch 83/100\n", "640/640 [==============================] - 0s 242us/step - loss: 1.3224 - correlation_coefficient: 0.7454 - val_loss: 1.4850 - val_correlation_coefficient: 0.6452\n", "Epoch 84/100\n", "640/640 [==============================] - 0s 261us/step - loss: 1.2617 - correlation_coefficient: 0.7485 - val_loss: 1.4675 - val_correlation_coefficient: 0.6469\n", "Epoch 85/100\n", "640/640 [==============================] - 0s 245us/step - loss: 1.2377 - correlation_coefficient: 0.7535 - val_loss: 1.5047 - val_correlation_coefficient: 0.6443\n", "Epoch 86/100\n", "640/640 [==============================] - 0s 279us/step - loss: 1.2069 - correlation_coefficient: 0.7582 - val_loss: 1.4693 - val_correlation_coefficient: 0.6475\n", "Epoch 87/100\n", "640/640 [==============================] - 0s 257us/step - loss: 1.2244 - correlation_coefficient: 0.7621 - val_loss: 1.5267 - val_correlation_coefficient: 0.6445\n", "Epoch 88/100\n", "640/640 [==============================] - 0s 243us/step - loss: 1.2073 - correlation_coefficient: 0.7568 - val_loss: 1.5674 - val_correlation_coefficient: 0.6435\n", "Epoch 89/100\n", "640/640 [==============================] - 0s 247us/step - loss: 1.2329 - correlation_coefficient: 0.7530 - val_loss: 1.6846 - val_correlation_coefficient: 0.6475\n", "Epoch 90/100\n", "640/640 [==============================] - 0s 238us/step - loss: 1.2679 - correlation_coefficient: 0.7635 - val_loss: 1.5377 - val_correlation_coefficient: 0.6495\n", "Epoch 91/100\n", "640/640 [==============================] - 0s 276us/step - loss: 1.2640 - correlation_coefficient: 0.7458 - val_loss: 1.4713 - val_correlation_coefficient: 0.6495\n", "Epoch 92/100\n", "640/640 [==============================] - 0s 241us/step - loss: 1.2375 - correlation_coefficient: 0.7641 - val_loss: 1.9712 - val_correlation_coefficient: 0.6399\n", "Epoch 93/100\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "640/640 [==============================] - 0s 263us/step - loss: 1.2880 - correlation_coefficient: 0.7579 - val_loss: 1.4522 - val_correlation_coefficient: 0.6534\n", "Epoch 94/100\n", "640/640 [==============================] - 1s 896us/step - loss: 1.2377 - correlation_coefficient: 0.7704 - val_loss: 1.5802 - val_correlation_coefficient: 0.6459\n", "Epoch 95/100\n", "640/640 [==============================] - 0s 686us/step - loss: 1.2417 - correlation_coefficient: 0.7593 - val_loss: 1.4834 - val_correlation_coefficient: 0.6501\n", "Epoch 96/100\n", "640/640 [==============================] - 0s 480us/step - loss: 1.2272 - correlation_coefficient: 0.7595 - val_loss: 1.4934 - val_correlation_coefficient: 0.6457\n", "Epoch 97/100\n", "640/640 [==============================] - 1s 878us/step - loss: 1.1731 - correlation_coefficient: 0.7584 - val_loss: 1.5022 - val_correlation_coefficient: 0.6461\n", "Epoch 98/100\n", "640/640 [==============================] - 0s 414us/step - loss: 1.1756 - correlation_coefficient: 0.7568 - val_loss: 1.5204 - val_correlation_coefficient: 0.6495\n", "Epoch 99/100\n", "640/640 [==============================] - 0s 707us/step - loss: 1.1885 - correlation_coefficient: 0.7573 - val_loss: 1.5397 - val_correlation_coefficient: 0.6489\n", "Epoch 100/100\n", "640/640 [==============================] - 1s 939us/step - loss: 1.1638 - correlation_coefficient: 0.7519 - val_loss: 1.4949 - val_correlation_coefficient: 0.6493\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "[root |INFO|build_network.py:87] Load trained model weight at ./weight_0.h5 \n", "[root |INFO|build_network.py:147] Training end with time 26.963207721710205!\n", "[root |INFO|build_network.py:83] Saved trained model weight at ./weight_0.h5 \n", "[root |DEBUG|deepbiome.py:185] Save weight at ./weight_0.h5\n", "[root |DEBUG|deepbiome.py:188] Save history at ./hist_0.json\n", "[root |INFO|build_network.py:173] Evaluation start!\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\r", "800/800 [==============================] - 0s 5us/step\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "[root |INFO|build_network.py:178] Evaluation end with time 0.007388114929199219!\n", "[root |INFO|build_network.py:179] Evaluation: [1.2927197217941284, 0.7277674078941345]\n", "[root |INFO|build_network.py:173] Evaluation start!\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\r", "200/200 [==============================] - 0s 14us/step\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "[root |INFO|build_network.py:178] Evaluation end with time 0.005715370178222656!\n", "[root |INFO|build_network.py:179] Evaluation: [1.624261736869812, 0.6726546883583069]\n", "[root |INFO|deepbiome.py:199] Compute time : 27.916018962860107\n", "[root |INFO|deepbiome.py:200] 1 fold computing end!---------------------------------------------\n", "[root |INFO|deepbiome.py:153] -------2 simulation start!----------------------------------\n", "[root |INFO|readers.py:58] -----------------------------------------------------------------------\n", "[root |INFO|readers.py:59] Construct Dataset\n", "[root |INFO|readers.py:60] -----------------------------------------------------------------------\n", "[root |INFO|readers.py:61] Load data\n", "[root |INFO|deepbiome.py:164] -----------------------------------------------------------------\n", "[root |INFO|deepbiome.py:165] Build network for 2 simulation\n", "[root |INFO|build_network.py:521] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:522] Read phylogenetic tree information from /DATA/home/muha/github_repos/deepbiome/deepbiome/tests/data/genus48_dic.csv\n", "[root |INFO|build_network.py:528] Phylogenetic tree level list: ['Genus', 'Family', 'Order', 'Class', 'Phylum']\n", "[root |INFO|build_network.py:529] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:537] Genus: 48\n", "[root |INFO|build_network.py:537] Family: 40\n", "[root |INFO|build_network.py:537] Order: 23\n", "[root |INFO|build_network.py:537] Class: 17\n", "[root |INFO|build_network.py:537] Phylum: 9\n", "[root |INFO|build_network.py:546] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:547] Phylogenetic_tree_dict info: ['Phylum', 'Order', 'Genus', 'Number', 'Family', 'Class']\n", "[root |INFO|build_network.py:548] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:558] Build edge weights between [ Genus, Family]\n", "[root |INFO|build_network.py:558] Build edge weights between [Family, Order]\n", "[root |INFO|build_network.py:558] Build edge weights between [ Order, Class]\n", "[root |INFO|build_network.py:558] Build edge weights between [ Class, Phylum]\n", "[root |INFO|build_network.py:571] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:586] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:587] Build network based on phylogenetic tree information\n", "[root |INFO|build_network.py:588] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:670] ------------------------------------------------------------------------------------------\n", "[root |INFO|build_network.py:61] Build Network\n", "[root |INFO|build_network.py:62] Optimizer = adam\n", "[root |INFO|build_network.py:63] Loss = mean_squared_error\n", "[root |INFO|build_network.py:64] Metrics = correlation_coefficient\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Model: \"model_1\"\n", "_________________________________________________________________\n", "Layer (type) Output Shape Param # \n", "=================================================================\n", "input (InputLayer) (None, 48) 0 \n", "_________________________________________________________________\n", "l1_dense (Dense_with_tree) (None, 40) 1960 \n", "_________________________________________________________________\n", "l1_activation (Activation) (None, 40) 0 \n", "_________________________________________________________________\n", "l2_dense (Dense_with_tree) (None, 23) 943 \n", "_________________________________________________________________\n", "l2_activation (Activation) (None, 23) 0 \n", "_________________________________________________________________\n", "l3_dense (Dense_with_tree) (None, 17) 408 \n", "_________________________________________________________________\n", "l3_activation (Activation) (None, 17) 0 \n", "_________________________________________________________________\n", "l4_dense (Dense_with_tree) (None, 9) 162 \n", "_________________________________________________________________\n", "l4_activation (Activation) (None, 9) 0 \n", "_________________________________________________________________\n", "last_dense_h (Dense) (None, 1) 10 \n", "_________________________________________________________________\n", "p_hat (Activation) (None, 1) 0 \n", "=================================================================\n", "Total params: 3,483\n", "Trainable params: 3,483\n", "Non-trainable params: 0\n", "_________________________________________________________________\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "[root |INFO|deepbiome.py:176] -----------------------------------------------------------------\n", "[root |INFO|deepbiome.py:177] 2 fold computing start!----------------------------------\n", "[root |INFO|build_network.py:137] Training start!\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Train on 640 samples, validate on 160 samples\n", "Epoch 1/100\n", "640/640 [==============================] - 0s 700us/step - loss: 17.4694 - correlation_coefficient: -0.0394 - val_loss: 16.3774 - val_correlation_coefficient: 0.1229\n", "Epoch 2/100\n", "640/640 [==============================] - 0s 223us/step - loss: 13.7952 - correlation_coefficient: -0.0199 - val_loss: 11.6304 - val_correlation_coefficient: 0.1194\n", "Epoch 3/100\n", "640/640 [==============================] - 0s 257us/step - loss: 8.3697 - correlation_coefficient: -0.0033 - val_loss: 5.4165 - val_correlation_coefficient: 0.1149\n", "Epoch 4/100\n", "640/640 [==============================] - 0s 226us/step - loss: 3.5006 - correlation_coefficient: -0.0653 - val_loss: 2.4501 - val_correlation_coefficient: 0.1108\n", "Epoch 5/100\n", "640/640 [==============================] - 0s 254us/step - loss: 2.6447 - correlation_coefficient: -0.0627 - val_loss: 2.4448 - val_correlation_coefficient: 0.1149\n", "Epoch 6/100\n", "640/640 [==============================] - 0s 253us/step - loss: 2.5895 - correlation_coefficient: -0.0222 - val_loss: 2.4641 - val_correlation_coefficient: 0.1173\n", "Epoch 7/100\n", "640/640 [==============================] - 1s 902us/step - loss: 2.5864 - correlation_coefficient: -0.0448 - val_loss: 2.4512 - val_correlation_coefficient: 0.1191\n", "Epoch 8/100\n", "640/640 [==============================] - 0s 678us/step - loss: 2.5841 - correlation_coefficient: -0.0262 - val_loss: 2.4563 - val_correlation_coefficient: 0.1219\n", "Epoch 9/100\n", "640/640 [==============================] - 0s 498us/step - loss: 2.5850 - correlation_coefficient: -0.0062 - val_loss: 2.4596 - val_correlation_coefficient: 0.1240\n", "Epoch 10/100\n", "640/640 [==============================] - 1s 893us/step - loss: 2.5872 - correlation_coefficient: 0.0039 - val_loss: 2.4556 - val_correlation_coefficient: 0.1259\n", "Epoch 11/100\n", "640/640 [==============================] - 0s 467us/step - loss: 2.5826 - correlation_coefficient: -0.0057 - val_loss: 2.4694 - val_correlation_coefficient: 0.1276\n", "Epoch 12/100\n", "640/640 [==============================] - 0s 666us/step - loss: 2.5841 - correlation_coefficient: -0.0094 - val_loss: 2.4505 - val_correlation_coefficient: 0.1301\n", "Epoch 13/100\n", "640/640 [==============================] - 1s 917us/step - loss: 2.5816 - correlation_coefficient: 0.0084 - val_loss: 2.4635 - val_correlation_coefficient: 0.1326\n", "Epoch 14/100\n", "640/640 [==============================] - 0s 252us/step - loss: 2.5930 - correlation_coefficient: 0.0357 - val_loss: 2.4496 - val_correlation_coefficient: 0.1322\n", "Epoch 15/100\n", "640/640 [==============================] - 0s 268us/step - loss: 2.5892 - correlation_coefficient: 0.0390 - val_loss: 2.4636 - val_correlation_coefficient: 0.1272\n", "Epoch 16/100\n", "640/640 [==============================] - 0s 282us/step - loss: 2.5890 - correlation_coefficient: 0.0608 - val_loss: 2.4582 - val_correlation_coefficient: 0.1222\n", "Epoch 17/100\n", "640/640 [==============================] - 0s 246us/step - loss: 2.5836 - correlation_coefficient: 0.0699 - val_loss: 2.4677 - val_correlation_coefficient: 0.1110\n", "Epoch 18/100\n", "640/640 [==============================] - 0s 235us/step - loss: 2.5865 - correlation_coefficient: 0.1019 - val_loss: 2.4577 - val_correlation_coefficient: 0.0894\n", "Epoch 19/100\n", "640/640 [==============================] - 0s 279us/step - loss: 2.5892 - correlation_coefficient: 0.1535 - val_loss: 2.4492 - val_correlation_coefficient: 0.0600\n", "Epoch 20/100\n", "640/640 [==============================] - 0s 292us/step - loss: 2.5859 - correlation_coefficient: 0.1653 - val_loss: 2.4564 - val_correlation_coefficient: 0.0156\n", "Epoch 21/100\n", "640/640 [==============================] - 0s 267us/step - loss: 2.5828 - correlation_coefficient: 0.1794 - val_loss: 2.4516 - val_correlation_coefficient: -0.0116\n", "Epoch 22/100\n", "640/640 [==============================] - 0s 266us/step - loss: 2.5912 - correlation_coefficient: 0.1709 - val_loss: 2.4614 - val_correlation_coefficient: -0.0302\n", "Epoch 23/100\n", "640/640 [==============================] - 0s 238us/step - loss: 2.5854 - correlation_coefficient: 0.1658 - val_loss: 2.4560 - val_correlation_coefficient: -0.0388\n", "Epoch 24/100\n", "640/640 [==============================] - 0s 236us/step - loss: 2.5865 - correlation_coefficient: 0.1754 - val_loss: 2.4705 - val_correlation_coefficient: -0.0494\n", "Epoch 25/100\n", "640/640 [==============================] - 0s 250us/step - loss: 2.5848 - correlation_coefficient: 0.1768 - val_loss: 2.4782 - val_correlation_coefficient: -0.0524\n", "Epoch 26/100\n", "640/640 [==============================] - 0s 241us/step - loss: 2.5789 - correlation_coefficient: 0.1798 - val_loss: 2.4478 - val_correlation_coefficient: -0.0491\n", "Epoch 27/100\n", "640/640 [==============================] - 0s 242us/step - loss: 2.5984 - correlation_coefficient: 0.1388 - val_loss: 2.4554 - val_correlation_coefficient: -0.0513\n", "Epoch 28/100\n", "640/640 [==============================] - 0s 241us/step - loss: 2.5799 - correlation_coefficient: 0.1513 - val_loss: 2.4510 - val_correlation_coefficient: -0.0565\n", "Epoch 29/100\n", "640/640 [==============================] - 0s 218us/step - loss: 2.5798 - correlation_coefficient: 0.1699 - val_loss: 2.4631 - val_correlation_coefficient: -0.0582\n", "Epoch 30/100\n", "640/640 [==============================] - 0s 265us/step - loss: 2.5834 - correlation_coefficient: 0.1479 - val_loss: 2.4578 - val_correlation_coefficient: -0.0570\n", "Epoch 31/100\n", "640/640 [==============================] - 0s 255us/step - loss: 2.5926 - correlation_coefficient: 0.1060 - val_loss: 2.4480 - val_correlation_coefficient: -0.0557\n", "Epoch 32/100\n", "640/640 [==============================] - 0s 276us/step - loss: 2.5967 - correlation_coefficient: 0.1639 - val_loss: 2.4609 - val_correlation_coefficient: -0.0586\n", "Epoch 33/100\n", "640/640 [==============================] - 0s 266us/step - loss: 2.5830 - correlation_coefficient: 0.1401 - val_loss: 2.4519 - val_correlation_coefficient: -0.0583\n", "Epoch 34/100\n", "640/640 [==============================] - 0s 261us/step - loss: 2.5809 - correlation_coefficient: 0.1719 - val_loss: 2.4574 - val_correlation_coefficient: -0.0601\n", "Epoch 35/100\n", "640/640 [==============================] - 0s 272us/step - loss: 2.5847 - correlation_coefficient: 0.1353 - val_loss: 2.4542 - val_correlation_coefficient: -0.0607\n", "Epoch 36/100\n", "640/640 [==============================] - 0s 242us/step - loss: 2.5873 - correlation_coefficient: 0.1306 - val_loss: 2.4678 - val_correlation_coefficient: -0.0628\n", "Epoch 37/100\n", "640/640 [==============================] - 0s 254us/step - loss: 2.5829 - correlation_coefficient: 0.1282 - val_loss: 2.4634 - val_correlation_coefficient: -0.0618\n", "Epoch 38/100\n", "640/640 [==============================] - 0s 264us/step - loss: 2.5934 - correlation_coefficient: 0.1306 - val_loss: 2.4621 - val_correlation_coefficient: -0.0630\n", "Epoch 39/100\n", "640/640 [==============================] - 0s 278us/step - loss: 2.5876 - correlation_coefficient: 0.1516 - val_loss: 2.4589 - val_correlation_coefficient: -0.0638\n", "Epoch 40/100\n", "640/640 [==============================] - 0s 265us/step - loss: 2.5853 - correlation_coefficient: 0.1458 - val_loss: 2.4603 - val_correlation_coefficient: -0.0643\n", "Epoch 41/100\n", "640/640 [==============================] - 0s 260us/step - loss: 2.5888 - correlation_coefficient: 0.1654 - val_loss: 2.4575 - val_correlation_coefficient: -0.0648\n", "Epoch 42/100\n", "640/640 [==============================] - 0s 251us/step - loss: 2.5819 - correlation_coefficient: 0.1309 - val_loss: 2.4637 - val_correlation_coefficient: -0.0646\n", "Epoch 43/100\n", "640/640 [==============================] - 0s 275us/step - loss: 2.5765 - correlation_coefficient: 0.1471 - val_loss: 2.4487 - val_correlation_coefficient: -0.0623\n", "Epoch 44/100\n", "640/640 [==============================] - 0s 292us/step - loss: 2.5931 - correlation_coefficient: 0.1078 - val_loss: 2.4654 - val_correlation_coefficient: -0.0649\n", "Epoch 45/100\n", "640/640 [==============================] - 0s 265us/step - loss: 2.5768 - correlation_coefficient: 0.1016 - val_loss: 2.4533 - val_correlation_coefficient: -0.0630\n", "Epoch 46/100\n", "640/640 [==============================] - 0s 259us/step - loss: 2.5787 - correlation_coefficient: 0.1383 - val_loss: 2.4548 - val_correlation_coefficient: -0.0631\n", "Epoch 47/100\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "640/640 [==============================] - 0s 273us/step - loss: 2.5865 - correlation_coefficient: 0.1341 - val_loss: 2.4711 - val_correlation_coefficient: -0.0643\n", "Epoch 48/100\n", "640/640 [==============================] - 0s 275us/step - loss: 2.6104 - correlation_coefficient: 0.1630 - val_loss: 2.4586 - val_correlation_coefficient: -0.0633\n", "Epoch 49/100\n", "640/640 [==============================] - 0s 223us/step - loss: 2.5834 - correlation_coefficient: 0.1256 - val_loss: 2.4513 - val_correlation_coefficient: -0.0617\n", "Epoch 50/100\n", "640/640 [==============================] - 0s 250us/step - loss: 2.5884 - correlation_coefficient: 0.1367 - val_loss: 2.4553 - val_correlation_coefficient: -0.0616\n", "Epoch 51/100\n", "640/640 [==============================] - 0s 247us/step - loss: 2.5805 - correlation_coefficient: 0.1286 - val_loss: 2.4600 - val_correlation_coefficient: -0.0623\n", "Epoch 52/100\n", "640/640 [==============================] - 0s 295us/step - loss: 2.5854 - correlation_coefficient: 0.1110 - val_loss: 2.4713 - val_correlation_coefficient: -0.0619\n", "Epoch 53/100\n", "640/640 [==============================] - 0s 284us/step - loss: 2.5768 - correlation_coefficient: 0.1590 - val_loss: 2.4515 - val_correlation_coefficient: -0.0604\n", "Epoch 54/100\n", "640/640 [==============================] - 0s 290us/step - loss: 2.5844 - correlation_coefficient: 0.1283 - val_loss: 2.4606 - val_correlation_coefficient: -0.0598\n", "Epoch 55/100\n", "640/640 [==============================] - 0s 281us/step - loss: 2.5741 - correlation_coefficient: 0.1477 - val_loss: 2.4509 - val_correlation_coefficient: -0.0577\n", "Epoch 56/100\n", "640/640 [==============================] - 0s 253us/step - loss: 2.5740 - correlation_coefficient: 0.1283 - val_loss: 2.4629 - val_correlation_coefficient: -0.0583\n", "Epoch 57/100\n", "640/640 [==============================] - 0s 274us/step - loss: 2.5823 - correlation_coefficient: 0.1622 - val_loss: 2.4552 - val_correlation_coefficient: -0.0550\n", "Epoch 58/100\n", "640/640 [==============================] - 1s 864us/step - loss: 2.5715 - correlation_coefficient: 0.1389 - val_loss: 2.4653 - val_correlation_coefficient: -0.0556\n", "Epoch 59/100\n", "640/640 [==============================] - 0s 243us/step - loss: 2.5784 - correlation_coefficient: 0.1387 - val_loss: 2.4763 - val_correlation_coefficient: -0.0550\n", "Epoch 60/100\n", "640/640 [==============================] - 0s 250us/step - loss: 2.5839 - correlation_coefficient: 0.1636 - val_loss: 2.4630 - val_correlation_coefficient: -0.0522\n", "Epoch 61/100\n", "640/640 [==============================] - 0s 217us/step - loss: 2.5826 - correlation_coefficient: 0.1819 - val_loss: 2.4896 - val_correlation_coefficient: -0.0513\n", "Epoch 62/100\n", "640/640 [==============================] - 0s 260us/step - loss: 2.5791 - correlation_coefficient: 0.1344 - val_loss: 2.4534 - val_correlation_coefficient: -0.0478\n", "Epoch 63/100\n", "640/640 [==============================] - 0s 280us/step - loss: 2.5766 - correlation_coefficient: 0.1637 - val_loss: 2.4556 - val_correlation_coefficient: -0.0470\n", "Epoch 64/100\n", "640/640 [==============================] - 0s 282us/step - loss: 2.5706 - correlation_coefficient: 0.1441 - val_loss: 2.4528 - val_correlation_coefficient: -0.0446\n", "Epoch 65/100\n", "640/640 [==============================] - 0s 266us/step - loss: 2.5745 - correlation_coefficient: 0.1400 - val_loss: 2.4598 - val_correlation_coefficient: -0.0417\n", "Epoch 66/100\n", "640/640 [==============================] - 0s 259us/step - loss: 2.5949 - correlation_coefficient: 0.0984 - val_loss: 2.4488 - val_correlation_coefficient: -0.0401\n", "Epoch 67/100\n", "640/640 [==============================] - 0s 272us/step - loss: 2.5726 - correlation_coefficient: 0.1649 - val_loss: 2.4634 - val_correlation_coefficient: -0.0409\n", "Epoch 68/100\n", "640/640 [==============================] - 0s 248us/step - loss: 2.5773 - correlation_coefficient: 0.1483 - val_loss: 2.4625 - val_correlation_coefficient: -0.0403\n", "Epoch 69/100\n", "640/640 [==============================] - 0s 269us/step - loss: 2.5776 - correlation_coefficient: 0.1667 - val_loss: 2.4814 - val_correlation_coefficient: -0.0401\n", "Epoch 70/100\n", "640/640 [==============================] - 0s 295us/step - loss: 2.5828 - correlation_coefficient: 0.1459 - val_loss: 2.4642 - val_correlation_coefficient: -0.0390\n", "Epoch 71/100\n", "640/640 [==============================] - 0s 252us/step - loss: 2.5837 - correlation_coefficient: 0.1473 - val_loss: 2.4626 - val_correlation_coefficient: -0.0379\n", "Epoch 72/100\n", "640/640 [==============================] - 0s 252us/step - loss: 2.5754 - correlation_coefficient: 0.1594 - val_loss: 2.4627 - val_correlation_coefficient: -0.0381\n", "Epoch 73/100\n", "640/640 [==============================] - 0s 253us/step - loss: 2.5745 - correlation_coefficient: 0.1626 - val_loss: 2.4712 - val_correlation_coefficient: -0.0361\n", "Epoch 74/100\n", "640/640 [==============================] - 0s 259us/step - loss: 2.5677 - correlation_coefficient: 0.1739 - val_loss: 2.4636 - val_correlation_coefficient: -0.0362\n", "Epoch 75/100\n", "640/640 [==============================] - 0s 257us/step - loss: 2.5635 - correlation_coefficient: 0.1635 - val_loss: 2.4610 - val_correlation_coefficient: -0.0332\n", "Epoch 76/100\n", "640/640 [==============================] - 0s 282us/step - loss: 2.5667 - correlation_coefficient: 0.1350 - val_loss: 2.4708 - val_correlation_coefficient: -0.0327\n", "Epoch 77/100\n", "640/640 [==============================] - 1s 873us/step - loss: 2.5642 - correlation_coefficient: 0.1511 - val_loss: 2.4610 - val_correlation_coefficient: -0.0327\n", "Epoch 78/100\n", "640/640 [==============================] - 0s 421us/step - loss: 2.5692 - correlation_coefficient: 0.1627 - val_loss: 2.4541 - val_correlation_coefficient: -0.0315\n", "Epoch 79/100\n", "640/640 [==============================] - 0s 779us/step - loss: 2.5686 - correlation_coefficient: 0.1673 - val_loss: 2.4629 - val_correlation_coefficient: -0.0315\n", "Epoch 80/100\n", "640/640 [==============================] - 1s 904us/step - loss: 2.5647 - correlation_coefficient: 0.1609 - val_loss: 2.4608 - val_correlation_coefficient: -0.0301\n", "Epoch 81/100\n", "640/640 [==============================] - 0s 297us/step - loss: 2.5569 - correlation_coefficient: 0.1479 - val_loss: 2.4631 - val_correlation_coefficient: -0.0295\n", "Epoch 82/100\n", "640/640 [==============================] - 1s 966us/step - loss: 2.5597 - correlation_coefficient: 0.1690 - val_loss: 2.4647 - val_correlation_coefficient: -0.0279\n", "Epoch 83/100\n", "640/640 [==============================] - 0s 509us/step - loss: 2.5598 - correlation_coefficient: 0.1660 - val_loss: 2.4717 - val_correlation_coefficient: -0.0280\n", "Epoch 84/100\n", "640/640 [==============================] - 0s 704us/step - loss: 2.5668 - correlation_coefficient: 0.1693 - val_loss: 2.4844 - val_correlation_coefficient: -0.0263\n", "Epoch 85/100\n", "640/640 [==============================] - 1s 947us/step - loss: 2.5583 - correlation_coefficient: 0.1521 - val_loss: 2.4551 - val_correlation_coefficient: -0.0257\n", "Epoch 86/100\n", "640/640 [==============================] - 0s 697us/step - loss: 2.5563 - correlation_coefficient: 0.1314 - val_loss: 2.4914 - val_correlation_coefficient: -0.0257\n", "Epoch 87/100\n", "640/640 [==============================] - 0s 462us/step - loss: 2.5806 - correlation_coefficient: 0.1442 - val_loss: 2.4575 - val_correlation_coefficient: -0.0259\n", "Epoch 88/100\n", "640/640 [==============================] - 1s 942us/step - loss: 2.5514 - correlation_coefficient: 0.1630 - val_loss: 2.4945 - val_correlation_coefficient: -0.0247\n", "Epoch 89/100\n", "640/640 [==============================] - 0s 433us/step - loss: 2.5546 - correlation_coefficient: 0.1433 - val_loss: 2.4615 - val_correlation_coefficient: -0.0246\n", "Epoch 90/100\n", "640/640 [==============================] - 0s 761us/step - loss: 2.5534 - correlation_coefficient: 0.1578 - val_loss: 2.4713 - val_correlation_coefficient: -0.0233\n", "Epoch 91/100\n", "640/640 [==============================] - 0s 283us/step - loss: 2.5779 - correlation_coefficient: 0.1649 - val_loss: 2.4543 - val_correlation_coefficient: -0.0234\n", "Epoch 92/100\n", "640/640 [==============================] - 0s 268us/step - loss: 2.5666 - correlation_coefficient: 0.1743 - val_loss: 2.4587 - val_correlation_coefficient: -0.0238\n", "Epoch 93/100\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "640/640 [==============================] - 0s 291us/step - loss: 2.5522 - correlation_coefficient: 0.1509 - val_loss: 2.4592 - val_correlation_coefficient: -0.0232\n", "Epoch 94/100\n", "640/640 [==============================] - 0s 285us/step - loss: 2.5617 - correlation_coefficient: 0.1643 - val_loss: 2.4617 - val_correlation_coefficient: -0.0240\n", "Epoch 95/100\n", "640/640 [==============================] - 0s 282us/step - loss: 2.5532 - correlation_coefficient: 0.1524 - val_loss: 2.4779 - val_correlation_coefficient: -0.0249\n", "Epoch 96/100\n", "640/640 [==============================] - 0s 282us/step - loss: 2.5633 - correlation_coefficient: 0.1654 - val_loss: 2.4555 - val_correlation_coefficient: -0.0249\n", "Epoch 97/100\n", "640/640 [==============================] - 0s 284us/step - loss: 2.5548 - correlation_coefficient: 0.1697 - val_loss: 2.4718 - val_correlation_coefficient: -0.0249\n", "Epoch 98/100\n", "640/640 [==============================] - 0s 303us/step - loss: 2.5607 - correlation_coefficient: 0.1594 - val_loss: 2.4713 - val_correlation_coefficient: -0.0246\n", "Epoch 99/100\n", "640/640 [==============================] - 0s 304us/step - loss: 2.5468 - correlation_coefficient: 0.1710 - val_loss: 2.4757 - val_correlation_coefficient: -0.0244\n", "Epoch 100/100\n", "640/640 [==============================] - 0s 257us/step - loss: 2.5544 - correlation_coefficient: 0.1709 - val_loss: 2.4573 - val_correlation_coefficient: -0.0244\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "[root |INFO|build_network.py:87] Load trained model weight at ./weight_1.h5 \n", "[root |INFO|build_network.py:147] Training end with time 24.856287717819214!\n", "[root |INFO|build_network.py:83] Saved trained model weight at ./weight_1.h5 \n", "[root |DEBUG|deepbiome.py:185] Save weight at ./weight_1.h5\n", "[root |DEBUG|deepbiome.py:188] Save history at ./hist_1.json\n", "[root |INFO|build_network.py:173] Evaluation start!\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\r", "800/800 [==============================] - 0s 4us/step\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "[root |INFO|build_network.py:178] Evaluation end with time 0.006667137145996094!\n", "[root |INFO|build_network.py:179] Evaluation: [2.5581955909729004, -0.02809630148112774]\n", "[root |INFO|build_network.py:173] Evaluation start!\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\r", "200/200 [==============================] - 0s 23us/step\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "[root |INFO|build_network.py:178] Evaluation end with time 0.008564472198486328!\n", "[root |INFO|build_network.py:179] Evaluation: [2.524724245071411, 0.049455344676971436]\n", "[root |INFO|deepbiome.py:199] Compute time : 25.32423758506775\n", "[root |INFO|deepbiome.py:200] 2 fold computing end!---------------------------------------------\n", "[root |INFO|deepbiome.py:211] -----------------------------------------------------------------\n", "[root |INFO|deepbiome.py:212] Train Evaluation : ['loss' 'correlation_coefficient']\n", "[root |INFO|deepbiome.py:213] mean : [1.925 0.350]\n", "[root |INFO|deepbiome.py:214] std : [0.633 0.378]\n", "[root |INFO|deepbiome.py:215] -----------------------------------------------------------------\n", "[root |INFO|deepbiome.py:216] Test Evaluation : ['loss' 'correlation_coefficient']\n", "[root |INFO|deepbiome.py:217] mean : [2.074 0.361]\n", "[root |INFO|deepbiome.py:218] std : [0.450 0.312]\n", "[root |INFO|deepbiome.py:219] -----------------------------------------------------------------\n", "[root |INFO|deepbiome.py:230] Total Computing Ended\n", "[root |INFO|deepbiome.py:231] -----------------------------------------------------------------\n" ] } ], "source": [ "from deepbiome import deepbiome\n", "\n", "test_evaluation, train_evaluation, network = deepbiome.deepbiome_train(log, network_info, path_info, number_of_fold=2)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2" } }, "nbformat": 4, "nbformat_minor": 2 }