{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "forty-fault", "metadata": {}, "outputs": [], "source": [ "!kaggle datasets download -d kukuroo3/body-performance-data" ] }, { "cell_type": "code", "execution_count": null, "id": "pediatric-tuesday", "metadata": {}, "outputs": [], "source": [ "!unzip -o body-performance-data.zip" ] }, { "cell_type": "code", "execution_count": 114, "id": "interstate-presence", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "from sklearn.model_selection import train_test_split\n", "from sklearn.metrics import classification_report\n", "import torch\n", "from torch import nn, optim\n", "import torch.nn.functional as F" ] }, { "cell_type": "code", "execution_count": 115, "id": "structural-trigger", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(13393, 12)" ] }, "execution_count": 115, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = pd.read_csv('bodyPerformance.csv')\n", "df.shape" ] }, { "cell_type": "code", "execution_count": 116, "id": "turkish-category", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | age | \n", "gender | \n", "height_cm | \n", "weight_kg | \n", "body fat_% | \n", "diastolic | \n", "systolic | \n", "gripForce | \n", "sit and bend forward_cm | \n", "sit-ups counts | \n", "broad jump_cm | \n", "class | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "27.0 | \n", "M | \n", "172.3 | \n", "75.24 | \n", "21.3 | \n", "80.0 | \n", "130.0 | \n", "54.9 | \n", "18.4 | \n", "60.0 | \n", "217.0 | \n", "C | \n", "
1 | \n", "25.0 | \n", "M | \n", "165.0 | \n", "55.80 | \n", "15.7 | \n", "77.0 | \n", "126.0 | \n", "36.4 | \n", "16.3 | \n", "53.0 | \n", "229.0 | \n", "A | \n", "
2 | \n", "31.0 | \n", "M | \n", "179.6 | \n", "78.00 | \n", "20.1 | \n", "92.0 | \n", "152.0 | \n", "44.8 | \n", "12.0 | \n", "49.0 | \n", "181.0 | \n", "C | \n", "
3 | \n", "32.0 | \n", "M | \n", "174.5 | \n", "71.10 | \n", "18.4 | \n", "76.0 | \n", "147.0 | \n", "41.4 | \n", "15.2 | \n", "53.0 | \n", "219.0 | \n", "B | \n", "
4 | \n", "28.0 | \n", "M | \n", "173.8 | \n", "67.70 | \n", "17.1 | \n", "70.0 | \n", "127.0 | \n", "43.5 | \n", "27.1 | \n", "45.0 | \n", "217.0 | \n", "B | \n", "