Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollopy-tulane committed Apr 29, 2024
1 parent 066a875 commit 40e6daf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
Binary file removed nlp/cnn_model.h5
Binary file not shown.
Binary file modified nlp/tokenizer.pickle
Binary file not shown.
23 changes: 9 additions & 14 deletions notebooks/Experiment-CNN-1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,33 @@
"cells": [
{
"cell_type": "code",
"execution_count": 49,
"execution_count": 2,
"id": "70f2a5ec-67f6-4d3c-b912-717e401fc70e",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import tensorflow as tf\n",
"import keras as keras\n",
"import matplotlib.pyplot as plt\n",
"import random\n",
"from tensorflow.keras.models import Sequential\n",
"from tensorflow.keras.layers import Embedding, Flatten, Dense\n",
"from sklearn.model_selection import GridSearchCV\n",
"from tensorflow.keras.wrappers.scikit_learn import KerasClassifier\n",
"from tensorflow.keras.optimizers.legacy import Adam\n",
"from tensorflow.keras.layers import Embedding, Flatten, Dense, Conv1D, MaxPooling1D, GlobalMaxPooling1D, Dropout\n",
"from tensorflow.keras.optimizers import Adam\n",
"from tensorflow.keras.preprocessing.text import Tokenizer\n",
"from tensorflow.keras.preprocessing.sequence import pad_sequences\n",
"from sklearn.preprocessing import LabelEncoder\n",
"from sklearn.metrics import classification_report\n",
"from tensorflow.keras import layers\n",
"from keras.layers import Conv1D, MaxPooling1D, GlobalMaxPooling1D, Dropout\n",
"from tensorflow.keras.wrappers.scikit_learn import KerasClassifier\n",
"from tensorflow.keras.callbacks import EarlyStopping\n",
"from tensorflow.keras.regularizers import l2\n",
"from sklearn.metrics import f1_score, precision_score, recall_score\n",
"from sklearn.metrics import confusion_matrix, ConfusionMatrixDisplay\n",
"from sklearn.model_selection import GridSearchCV\n",
"from sklearn.preprocessing import LabelEncoder\n",
"from sklearn.metrics import classification_report, f1_score, precision_score, recall_score, confusion_matrix, ConfusionMatrixDisplay\n",
"import pickle"
]
},
{
"cell_type": "code",
"execution_count": 50,
"execution_count": 3,
"id": "7acbbe88-4550-41d6-b0bb-ede002bc4e0b",
"metadata": {},
"outputs": [],
Expand All @@ -45,7 +40,7 @@
},
{
"cell_type": "code",
"execution_count": 57,
"execution_count": 4,
"id": "1eac01e8-3c62-469b-96ea-d4babd8f9348",
"metadata": {},
"outputs": [
Expand Down

0 comments on commit 40e6daf

Please sign in to comment.