{ "cells": [ { "cell_type": "markdown", "id": "dd718ff4-36a5-4b2a-bbc6-9bfedec774e3", "metadata": {}, "source": [ "### US Automobile Accidents" ] }, { "cell_type": "markdown", "id": "822004fb-6aae-4266-a2e3-3fdf20a86cb3", "metadata": {}, "source": [ "#### Neural Network" ] }, { "cell_type": "code", "execution_count": 3, "id": "875de1c6-c8a1-4bff-b488-a17fbe0b8472", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "from sklearn.model_selection import train_test_split\n", "from sklearn.neural_network import MLPClassifier\n", "import matplotlib.pylab as plt" ] }, { "cell_type": "code", "execution_count": 4, "id": "57bb92a1-f6cd-458a-87c9-5d5f330474e9", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | ALCHL_I | \n", "PROFIL_I_R | \n", "SUR_COND | \n", "VEH_INVL | \n", "MAX_SEV_IR | \n", "
---|---|---|---|---|---|
0 | \n", "2 | \n", "0 | \n", "1 | \n", "1 | \n", "0 | \n", "
1 | \n", "2 | \n", "1 | \n", "1 | \n", "1 | \n", "2 | \n", "
2 | \n", "1 | \n", "0 | \n", "1 | \n", "1 | \n", "0 | \n", "
3 | \n", "2 | \n", "0 | \n", "2 | \n", "2 | \n", "1 | \n", "
4 | \n", "2 | \n", "1 | \n", "1 | \n", "2 | \n", "1 | \n", "
MLPClassifier(activation='logistic', hidden_layer_sizes=2, random_state=1,\n", " solver='lbfgs')In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
MLPClassifier(activation='logistic', hidden_layer_sizes=2, random_state=1,\n", " solver='lbfgs')