From 18a6c3d189a76eb0e5ea9e1a329a13ecdde30f91 Mon Sep 17 00:00:00 2001 From: Guggagitar Date: Fri, 9 Oct 2026 15:06:27 +0000 Subject: [PATCH] ty --- .DS_Store | Bin 6148 -> 6148 bytes notebooks/mushroom_analysis.ipynb | 283 ++++-------------------------- 2 files changed, 30 insertions(+), 253 deletions(-) diff --git a/.DS_Store b/.DS_Store index c36de7a08898ba38709cc0ff1fa085aba54c6a57..ff95e1bdc2e6316cde46858beaa85e66ace5adfd 100644 GIT binary patch delta 176 zcmZoMXffEJ##Ddl90LOb3xgg*IzuKyNp8N2OHxjL5>SjI&`Rg>9Ger4sPZXz1 X>A;-CD6n}Wa~R9S0=~`c9Dn%%A~h?( delta 176 zcmZoMXffEJ##DdoIRgU&3xgg*IzuKyNp8N2OHxjL5>SkTS7^%8IW{L8QRP$M@?1f& zi_zr^G7N*0^K%P;dKeg(KY&P9pxI>%sSJ4xWjW~xS?29kIzZXUOPOMs5*Q}eF^f%> eV&-E~Z3HtNn3EU{Hg9AOW0_dMx0#*eFFybjp(~33 diff --git a/notebooks/mushroom_analysis.ipynb b/notebooks/mushroom_analysis.ipynb index 93ea58c..9487268 100644 --- a/notebooks/mushroom_analysis.ipynb +++ b/notebooks/mushroom_analysis.ipynb @@ -2,246 +2,19 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "id": "45bdce35", "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "Feature data: (8124, 22)\n", - "Target data: (8124,)\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
cap_shapecap_surfacecap_colorbruisesodorgill_attachmentgill_spacinggill_sizegill_colorstalk_shape...stalk_surface_below_ringstalk_color_above_ringstalk_color_below_ringveil_typeveil_colorring_numberring_typespore-print-colorpopulationhabitat
0xsntpfcnke...swwpwopksu
1xsytafcbke...swwpwopnng
2bswtlfcbne...swwpwopnnm
3xywtpfcnne...swwpwopksu
4xsgfnfwbkt...swwpwoenag
\n", - "

5 rows × 22 columns

\n", - "
" - ], - "text/plain": [ - " cap_shape cap_surface cap_color bruises odor gill_attachment gill_spacing \\\n", - "0 x s n t p f c \n", - "1 x s y t a f c \n", - "2 b s w t l f c \n", - "3 x y w t p f c \n", - "4 x s g f n f w \n", - "\n", - " gill_size gill_color stalk_shape ... stalk_surface_below_ring \\\n", - "0 n k e ... s \n", - "1 b k e ... s \n", - "2 b n e ... s \n", - "3 n n e ... s \n", - "4 b k t ... s \n", - "\n", - " stalk_color_above_ring stalk_color_below_ring veil_type veil_color \\\n", - "0 w w p w \n", - "1 w w p w \n", - "2 w w p w \n", - "3 w w p w \n", - "4 w w p w \n", - "\n", - " ring_number ring_type spore-print-color population habitat \n", - "0 o p k s u \n", - "1 o p n n g \n", - "2 o p n n m \n", - "3 o p k s u \n", - "4 o e n a g \n", - "\n", - "[5 rows x 22 columns]" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "0 p\n", - "1 e\n", - "2 e\n", - "3 p\n", - "4 e\n", - "Name: class, dtype: category\n", - "Categories (2, str): ['e', 'p']" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "class\n", - "e 4208\n", - "p 3916\n", - "Name: count, dtype: int64\n" + "ename": "ModuleNotFoundError", + "evalue": "No module named 'sklearn'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[2], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01msklearn\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdatasets\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m fetch_openml\n\u001b[1;32m 3\u001b[0m mushroom \u001b[38;5;241m=\u001b[39m fetch_openml(data_id\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m43922\u001b[39m, as_frame\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n\u001b[1;32m 5\u001b[0m X \u001b[38;5;241m=\u001b[39m mushroom\u001b[38;5;241m.\u001b[39mdata\n", + "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'sklearn'" ] } ], @@ -262,23 +35,19 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "id": "69e1a254", "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "Missing cells: 0\n", - "Rows with missing cells: 0\n", - "stalk_root\n", - "b 3776\n", - "? 2480\n", - "e 1120\n", - "c 556\n", - "r 192\n", - "Name: count, dtype: int64\n" + "ename": "NameError", + "evalue": "name 'X' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[3], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mMissing cells:\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[43mX\u001b[49m\u001b[38;5;241m.\u001b[39misna()\u001b[38;5;241m.\u001b[39msum()\u001b[38;5;241m.\u001b[39msum())\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mRows with missing cells:\u001b[39m\u001b[38;5;124m\"\u001b[39m, X\u001b[38;5;241m.\u001b[39misna()\u001b[38;5;241m.\u001b[39many(axis\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m1\u001b[39m)\u001b[38;5;241m.\u001b[39msum())\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28mprint\u001b[39m(X[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mstalk_root\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;241m.\u001b[39mvalue_counts(dropna\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m))\n", + "\u001b[0;31mNameError\u001b[0m: name 'X' is not defined" ] } ], @@ -290,10 +59,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "a3459b1e", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hello\n" + ] + } + ], "source": [ "a = \"hello\"\n", "print(a)" @@ -302,7 +79,7 @@ ], "metadata": { "kernelspec": { - "display_name": ".venv (3.12.10)", + "display_name": ".venv (3.9.6)", "language": "python", "name": "python3" }, @@ -316,7 +93,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.10" + "version": "3.9.6" } }, "nbformat": 4,