Megha31 commited on
Commit
7743b2d
1 Parent(s): b42b5b2

Upload HAR_Part_4.ipynb

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