File size: 4,653 Bytes
7743b2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "sBCf6C09cb6Q"
      },
      "outputs": [],
      "source": [
        "from prettytable import PrettyTable"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "ptable1 = PrettyTable()\n",
        "ptable1.title = \" Model Comparision \"\n",
        "ptable1.field_names = ['Model Name','Hyperparameter Tunning', 'Accuracy']\n",
        "\n",
        "print(\"\\n\\n ********** Machine Learning Model Comparision ************\")\n",
        "ptable1.add_row([\"Logistic Regression\",\"Done\",\"95.83%\"])\n",
        "ptable1.add_row([\"Linear SVC  \",\"Done\",\"96.74%\"])\n",
        "ptable1.add_row([\"rbf SVM classifier\",\"Done\",\"96.27%\"])\n",
        "ptable1.add_row([\"DecisionTree\",\"Done\",\"87.78%\"])\n",
        "ptable1.add_row([\"Random Forest\",\"Done\",\"92.67%\"])\n",
        "\n",
        "print(ptable1)\n",
        "# *****************************************************************\n",
        "\n",
        "ptable2 = PrettyTable()\n",
        "ptable2.title = \" Model Comparision \"\n",
        "ptable2.field_names = ['Model Name','Hyperparameter Tunning', 'categorical_crossentropy', 'Accuracy']\n",
        "\n",
        "print(\"\\n\\n ********************************* Deep Learning LSTM Model Comparision ***********************************\")\n",
        "ptable2.add_row([\"LSTM With 1_Layer(neurons:32)\",\"Done\",\"0.47\", \"0.91\"])\n",
        "ptable2.add_row([\"LSTM With 2_Layer(neurons:48, neurons:32)\",\"Done\",\"0.39\", \"0.91\"])\n",
        "ptable2.add_row([\"LSTM With 2_Layer(neurons:64, neurons:48)\",\"Done\",\"0.27\", \"0.91\"])\n",
        "\n",
        "print(ptable2)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "RwKBoh7lfHtY",
        "outputId": "d04e7c3a-c526-413d-f3fa-4625f2442b98"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "\n",
            " ********** Machine Learning Model Comparision ************\n",
            "+---------------------------------------------------------+\n",
            "|                    Model Comparision                    |\n",
            "+---------------------+------------------------+----------+\n",
            "|      Model Name     | Hyperparameter Tunning | Accuracy |\n",
            "+---------------------+------------------------+----------+\n",
            "| Logistic Regression |          Done          |  95.83%  |\n",
            "|     Linear SVC      |          Done          |  96.74%  |\n",
            "|  rbf SVM classifier |          Done          |  96.27%  |\n",
            "|     DecisionTree    |          Done          |  87.78%  |\n",
            "|    Random Forest    |          Done          |  92.67%  |\n",
            "+---------------------+------------------------+----------+\n",
            "\n",
            "\n",
            " ********************************* Deep Learning LSTM Model Comparision ***********************************\n",
            "+----------------------------------------------------------------------------------------------------------+\n",
            "|                                            Model Comparision                                             |\n",
            "+-------------------------------------------+------------------------+--------------------------+----------+\n",
            "|                 Model Name                | Hyperparameter Tunning | categorical_crossentropy | Accuracy |\n",
            "+-------------------------------------------+------------------------+--------------------------+----------+\n",
            "|       LSTM With 1_Layer(neurons:32)       |          Done          |           0.47           |   0.92   |\n",
            "| LSTM With 2_Layer(neurons:48, neurons:32) |          Done          |           0.39           |   0.89   |\n",
            "| LSTM With 2_Layer(neurons:64, neurons:48) |          Done          |           0.27           |   0.91   |\n",
            "+-------------------------------------------+------------------------+--------------------------+----------+\n"
          ]
        }
      ]
    }
  ]
}