diff --git a/NN_ASL.ipynb b/NN_ASL.ipynb
new file mode 100644
index 0000000..341e4ca
--- /dev/null
+++ b/NN_ASL.ipynb
@@ -0,0 +1,1344 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ " "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "import string\n",
+ "letters = list(string.ascii_uppercase)\n",
+ "letters"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "aKh81whPBVoF",
+ "outputId": "72846ca9-ad45-4986-f19e-0ca37c6d3d0a"
+ },
+ "execution_count": 11,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "['A',\n",
+ " 'B',\n",
+ " 'C',\n",
+ " 'D',\n",
+ " 'E',\n",
+ " 'F',\n",
+ " 'G',\n",
+ " 'H',\n",
+ " 'I',\n",
+ " 'J',\n",
+ " 'K',\n",
+ " 'L',\n",
+ " 'M',\n",
+ " 'N',\n",
+ " 'O',\n",
+ " 'P',\n",
+ " 'Q',\n",
+ " 'R',\n",
+ " 'S',\n",
+ " 'T',\n",
+ " 'U',\n",
+ " 'V',\n",
+ " 'W',\n",
+ " 'X',\n",
+ " 'Y',\n",
+ " 'Z']"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 11
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "numbers = [str(num) for num in range(0, 10)]\n",
+ "numbers"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "6Qw32Ab3BWct",
+ "outputId": "3d6b0329-022b-4c28-ae0e-c4619994f2eb"
+ },
+ "execution_count": 12,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 12
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "class_names = letters + numbers\n",
+ "class_names"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "gWKw2PHVBY71",
+ "outputId": "e8ace820-2056-44b1-ca8b-7d0e4c75cef1"
+ },
+ "execution_count": 13,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "['A',\n",
+ " 'B',\n",
+ " 'C',\n",
+ " 'D',\n",
+ " 'E',\n",
+ " 'F',\n",
+ " 'G',\n",
+ " 'H',\n",
+ " 'I',\n",
+ " 'J',\n",
+ " 'K',\n",
+ " 'L',\n",
+ " 'M',\n",
+ " 'N',\n",
+ " 'O',\n",
+ " 'P',\n",
+ " 'Q',\n",
+ " 'R',\n",
+ " 'S',\n",
+ " 'T',\n",
+ " 'U',\n",
+ " 'V',\n",
+ " 'W',\n",
+ " 'X',\n",
+ " 'Y',\n",
+ " 'Z',\n",
+ " '0',\n",
+ " '1',\n",
+ " '2',\n",
+ " '3',\n",
+ " '4',\n",
+ " '5',\n",
+ " '6',\n",
+ " '7',\n",
+ " '8',\n",
+ " '9']"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 13
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "id": "NaL78iXS8c1x"
+ },
+ "outputs": [],
+ "source": [
+ "from sklearn.model_selection import train_test_split\n",
+ "from sklearn.preprocessing import StandardScaler\n",
+ "from sklearn.linear_model import LogisticRegression\n",
+ "from sklearn.pipeline import make_pipeline\n",
+ "from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier\n",
+ "import pandas as pd\n",
+ "from sklearn.metrics import accuracy_score"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 342
+ },
+ "id": "eLd9Znj-8gh-",
+ "outputId": "0abb326c-c87a-43d6-8d2e-075bd32d8181"
+ },
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ " class x1 y1 z1 v1 x2 y2 z2 \\\n",
+ "0 A 0.596015 0.598637 -5.351079e-07 0.0 0.524824 0.590247 0.003737 \n",
+ "1 A 0.582702 0.602976 -4.789155e-07 0.0 0.514781 0.599014 0.001139 \n",
+ "2 A 0.568719 0.601903 -4.693277e-07 0.0 0.502747 0.596997 0.000186 \n",
+ "3 A 0.559268 0.600854 -4.881787e-07 0.0 0.491037 0.593645 0.006739 \n",
+ "4 A 0.548125 0.613788 -4.889142e-07 0.0 0.476834 0.605301 0.008348 \n",
+ "\n",
+ " v2 x3 ... z19 v19 x20 y20 z20 v20 \\\n",
+ "0 0.0 0.483084 ... 0.008444 0.0 0.570060 0.442771 0.020445 0.0 \n",
+ "1 0.0 0.469273 ... 0.004532 0.0 0.555620 0.450476 0.013084 0.0 \n",
+ "2 0.0 0.459650 ... -0.004795 0.0 0.544712 0.446647 0.002810 0.0 \n",
+ "3 0.0 0.447823 ... 0.004258 0.0 0.532012 0.447075 0.011150 0.0 \n",
+ "4 0.0 0.434377 ... 0.007032 0.0 0.514065 0.463542 0.014416 0.0 \n",
+ "\n",
+ " x21 y21 z21 v21 \n",
+ "0 0.584027 0.460907 0.033485 0.0 \n",
+ "1 0.570349 0.470588 0.025043 0.0 \n",
+ "2 0.558533 0.469868 0.014419 0.0 \n",
+ "3 0.547573 0.469695 0.022285 0.0 \n",
+ "4 0.530254 0.481641 0.025965 0.0 \n",
+ "\n",
+ "[5 rows x 85 columns]"
+ ],
+ "text/html": [
+ "\n",
+ "
\n",
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " class \n",
+ " x1 \n",
+ " y1 \n",
+ " z1 \n",
+ " v1 \n",
+ " x2 \n",
+ " y2 \n",
+ " z2 \n",
+ " v2 \n",
+ " x3 \n",
+ " ... \n",
+ " z19 \n",
+ " v19 \n",
+ " x20 \n",
+ " y20 \n",
+ " z20 \n",
+ " v20 \n",
+ " x21 \n",
+ " y21 \n",
+ " z21 \n",
+ " v21 \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 \n",
+ " A \n",
+ " 0.596015 \n",
+ " 0.598637 \n",
+ " -5.351079e-07 \n",
+ " 0.0 \n",
+ " 0.524824 \n",
+ " 0.590247 \n",
+ " 0.003737 \n",
+ " 0.0 \n",
+ " 0.483084 \n",
+ " ... \n",
+ " 0.008444 \n",
+ " 0.0 \n",
+ " 0.570060 \n",
+ " 0.442771 \n",
+ " 0.020445 \n",
+ " 0.0 \n",
+ " 0.584027 \n",
+ " 0.460907 \n",
+ " 0.033485 \n",
+ " 0.0 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " A \n",
+ " 0.582702 \n",
+ " 0.602976 \n",
+ " -4.789155e-07 \n",
+ " 0.0 \n",
+ " 0.514781 \n",
+ " 0.599014 \n",
+ " 0.001139 \n",
+ " 0.0 \n",
+ " 0.469273 \n",
+ " ... \n",
+ " 0.004532 \n",
+ " 0.0 \n",
+ " 0.555620 \n",
+ " 0.450476 \n",
+ " 0.013084 \n",
+ " 0.0 \n",
+ " 0.570349 \n",
+ " 0.470588 \n",
+ " 0.025043 \n",
+ " 0.0 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " A \n",
+ " 0.568719 \n",
+ " 0.601903 \n",
+ " -4.693277e-07 \n",
+ " 0.0 \n",
+ " 0.502747 \n",
+ " 0.596997 \n",
+ " 0.000186 \n",
+ " 0.0 \n",
+ " 0.459650 \n",
+ " ... \n",
+ " -0.004795 \n",
+ " 0.0 \n",
+ " 0.544712 \n",
+ " 0.446647 \n",
+ " 0.002810 \n",
+ " 0.0 \n",
+ " 0.558533 \n",
+ " 0.469868 \n",
+ " 0.014419 \n",
+ " 0.0 \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " A \n",
+ " 0.559268 \n",
+ " 0.600854 \n",
+ " -4.881787e-07 \n",
+ " 0.0 \n",
+ " 0.491037 \n",
+ " 0.593645 \n",
+ " 0.006739 \n",
+ " 0.0 \n",
+ " 0.447823 \n",
+ " ... \n",
+ " 0.004258 \n",
+ " 0.0 \n",
+ " 0.532012 \n",
+ " 0.447075 \n",
+ " 0.011150 \n",
+ " 0.0 \n",
+ " 0.547573 \n",
+ " 0.469695 \n",
+ " 0.022285 \n",
+ " 0.0 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " A \n",
+ " 0.548125 \n",
+ " 0.613788 \n",
+ " -4.889142e-07 \n",
+ " 0.0 \n",
+ " 0.476834 \n",
+ " 0.605301 \n",
+ " 0.008348 \n",
+ " 0.0 \n",
+ " 0.434377 \n",
+ " ... \n",
+ " 0.007032 \n",
+ " 0.0 \n",
+ " 0.514065 \n",
+ " 0.463542 \n",
+ " 0.014416 \n",
+ " 0.0 \n",
+ " 0.530254 \n",
+ " 0.481641 \n",
+ " 0.025965 \n",
+ " 0.0 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
5 rows × 85 columns
\n",
+ "
\n",
+ "
\n",
+ "
\n"
+ ],
+ "application/vnd.google.colaboratory.intrinsic+json": {
+ "type": "dataframe",
+ "variable_name": "df"
+ }
+ },
+ "metadata": {},
+ "execution_count": 2
+ }
+ ],
+ "source": [
+ "df = pd.read_csv('coords.csv')\n",
+ "df.head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "id": "f6cy9XuW89Pf"
+ },
+ "outputs": [],
+ "source": [
+ "df.dropna(axis = 0, inplace = True)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "id": "dHl84A5m8g7u"
+ },
+ "outputs": [],
+ "source": [
+ "X = df.drop('class', axis = 1)\n",
+ "y = df['class']"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "id": "IK7_nzOj8g_N"
+ },
+ "outputs": [],
+ "source": [
+ "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.3, random_state = 42, stratify = y)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "id": "FNot1_Oe9vqY"
+ },
+ "outputs": [],
+ "source": [
+ "from tensorflow.keras import Sequential\n",
+ "from tensorflow.keras.layers import InputLayer, Dense"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "id": "VVm4I2yaAHZO"
+ },
+ "outputs": [],
+ "source": [
+ "def create_asl_nn():\n",
+ " model = Sequential([\n",
+ " Dense(input_shape=(84,), units=84, activation='relu'),\n",
+ " Dense(units=32, activation='relu'),\n",
+ " Dense(units=16, activation='relu'),\n",
+ " Dense(units=len(class_names), activation='softmax')\n",
+ " ])\n",
+ " model.compile(loss='sparse_categorical_crossentropy', optimizer='adam', metrics=[\"accuracy\"])\n",
+ " return model"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "from scikeras.wrappers import KerasClassifier\n",
+ "from sklearn.model_selection import StratifiedKFold, cross_val_score\n",
+ "from tensorflow.keras.callbacks import EarlyStopping\n",
+ "\n",
+ "trans = StratifiedKFold(n_splits=10, shuffle=True, random_state=42)\n",
+ "clf = KerasClassifier(create_asl_nn, epochs=100, batch_size=200, shuffle=True, verbose=1, validation_split=0.2 ,callbacks=[EarlyStopping(min_delta=0.001, patience=5)])\n",
+ "clf = make_pipeline(StandardScaler(), clf)"
+ ],
+ "metadata": {
+ "id": "uhwMyVvnB1ct"
+ },
+ "execution_count": 32,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "from sklearn.preprocessing import LabelEncoder\n",
+ "label_encoder = LabelEncoder()\n",
+ "y_train_n = label_encoder.fit_transform(y_train)\n",
+ "clf.fit(X_train, y_train_n)"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 1000
+ },
+ "id": "bFwiDde4Du9N",
+ "outputId": "b032b294-195a-49da-b668-77b065f03ff3"
+ },
+ "execution_count": 33,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Epoch 1/100\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "name": "stderr",
+ "text": [
+ "/usr/local/lib/python3.10/dist-packages/keras/src/layers/core/dense.py:87: UserWarning: Do not pass an `input_shape`/`input_dim` argument to a layer. When using Sequential models, prefer using an `Input(shape)` object as the first layer in the model instead.\n",
+ " super().__init__(activity_regularizer=activity_regularizer, **kwargs)\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m2s\u001b[0m 8ms/step - accuracy: 0.1050 - loss: 3.4341 - val_accuracy: 0.2773 - val_loss: 2.7735\n",
+ "Epoch 2/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.3401 - loss: 2.4661 - val_accuracy: 0.6292 - val_loss: 1.4795\n",
+ "Epoch 3/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.6920 - loss: 1.2431 - val_accuracy: 0.8196 - val_loss: 0.7415\n",
+ "Epoch 4/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.8494 - loss: 0.6514 - val_accuracy: 0.9066 - val_loss: 0.4452\n",
+ "Epoch 5/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9175 - loss: 0.4033 - val_accuracy: 0.9418 - val_loss: 0.3008\n",
+ "Epoch 6/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 4ms/step - accuracy: 0.9400 - loss: 0.2783 - val_accuracy: 0.9493 - val_loss: 0.2159\n",
+ "Epoch 7/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9538 - loss: 0.2002 - val_accuracy: 0.9642 - val_loss: 0.1642\n",
+ "Epoch 8/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9672 - loss: 0.1555 - val_accuracy: 0.9692 - val_loss: 0.1320\n",
+ "Epoch 9/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9731 - loss: 0.1168 - val_accuracy: 0.9801 - val_loss: 0.1081\n",
+ "Epoch 10/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 4ms/step - accuracy: 0.9777 - loss: 0.0995 - val_accuracy: 0.9816 - val_loss: 0.0925\n",
+ "Epoch 11/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9831 - loss: 0.0827 - val_accuracy: 0.9831 - val_loss: 0.0814\n",
+ "Epoch 12/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 4ms/step - accuracy: 0.9854 - loss: 0.0739 - val_accuracy: 0.9896 - val_loss: 0.0703\n",
+ "Epoch 13/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9842 - loss: 0.0669 - val_accuracy: 0.9896 - val_loss: 0.0647\n",
+ "Epoch 14/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9888 - loss: 0.0564 - val_accuracy: 0.9906 - val_loss: 0.0613\n",
+ "Epoch 15/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9920 - loss: 0.0479 - val_accuracy: 0.9916 - val_loss: 0.0538\n",
+ "Epoch 16/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9909 - loss: 0.0434 - val_accuracy: 0.9881 - val_loss: 0.0568\n",
+ "Epoch 17/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9920 - loss: 0.0393 - val_accuracy: 0.9906 - val_loss: 0.0513\n",
+ "Epoch 18/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9938 - loss: 0.0336 - val_accuracy: 0.9911 - val_loss: 0.0493\n",
+ "Epoch 19/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9931 - loss: 0.0341 - val_accuracy: 0.9925 - val_loss: 0.0438\n",
+ "Epoch 20/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9957 - loss: 0.0254 - val_accuracy: 0.9911 - val_loss: 0.0397\n",
+ "Epoch 21/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9962 - loss: 0.0222 - val_accuracy: 0.9920 - val_loss: 0.0398\n",
+ "Epoch 22/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9959 - loss: 0.0265 - val_accuracy: 0.9920 - val_loss: 0.0412\n",
+ "Epoch 23/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 4ms/step - accuracy: 0.9962 - loss: 0.0229 - val_accuracy: 0.9916 - val_loss: 0.0417\n",
+ "Epoch 24/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9968 - loss: 0.0192 - val_accuracy: 0.9920 - val_loss: 0.0353\n",
+ "Epoch 25/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9970 - loss: 0.0187 - val_accuracy: 0.9925 - val_loss: 0.0363\n",
+ "Epoch 26/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9975 - loss: 0.0169 - val_accuracy: 0.9925 - val_loss: 0.0362\n",
+ "Epoch 27/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9976 - loss: 0.0158 - val_accuracy: 0.9940 - val_loss: 0.0333\n",
+ "Epoch 28/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 4ms/step - accuracy: 0.9975 - loss: 0.0144 - val_accuracy: 0.9916 - val_loss: 0.0371\n",
+ "Epoch 29/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9976 - loss: 0.0154 - val_accuracy: 0.9925 - val_loss: 0.0327\n",
+ "Epoch 30/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9985 - loss: 0.0128 - val_accuracy: 0.9935 - val_loss: 0.0329\n",
+ "Epoch 31/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9935 - loss: 0.0232 - val_accuracy: 0.9925 - val_loss: 0.0360\n",
+ "Epoch 32/100\n",
+ "\u001b[1m41/41\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 3ms/step - accuracy: 0.9980 - loss: 0.0125 - val_accuracy: 0.9930 - val_loss: 0.0326\n"
+ ]
+ },
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "Pipeline(steps=[('standardscaler', StandardScaler()),\n",
+ " ('kerasclassifier',\n",
+ " KerasClassifier(batch_size=200, callbacks=[], epochs=100, model=, validation_split=0.2))])"
+ ],
+ "text/html": [
+ "Pipeline(steps=[('standardscaler', StandardScaler()),\n",
+ " ('kerasclassifier',\n",
+ " KerasClassifier(batch_size=200, callbacks=[<keras.src.callbacks.early_stopping.EarlyStopping object at 0x7850864e63b0>], epochs=100, model=<function create_asl_nn at 0x78508e5b2440>, validation_split=0.2))]) In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org. KerasClassifier KerasClassifier(\n",
+ "\tmodel=<function create_asl_nn at 0x78508e5b2440>\n",
+ "\tbuild_fn=None\n",
+ "\twarm_start=False\n",
+ "\trandom_state=None\n",
+ "\toptimizer=rmsprop\n",
+ "\tloss=None\n",
+ "\tmetrics=None\n",
+ "\tbatch_size=200\n",
+ "\tvalidation_batch_size=None\n",
+ "\tverbose=1\n",
+ "\tcallbacks=[<keras.src.callbacks.early_stopping.EarlyStopping object at 0x7850864e63b0>]\n",
+ "\tvalidation_split=0.2\n",
+ "\tshuffle=True\n",
+ "\trun_eagerly=False\n",
+ "\tepochs=100\n",
+ "\tclass_weight=None\n",
+ ") "
+ ]
+ },
+ "metadata": {},
+ "execution_count": 33
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "preds = clf.predict(X_test)\n",
+ "preds = label_encoder.inverse_transform(y=preds)\n",
+ "acc = accuracy_score(y_test, preds)\n",
+ "print('NN', acc)"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "Alf_C1_IGBXO",
+ "outputId": "ddcb883d-aeea-4745-8cd7-07cdd941a216"
+ },
+ "execution_count": 23,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "\u001b[1m22/22\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 4ms/step\n",
+ "NN 0.9935034802784223\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "label_encoder.inverse_transform(clf.predict(pd.DataFrame([X_test.iloc[0][:]])))[0]"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 53
+ },
+ "id": "ZV4oBtDdWr7N",
+ "outputId": "27809c60-f232-44d2-bb89-c53493e58e7b"
+ },
+ "execution_count": 26,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "\u001b[1m1/1\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 50ms/step\n"
+ ]
+ },
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "'I'"
+ ],
+ "application/vnd.google.colaboratory.intrinsic+json": {
+ "type": "string"
+ }
+ },
+ "metadata": {},
+ "execution_count": 26
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "max(clf.predict_proba(pd.DataFrame([X_test.iloc[0][:]])))"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "eEqBQ2sXKZum",
+ "outputId": "ffe5932a-c614-4656-fe82-836d981dcbda"
+ },
+ "execution_count": 27,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "\u001b[1m1/1\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m0s\u001b[0m 67ms/step\n"
+ ]
+ },
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "0.9972435"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 27
+ }
+ ]
+ }
+ ],
+ "metadata": {
+ "colab": {
+ "provenance": [],
+ "authorship_tag": "ABX9TyNhSUKc6l0Z7z413uYq6c11",
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "display_name": "Python 3",
+ "name": "python3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
\ No newline at end of file