diff --git a/ASSESSMENT.ipynb b/ASSESSMENT.ipynb new file mode 100644 index 0000000..e9c47e3 --- /dev/null +++ b/ASSESSMENT.ipynb @@ -0,0 +1,2729 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "dc1eda95", + "metadata": {}, + "source": [ + " METHODS IN NUMPY\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "56a12866", + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "84d4f8fe", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[0., 0., 0.],\n", + " [0., 0., 0.],\n", + " [0., 0., 0.]])" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#zeros\n", + "np.zeros((3,3))" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "3204dba3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[1., 1., 1., 1., 1.]])" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#ones\n", + "np.ones((1,5))" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "1931d6d1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([1, 2, 3, 4])" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#arange\n", + "np.arange(1,5)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "7f72ed8c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([2. , 2.25, 2.5 , 2.75, 3. ])" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#linspace()\n", + "np.linspace(2.0, 3.0, num=5)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "230c7125", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[0, 1],\n", + " [2, 3],\n", + " [4, 5]])" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#reshape()\n", + "a = np.arange(6).reshape((3, 2))\n", + "a" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "b6a81a45", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([0. , 0.5 , 0.70710678, 0.8660254 , 1. ])" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#sin()\n", + "np.sin(np.array((0., 30., 45., 60., 90.)) * np.pi / 180. )" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "f364f0ab", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([1. , 2.71828183, 7.3890561 ])" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#exp()\n", + "B = np.arange(3)\n", + "np.exp(B)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "53fc41ef", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "10" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#min()\n", + "a = [10,30,26,90,19]\n", + "np.min(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "8b1bdc24", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "90" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#max()\n", + "np.max(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "64015bab", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[ 1, 2, 5, 7],\n", + " [ 7, 9, 10, 6]])" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#vstack\n", + "a = [[1,2,5,7], [7,9,10,6]]\n", + "np.vstack(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "04c98215", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([ 1, 2, 5, 7, 7, 9, 10, 6])" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#hstack\n", + "np.hstack(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "id": "792a976f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[45 2 3 4 6]\n", + "[1 2 3 4 6]\n" + ] + } + ], + "source": [ + "#copy()\n", + "arr = np.array([1,2,3,4,6])\n", + "x = arr.copy()\n", + "arr[0] = 45\n", + "print(arr)\n", + "print(x)" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "b8c7251f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[45 26 3 4 6]\n", + "[45 26 3 4 6]\n" + ] + } + ], + "source": [ + "#view()\n", + "y= arr.view()\n", + "arr[1]= 26\n", + "print(arr)\n", + "print(y)" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "34389cce", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "None\n", + "[ 3 5 7 9 11]\n" + ] + } + ], + "source": [ + "arr = np.array([3,5,7,9,11])\n", + "\n", + "x = arr.copy()\n", + "y = arr.view()\n", + "\n", + "print(x.base)\n", + "print(y.base) #base() to check if the copy owns the data" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "id": "44fbd9a6", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[10 30 50 6 5 4]\n" + ] + } + ], + "source": [ + "#concatenate\n", + "arr1 = np.array([10,30,50])\n", + "arr2 = ([6,5,4])\n", + "\n", + "arr = np.concatenate((arr1, arr2))\n", + "print(arr)" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "id": "6c693e1a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[ 2 5 8 100]\n" + ] + } + ], + "source": [ + "#sort\n", + "arr = np.array([2,8,5,100])\n", + "print(np.sort(arr))" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "04432d13", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[array([1, 3]), array([5, 7]), array([ 9, 11])]\n" + ] + } + ], + "source": [ + "#array_split()\n", + "data = np.array([1,3,5,7,9,11])\n", + "newdata = np.array_split(data, 3)\n", + "print(newdata)" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "6c306807", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(array([3, 5, 6], dtype=int64),)\n" + ] + } + ], + "source": [ + "#where()\n", + "arr = np.array([1,2,3,4,5,4,4])\n", + "x = np.where(arr ==4)\n", + "print(x)" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "id": "8e5a2cf5", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1\n" + ] + } + ], + "source": [ + "#searchsorted()\n", + "arr = np.array([6,7,8,9])\n", + "x = np.searchsorted(arr, 7)\n", + "print(x)" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "id": "ee032f6b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[7 5 7 7 7]\n", + " [5 7 7 5 7]\n", + " [7 3 3 7 5]]\n" + ] + } + ], + "source": [ + "#choice()\n", + "from numpy import random\n", + "x = random.choice([3,5,7,9], p=[0.1, 0.3, 0.6, 0.0], size =(3,5))\n", + "print(x)" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "73ecc1f3", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[1 2 3]\n", + "int32\n" + ] + } + ], + "source": [ + "#astype()\n", + "arr = np.array([1.1, 2.1, 3.1])\n", + "newarr =arr.astype('i')\n", + "print(newarr)\n", + "print(newarr.dtype)" + ] + }, + { + "cell_type": "markdown", + "id": "552316b2", + "metadata": {}, + "source": [ + "### METHODS IN PANDAS" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "id": "980e52d2", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "id": "ee71935e", + "metadata": {}, + "outputs": [], + "source": [ + "fileName = 'WorldHappiness_Corruption.csv'\n", + "filePath = 'C:\\Kaggle dataset'" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "id": "bf0281f0", + "metadata": {}, + "outputs": [], + "source": [ + "#read_csv()\n", + "filePathDir = filePath + '/' + fileName\n", + "df = pd.read_csv(filePathDir)" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "id": "fc2fdeb8", + "metadata": {}, + "outputs": [ + { + "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", + " \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", + "
Countryhappiness_scoregdp_per_capitafamilyhealthfreedomgenerositygovernment_trustdystopia_residualcontinentYearsocial_supportcpi_score
0Norway7.53701.6164631.5335240.7966670.6354230.3620120.3159642.277027Europe20150.00000088
1Denmark7.52201.4823831.5511220.7925660.6260070.3552800.4007702.313707Europe20150.00000091
2Iceland7.50401.4806331.6105740.8335520.6271630.4755400.1535272.322715Europe20150.00000079
3Switzerland7.49401.5649801.5169120.8581310.6200710.2905490.3670072.276716Europe20150.00000086
4Finland7.46901.4435721.5402470.8091580.6179510.2454830.3826122.430182Europe20150.00000090
..........................................
787Botswana3.47890.9975490.0000000.4941020.5090890.0334070.1017860.257241Africa20201.08569560
788Tanzania3.47620.4571630.0000000.4426780.5093430.2715410.2038810.718963Africa20200.87267538
789Rwanda3.31230.3432430.0000000.5723830.6040880.2357050.4855420.548445Africa20200.52287654
790Zimbabwe3.29920.4255640.0000000.3750380.3774050.1513490.0809290.841031Africa20201.04783524
791Afghanistan2.56690.3007060.0000000.2660520.0000000.1352350.0012261.507236Asia20200.35643419
\n", + "

792 rows × 13 columns

\n", + "
" + ], + "text/plain": [ + " Country happiness_score gdp_per_capita family health \\\n", + "0 Norway 7.5370 1.616463 1.533524 0.796667 \n", + "1 Denmark 7.5220 1.482383 1.551122 0.792566 \n", + "2 Iceland 7.5040 1.480633 1.610574 0.833552 \n", + "3 Switzerland 7.4940 1.564980 1.516912 0.858131 \n", + "4 Finland 7.4690 1.443572 1.540247 0.809158 \n", + ".. ... ... ... ... ... \n", + "787 Botswana 3.4789 0.997549 0.000000 0.494102 \n", + "788 Tanzania 3.4762 0.457163 0.000000 0.442678 \n", + "789 Rwanda 3.3123 0.343243 0.000000 0.572383 \n", + "790 Zimbabwe 3.2992 0.425564 0.000000 0.375038 \n", + "791 Afghanistan 2.5669 0.300706 0.000000 0.266052 \n", + "\n", + " freedom generosity government_trust dystopia_residual continent \\\n", + "0 0.635423 0.362012 0.315964 2.277027 Europe \n", + "1 0.626007 0.355280 0.400770 2.313707 Europe \n", + "2 0.627163 0.475540 0.153527 2.322715 Europe \n", + "3 0.620071 0.290549 0.367007 2.276716 Europe \n", + "4 0.617951 0.245483 0.382612 2.430182 Europe \n", + ".. ... ... ... ... ... \n", + "787 0.509089 0.033407 0.101786 0.257241 Africa \n", + "788 0.509343 0.271541 0.203881 0.718963 Africa \n", + "789 0.604088 0.235705 0.485542 0.548445 Africa \n", + "790 0.377405 0.151349 0.080929 0.841031 Africa \n", + "791 0.000000 0.135235 0.001226 1.507236 Asia \n", + "\n", + " Year social_support cpi_score \n", + "0 2015 0.000000 88 \n", + "1 2015 0.000000 91 \n", + "2 2015 0.000000 79 \n", + "3 2015 0.000000 86 \n", + "4 2015 0.000000 90 \n", + ".. ... ... ... \n", + "787 2020 1.085695 60 \n", + "788 2020 0.872675 38 \n", + "789 2020 0.522876 54 \n", + "790 2020 1.047835 24 \n", + "791 2020 0.356434 19 \n", + "\n", + "[792 rows x 13 columns]" + ] + }, + "execution_count": 47, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "id": "f17fadf6", + "metadata": {}, + "outputs": [ + { + "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", + "
Countryhappiness_scoregdp_per_capitafamilyhealthfreedomgenerositygovernment_trustdystopia_residualcontinentYearsocial_supportcpi_score
0Norway7.5371.6164631.5335240.7966670.6354230.3620120.3159642.277027Europe20150.088
1Denmark7.5221.4823831.5511220.7925660.6260070.3552800.4007702.313707Europe20150.091
2Iceland7.5041.4806331.6105740.8335520.6271630.4755400.1535272.322715Europe20150.079
3Switzerland7.4941.5649801.5169120.8581310.6200710.2905490.3670072.276716Europe20150.086
4Finland7.4691.4435721.5402470.8091580.6179510.2454830.3826122.430182Europe20150.090
\n", + "
" + ], + "text/plain": [ + " Country happiness_score gdp_per_capita family health freedom \\\n", + "0 Norway 7.537 1.616463 1.533524 0.796667 0.635423 \n", + "1 Denmark 7.522 1.482383 1.551122 0.792566 0.626007 \n", + "2 Iceland 7.504 1.480633 1.610574 0.833552 0.627163 \n", + "3 Switzerland 7.494 1.564980 1.516912 0.858131 0.620071 \n", + "4 Finland 7.469 1.443572 1.540247 0.809158 0.617951 \n", + "\n", + " generosity government_trust dystopia_residual continent Year \\\n", + "0 0.362012 0.315964 2.277027 Europe 2015 \n", + "1 0.355280 0.400770 2.313707 Europe 2015 \n", + "2 0.475540 0.153527 2.322715 Europe 2015 \n", + "3 0.290549 0.367007 2.276716 Europe 2015 \n", + "4 0.245483 0.382612 2.430182 Europe 2015 \n", + "\n", + " social_support cpi_score \n", + "0 0.0 88 \n", + "1 0.0 91 \n", + "2 0.0 79 \n", + "3 0.0 86 \n", + "4 0.0 90 " + ] + }, + "execution_count": 71, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#head\n", + "filePathDir = filePath + '/' + fileName\n", + "df = pd.read_csv(filePathDir)\n", + "df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "id": "aa1f2c5a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 49, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#describe\n", + "df.describe" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "id": "af31bb9a", + "metadata": {}, + "outputs": [ + { + "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", + "
countmeanstdmin25%50%75%max
happiness_score792.05.4733101.1247262.56694.5907505.4855006.3005007.808700
gdp_per_capita792.00.9292170.3857740.00000.6442420.9945441.2286772.096000
family792.00.5049980.5527360.00000.0000000.0000001.0404101.610574
health792.00.6486910.2322610.00000.5100700.6853970.8156411.141000
freedom792.00.4270160.1480030.00000.3254330.4396210.5462800.724000
generosity792.00.2124400.1216600.00000.1257840.1970000.2732500.838075
government_trust792.00.1257200.1090320.00000.0528620.0890000.1542500.551910
dystopia_residual792.01.3792771.0752760.00000.0000001.7319482.2368943.602140
Year792.02017.5000001.7089042015.00002016.0000002017.5000002019.0000002020.000000
social_support792.00.6093020.6407540.00000.0000000.1762141.2682501.644000
cpi_score792.044.32702019.50883311.000030.00000038.00000057.00000091.000000
\n", + "
" + ], + "text/plain": [ + " count mean std min 25% \\\n", + "happiness_score 792.0 5.473310 1.124726 2.5669 4.590750 \n", + "gdp_per_capita 792.0 0.929217 0.385774 0.0000 0.644242 \n", + "family 792.0 0.504998 0.552736 0.0000 0.000000 \n", + "health 792.0 0.648691 0.232261 0.0000 0.510070 \n", + "freedom 792.0 0.427016 0.148003 0.0000 0.325433 \n", + "generosity 792.0 0.212440 0.121660 0.0000 0.125784 \n", + "government_trust 792.0 0.125720 0.109032 0.0000 0.052862 \n", + "dystopia_residual 792.0 1.379277 1.075276 0.0000 0.000000 \n", + "Year 792.0 2017.500000 1.708904 2015.0000 2016.000000 \n", + "social_support 792.0 0.609302 0.640754 0.0000 0.000000 \n", + "cpi_score 792.0 44.327020 19.508833 11.0000 30.000000 \n", + "\n", + " 50% 75% max \n", + "happiness_score 5.485500 6.300500 7.808700 \n", + "gdp_per_capita 0.994544 1.228677 2.096000 \n", + "family 0.000000 1.040410 1.610574 \n", + "health 0.685397 0.815641 1.141000 \n", + "freedom 0.439621 0.546280 0.724000 \n", + "generosity 0.197000 0.273250 0.838075 \n", + "government_trust 0.089000 0.154250 0.551910 \n", + "dystopia_residual 1.731948 2.236894 3.602140 \n", + "Year 2017.500000 2019.000000 2020.000000 \n", + "social_support 0.176214 1.268250 1.644000 \n", + "cpi_score 38.000000 57.000000 91.000000 " + ] + }, + "execution_count": 50, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#Transpose\n", + "df.describe().T" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "id": "4268deb1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Index 128\n", + "Country 6336\n", + "happiness_score 6336\n", + "gdp_per_capita 6336\n", + "family 6336\n", + "health 6336\n", + "freedom 6336\n", + "generosity 6336\n", + "government_trust 6336\n", + "dystopia_residual 6336\n", + "continent 6336\n", + "Year 6336\n", + "social_support 6336\n", + "cpi_score 6336\n", + "dtype: int64" + ] + }, + "execution_count": 51, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#memory_usage\n", + "df.memory_usage()" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "id": "b54922d3", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "RangeIndex: 792 entries, 0 to 791\n", + "Data columns (total 13 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 Country 792 non-null object \n", + " 1 happiness_score 792 non-null float64\n", + " 2 gdp_per_capita 792 non-null float64\n", + " 3 family 792 non-null float64\n", + " 4 health 792 non-null float64\n", + " 5 freedom 792 non-null float64\n", + " 6 generosity 792 non-null float64\n", + " 7 government_trust 792 non-null float64\n", + " 8 dystopia_residual 792 non-null float64\n", + " 9 continent 792 non-null object \n", + " 10 Year 792 non-null int64 \n", + " 11 social_support 792 non-null float64\n", + " 12 cpi_score 792 non-null int64 \n", + "dtypes: float64(9), int64(2), object(2)\n", + "memory usage: 80.6+ KB\n" + ] + } + ], + "source": [ + "#info()\n", + "df.info()" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "id": "c42e6411", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "RangeIndex: 792 entries, 0 to 791\n", + "Data columns (total 13 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 Country 792 non-null object \n", + " 1 happiness_score 792 non-null float64\n", + " 2 gdp_per_capita 792 non-null float64\n", + " 3 family 792 non-null float64\n", + " 4 health 792 non-null float64\n", + " 5 freedom 792 non-null float64\n", + " 6 generosity 792 non-null float64\n", + " 7 government_trust 792 non-null float64\n", + " 8 dystopia_residual 792 non-null float64\n", + " 9 continent 792 non-null object \n", + " 10 Year 792 non-null int64 \n", + " 11 social_support 792 non-null int32 \n", + " 12 cpi_score 792 non-null int64 \n", + "dtypes: float64(8), int32(1), int64(2), object(2)\n", + "memory usage: 77.5+ KB\n", + "None\n" + ] + } + ], + "source": [ + "#astype\n", + "df[\"social_support\"] =df['social_support'].astype(int)\n", + "print(df.info())" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "id": "3d4c64ae", + "metadata": {}, + "outputs": [ + { + "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", + "
Countryhappiness_score
0Norway7.537
1Denmark7.522
2Iceland7.504
3Switzerland7.494
\n", + "
" + ], + "text/plain": [ + " Country happiness_score\n", + "0 Norway 7.537\n", + "1 Denmark 7.522\n", + "2 Iceland 7.504\n", + "3 Switzerland 7.494" + ] + }, + "execution_count": 57, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#loc\n", + "df.loc[0:3, ['Country', 'happiness_score']]" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "id": "cd19571f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0 2015-02-04\n", + "1 2016-03-05\n", + "dtype: datetime64[ns]" + ] + }, + "execution_count": 66, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#to_datetime\n", + "df1 = pd.DataFrame({'year':[2015,2016], 'month': [2,3], 'day': [4,5]})\n", + "pd.to_datetime(df1)" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "id": "29ac3169", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2015 132\n", + "2016 132\n", + "2017 132\n", + "2018 132\n", + "2019 132\n", + "2020 132\n", + "Name: Year, dtype: int64" + ] + }, + "execution_count": 73, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#value_counts()\n", + "df['Year'].value_counts()" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "id": "684f8451", + "metadata": {}, + "outputs": [ + { + "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", + " \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", + "
Countryhappiness_scoregdp_per_capitafamilyhealthfreedomgenerositygovernment_trustdystopia_residualcontinentYearsocial_supportcpi_score
0Norway7.53701.6164631.5335240.7966670.6354230.3620120.3159642.277027Europe20150.00000088
1Denmark7.52201.4823831.5511220.7925660.6260070.3552800.4007702.313707Europe20150.00000091
2Iceland7.50401.4806331.6105740.8335520.6271630.4755400.1535272.322715Europe20150.00000079
3Switzerland7.49401.5649801.5169120.8581310.6200710.2905490.3670072.276716Europe20150.00000086
4Finland7.46901.4435721.5402470.8091580.6179510.2454830.3826122.430182Europe20150.00000090
..........................................
787Botswana3.47890.9975490.0000000.4941020.5090890.0334070.1017860.257241Africa20201.08569560
788Tanzania3.47620.4571630.0000000.4426780.5093430.2715410.2038810.718963Africa20200.87267538
789Rwanda3.31230.3432430.0000000.5723830.6040880.2357050.4855420.548445Africa20200.52287654
790Zimbabwe3.29920.4255640.0000000.3750380.3774050.1513490.0809290.841031Africa20201.04783524
791Afghanistan2.56690.3007060.0000000.2660520.0000000.1352350.0012261.507236Asia20200.35643419
\n", + "

792 rows × 13 columns

\n", + "
" + ], + "text/plain": [ + " Country happiness_score gdp_per_capita family health \\\n", + "0 Norway 7.5370 1.616463 1.533524 0.796667 \n", + "1 Denmark 7.5220 1.482383 1.551122 0.792566 \n", + "2 Iceland 7.5040 1.480633 1.610574 0.833552 \n", + "3 Switzerland 7.4940 1.564980 1.516912 0.858131 \n", + "4 Finland 7.4690 1.443572 1.540247 0.809158 \n", + ".. ... ... ... ... ... \n", + "787 Botswana 3.4789 0.997549 0.000000 0.494102 \n", + "788 Tanzania 3.4762 0.457163 0.000000 0.442678 \n", + "789 Rwanda 3.3123 0.343243 0.000000 0.572383 \n", + "790 Zimbabwe 3.2992 0.425564 0.000000 0.375038 \n", + "791 Afghanistan 2.5669 0.300706 0.000000 0.266052 \n", + "\n", + " freedom generosity government_trust dystopia_residual continent \\\n", + "0 0.635423 0.362012 0.315964 2.277027 Europe \n", + "1 0.626007 0.355280 0.400770 2.313707 Europe \n", + "2 0.627163 0.475540 0.153527 2.322715 Europe \n", + "3 0.620071 0.290549 0.367007 2.276716 Europe \n", + "4 0.617951 0.245483 0.382612 2.430182 Europe \n", + ".. ... ... ... ... ... \n", + "787 0.509089 0.033407 0.101786 0.257241 Africa \n", + "788 0.509343 0.271541 0.203881 0.718963 Africa \n", + "789 0.604088 0.235705 0.485542 0.548445 Africa \n", + "790 0.377405 0.151349 0.080929 0.841031 Africa \n", + "791 0.000000 0.135235 0.001226 1.507236 Asia \n", + "\n", + " Year social_support cpi_score \n", + "0 2015 0.000000 88 \n", + "1 2015 0.000000 91 \n", + "2 2015 0.000000 79 \n", + "3 2015 0.000000 86 \n", + "4 2015 0.000000 90 \n", + ".. ... ... ... \n", + "787 2020 1.085695 60 \n", + "788 2020 0.872675 38 \n", + "789 2020 0.522876 54 \n", + "790 2020 1.047835 24 \n", + "791 2020 0.356434 19 \n", + "\n", + "[792 rows x 13 columns]" + ] + }, + "execution_count": 76, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#drop_duplicates()\n", + "df.drop_duplicates(inplace=True)\n", + "df\n", + "\n", + "#no duplicates in the dat" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "id": "c45e3877", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "continent\n", + "Africa 0.403690\n", + "Asia 0.471045\n", + "Australia 0.663723\n", + "Europe 0.590485\n", + "North America 0.580827\n", + "South America 0.540228\n", + "Name: family, dtype: float64" + ] + }, + "execution_count": 77, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#groupby()\n", + "df.groupby(by='continent').family.mean()" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "id": "8620a24d", + "metadata": {}, + "outputs": [ + { + "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", + "
lkeyvalue_xrkeyvalue_y
0foo1foo5
1foo1foo8
2foo5foo5
3foo5foo8
4bar2bar6
5baz3baz7
\n", + "
" + ], + "text/plain": [ + " lkey value_x rkey value_y\n", + "0 foo 1 foo 5\n", + "1 foo 1 foo 8\n", + "2 foo 5 foo 5\n", + "3 foo 5 foo 8\n", + "4 bar 2 bar 6\n", + "5 baz 3 baz 7" + ] + }, + "execution_count": 80, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#merge()\n", + "table1 = pd.DataFrame({'lkey': ['foo', 'bar', 'baz', 'foo'], 'value':[1,2,3,5]})\n", + "table2 = pd.DataFrame({'rkey': ['foo', 'bar', 'baz', 'foo'], 'value':[5,6,7,8]})\n", + "table1.merge(table2, left_on='lkey', right_on='rkey')" + ] + }, + { + "cell_type": "code", + "execution_count": 86, + "id": "bb212a67", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " 395 657 519 259 \\\n", + "Country Afghanistan Afghanistan Afghanistan Afghanistan \n", + "happiness_score 3.203 3.36 3.632 3.575 \n", + "gdp_per_capita 0.35 0.38227 0.332 0.31982 \n", + "family 0.0 0.11037 0.0 0.30285 \n", + "health 0.361 0.17344 0.255 0.30335 \n", + "freedom 0.0 0.1643 0.085 0.23414 \n", + "generosity 0.158 0.31268 0.191 0.3651 \n", + "government_trust 0.025 0.07112 0.036 0.09719 \n", + "dystopia_residual 0.0 2.14558 0.0 1.9521 \n", + "continent Asia Asia Asia Asia \n", + "Year 2017 2019 2018 2016 \n", + "social_support 0.517 0.0 0.537 0.0 \n", + "cpi_score 15 16 16 15 \n", + "\n", + " 791 120 493 753 96 \\\n", + "Country Afghanistan Afghanistan Albania Albania Albania \n", + "happiness_score 2.5669 3.794 4.586 4.8827 4.644 \n", + "gdp_per_capita 0.300706 0.401477 0.916 0.906653 0.996193 \n", + "family 0.0 0.581543 0.0 0.0 0.803685 \n", + "health 0.266052 0.180747 0.79 0.84633 0.73116 \n", + "freedom 0.0 0.10618 0.419 0.461946 0.381499 \n", + "generosity 0.135235 0.311871 0.149 0.171028 0.201313 \n", + "government_trust 0.001226 0.061158 0.032 0.025361 0.039864 \n", + "dystopia_residual 1.507236 2.150801 0.0 1.640897 1.490442 \n", + "continent Asia Asia Europe Europe Europe \n", + "Year 2020 2015 2018 2020 2015 \n", + "social_support 0.356434 0.0 0.817 0.830484 0.0 \n", + "cpi_score 19 11 36 36 36 \n", + "\n", + " 620 ... 206 101 618 382 518 \\\n", + "Country Albania ... Zambia Zambia Zambia Zambia Zimbabwe \n", + "happiness_score 4.655 ... 5.129 4.514 4.795 4.107 3.692 \n", + "gdp_per_capita 0.9553 ... 0.47038 0.636407 0.61202 0.578 0.357 \n", + "family 0.50163 ... 0.91612 1.003187 0.6376 0.0 0.0 \n", + "health 0.73007 ... 0.29924 0.257836 0.23573 0.426 0.248 \n", + "freedom 0.31866 ... 0.48827 0.461603 0.42662 0.431 0.406 \n", + "generosity 0.1684 ... 0.19591 0.24958 0.17866 0.247 0.132 \n", + "government_trust 0.05301 ... 0.12468 0.078214 0.11479 0.087 0.099 \n", + "dystopia_residual 1.92816 ... 2.6343 1.826705 2.58991 0.0 0.0 \n", + "continent Europe ... Africa Africa Africa Africa Africa \n", + "Year 2019 ... 2016 2015 2019 2017 2018 \n", + "social_support 0.0 ... 0.0 0.0 0.0 1.058 1.094 \n", + "cpi_score 35 ... 38 38 34 37 22 \n", + "\n", + " 229 119 388 790 639 \n", + "Country Zimbabwe Zimbabwe Zimbabwe Zimbabwe Zimbabwe \n", + "happiness_score 4.61 3.875 3.663 3.2992 4.193 \n", + "gdp_per_capita 0.271 0.375847 0.366 0.425564 0.35041 \n", + "family 1.03276 1.083096 0.0 0.0 0.71478 \n", + "health 0.33475 0.196764 0.433 0.375038 0.1595 \n", + "freedom 0.25861 0.336384 0.361 0.377405 0.25429 \n", + "generosity 0.18987 0.189143 0.151 0.151349 0.18503 \n", + "government_trust 0.08079 0.095375 0.089 0.080929 0.08582 \n", + "dystopia_residual 2.44191 1.59797 0.0 0.841031 2.4427 \n", + "continent Africa Africa Africa Africa Africa \n", + "Year 2016 2015 2017 2020 2019 \n", + "social_support 0.0 0.0 1.114 1.047835 0.0 \n", + "cpi_score 22 21 22 24 24 \n", + "\n", + "[13 rows x 792 columns]\n" + ] + } + ], + "source": [ + "#sort_values()\n", + "print(df.sort_values(by='Country', inplace=False).T)" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "id": "fba8593f", + "metadata": {}, + "outputs": [ + { + "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", + "
Countryhappiness_scoregdp_per_capitafamilyhealthfreedomgenerositygovernment_trustdystopia_residualcontinentYearsocial_supportcpi_score
119Zimbabwe3.87500.3758471.0830960.1967640.3363840.1891430.0953751.597970Africa20150.00000021
388Zimbabwe3.66300.3660000.0000000.4330000.3610000.1510000.0890000.000000Africa20171.11400022
790Zimbabwe3.29920.4255640.0000000.3750380.3774050.1513490.0809290.841031Africa20201.04783524
518Zimbabwe3.69200.3570000.0000000.2480000.4060000.1320000.0990000.000000Africa20181.09400022
639Zimbabwe4.19300.3504100.7147800.1595000.2542900.1850300.0858202.442700Africa20190.00000024
\n", + "
" + ], + "text/plain": [ + " Country happiness_score gdp_per_capita family health freedom \\\n", + "119 Zimbabwe 3.8750 0.375847 1.083096 0.196764 0.336384 \n", + "388 Zimbabwe 3.6630 0.366000 0.000000 0.433000 0.361000 \n", + "790 Zimbabwe 3.2992 0.425564 0.000000 0.375038 0.377405 \n", + "518 Zimbabwe 3.6920 0.357000 0.000000 0.248000 0.406000 \n", + "639 Zimbabwe 4.1930 0.350410 0.714780 0.159500 0.254290 \n", + "\n", + " generosity government_trust dystopia_residual continent Year \\\n", + "119 0.189143 0.095375 1.597970 Africa 2015 \n", + "388 0.151000 0.089000 0.000000 Africa 2017 \n", + "790 0.151349 0.080929 0.841031 Africa 2020 \n", + "518 0.132000 0.099000 0.000000 Africa 2018 \n", + "639 0.185030 0.085820 2.442700 Africa 2019 \n", + "\n", + " social_support cpi_score \n", + "119 0.000000 21 \n", + "388 1.114000 22 \n", + "790 1.047835 24 \n", + "518 1.094000 22 \n", + "639 0.000000 24 " + ] + }, + "execution_count": 87, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#tail\n", + "df.tail()" + ] + }, + { + "cell_type": "code", + "execution_count": 89, + "id": "02ea1d43", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(792, 13)" + ] + }, + "execution_count": 89, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#shape\n", + "df.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "id": "c2d9125a", + "metadata": {}, + "outputs": [ + { + "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", + "
Countryhappiness_scoregdp_per_capitafamilyhealthfreedomgenerositygovernment_trustdystopia_residualcontinentYearsocial_supportcpi_score
340Nigeria5.26500.6960000.0000000.2450000.4260000.2150000.0410000.000000Africa20171.11100027
31Spain6.40301.3843981.5320910.8889610.4087810.1901340.0709141.927758Europe20150.00000058
49Moldova5.83800.7288711.2518260.5894650.2407290.2087790.0100912.807808Europe20150.00000033
370Tunisia4.46100.9210000.0000000.8150000.1670000.0590000.0550000.000000Africa20171.00000042
245Bulgaria4.21801.0121601.1061400.7664900.3058700.1192100.0087200.899910Europe20160.00000041
43Italy5.96401.3950671.4449230.8531440.2564510.1727900.0280281.813312Europe20150.00000044
781Burundi3.77530.0000000.0000000.2952130.2753990.1874020.2121872.401507Africa20200.40357519
136Canada7.42701.3262901.3226100.9056300.6329700.4581100.3295702.451760North America20160.00000082
\n", + "
" + ], + "text/plain": [ + " Country happiness_score gdp_per_capita family health freedom \\\n", + "340 Nigeria 5.2650 0.696000 0.000000 0.245000 0.426000 \n", + "31 Spain 6.4030 1.384398 1.532091 0.888961 0.408781 \n", + "49 Moldova 5.8380 0.728871 1.251826 0.589465 0.240729 \n", + "370 Tunisia 4.4610 0.921000 0.000000 0.815000 0.167000 \n", + "245 Bulgaria 4.2180 1.012160 1.106140 0.766490 0.305870 \n", + "43 Italy 5.9640 1.395067 1.444923 0.853144 0.256451 \n", + "781 Burundi 3.7753 0.000000 0.000000 0.295213 0.275399 \n", + "136 Canada 7.4270 1.326290 1.322610 0.905630 0.632970 \n", + "\n", + " generosity government_trust dystopia_residual continent Year \\\n", + "340 0.215000 0.041000 0.000000 Africa 2017 \n", + "31 0.190134 0.070914 1.927758 Europe 2015 \n", + "49 0.208779 0.010091 2.807808 Europe 2015 \n", + "370 0.059000 0.055000 0.000000 Africa 2017 \n", + "245 0.119210 0.008720 0.899910 Europe 2016 \n", + "43 0.172790 0.028028 1.813312 Europe 2015 \n", + "781 0.187402 0.212187 2.401507 Africa 2020 \n", + "136 0.458110 0.329570 2.451760 North America 2016 \n", + "\n", + " social_support cpi_score \n", + "340 1.111000 27 \n", + "31 0.000000 58 \n", + "49 0.000000 33 \n", + "370 1.000000 42 \n", + "245 0.000000 41 \n", + "43 0.000000 44 \n", + "781 0.403575 19 \n", + "136 0.000000 82 " + ] + }, + "execution_count": 90, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#sample\n", + "df.sample(n=8)" + ] + }, + { + "cell_type": "code", + "execution_count": 91, + "id": "cac29f4c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Country 0\n", + "happiness_score 0\n", + "gdp_per_capita 0\n", + "family 0\n", + "health 0\n", + "freedom 0\n", + "generosity 0\n", + "government_trust 0\n", + "dystopia_residual 0\n", + "continent 0\n", + "Year 0\n", + "social_support 0\n", + "cpi_score 0\n", + "dtype: int64" + ] + }, + "execution_count": 91, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#df.isnull().sum()\n", + "df.isnull().sum()" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "id": "7720b777", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Country 132\n", + "happiness_score 747\n", + "gdp_per_capita 767\n", + "family 396\n", + "health 733\n", + "freedom 734\n", + "generosity 707\n", + "government_trust 682\n", + "dystopia_residual 529\n", + "continent 6\n", + "Year 6\n", + "social_support 360\n", + "cpi_score 77\n", + "dtype: int64" + ] + }, + "execution_count": 92, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#nunique()\n", + "df.nunique()" + ] + }, + { + "cell_type": "markdown", + "id": "14bf43dd", + "metadata": {}, + "source": [ + "METHOD 20 #Query" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "id": "28ff7ee7", + "metadata": {}, + "outputs": [ + { + "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", + " \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", + "
Countryhappiness_scoregdp_per_capitafamilyhealthfreedomgenerositygovernment_trustdystopia_residualcontinentYearsocial_supportcpi_score
395Afghanistan3.20300.3500000.0000000.3610000.0000000.1580000.0250000.000000Asia20170.51700015
657Afghanistan3.36000.3822700.1103700.1734400.1643000.3126800.0711202.145580Asia20190.00000016
519Afghanistan3.63200.3320000.0000000.2550000.0850000.1910000.0360000.000000Asia20180.53700016
259Afghanistan3.57500.3198200.3028500.3033500.2341400.3651000.0971901.952100Asia20160.00000015
120Afghanistan3.79400.4014770.5815430.1807470.1061800.3118710.0611582.150801Asia20150.00000011
493Albania4.58600.9160000.0000000.7900000.4190000.1490000.0320000.000000Europe20180.81700036
753Albania4.88270.9066530.0000000.8463300.4619460.1710280.0253611.640897Europe20200.83048436
96Albania4.64400.9961930.8036850.7311600.3814990.2013130.0398641.490442Europe20150.00000036
620Albania4.65500.9553000.5016300.7300700.3186600.1684000.0530101.928160Europe20190.00000035
213Albania4.95900.8786700.8043400.8132500.3573300.1427200.0641301.898940Europe20160.00000039
\n", + "
" + ], + "text/plain": [ + " Country happiness_score gdp_per_capita family health \\\n", + "395 Afghanistan 3.2030 0.350000 0.000000 0.361000 \n", + "657 Afghanistan 3.3600 0.382270 0.110370 0.173440 \n", + "519 Afghanistan 3.6320 0.332000 0.000000 0.255000 \n", + "259 Afghanistan 3.5750 0.319820 0.302850 0.303350 \n", + "120 Afghanistan 3.7940 0.401477 0.581543 0.180747 \n", + "493 Albania 4.5860 0.916000 0.000000 0.790000 \n", + "753 Albania 4.8827 0.906653 0.000000 0.846330 \n", + "96 Albania 4.6440 0.996193 0.803685 0.731160 \n", + "620 Albania 4.6550 0.955300 0.501630 0.730070 \n", + "213 Albania 4.9590 0.878670 0.804340 0.813250 \n", + "\n", + " freedom generosity government_trust dystopia_residual continent \\\n", + "395 0.000000 0.158000 0.025000 0.000000 Asia \n", + "657 0.164300 0.312680 0.071120 2.145580 Asia \n", + "519 0.085000 0.191000 0.036000 0.000000 Asia \n", + "259 0.234140 0.365100 0.097190 1.952100 Asia \n", + "120 0.106180 0.311871 0.061158 2.150801 Asia \n", + "493 0.419000 0.149000 0.032000 0.000000 Europe \n", + "753 0.461946 0.171028 0.025361 1.640897 Europe \n", + "96 0.381499 0.201313 0.039864 1.490442 Europe \n", + "620 0.318660 0.168400 0.053010 1.928160 Europe \n", + "213 0.357330 0.142720 0.064130 1.898940 Europe \n", + "\n", + " Year social_support cpi_score \n", + "395 2017 0.517000 15 \n", + "657 2019 0.000000 16 \n", + "519 2018 0.537000 16 \n", + "259 2016 0.000000 15 \n", + "120 2015 0.000000 11 \n", + "493 2018 0.817000 36 \n", + "753 2020 0.830484 36 \n", + "96 2015 0.000000 36 \n", + "620 2019 0.000000 35 \n", + "213 2016 0.000000 39 " + ] + }, + "execution_count": 93, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.query('3 < happiness_score < 8')[:10]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cd2768ca", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/DEBORAH.O (1).py b/DEBORAH.O (1).py new file mode 100644 index 0000000..dfd3662 --- /dev/null +++ b/DEBORAH.O (1).py @@ -0,0 +1,192 @@ +#!/usr/bin/env python +# coding: utf-8 + +# # print all elements of a list using for loop + +# In[1]: + + +myList = ['James', 'Otobong', 'Temitayo', 'Blessing', 'Benard', 'Anthony', 'Isangha', 'Hilary', 'Opeoluwa', 'Victory'] + +for student in myList: + print(student) + + +# # using range(1,101), make two list, one containing all even numbers and other containing all odd numbers +# +# + +# In[21]: + + +lowerRange = 1 +upperRange = 101 +i = 2 + +print("Even numbers between", lowerRange, "and", upperRange, "are:") + +for Z in range(lowerRange, upperRange + 1): + if Z > 1: + if (Z % i) == 0: + print(Z) + + +# In[20]: + + +lowerRange = 1 +upperRange = 101 +i = 2 + +print("Odd numbers between", lowerRange, "and", upperRange, "are:") + +for Z in range(lowerRange, upperRange + 1): + if Z >= 1: + if (Z % i) != 0: + print(Z) + + +# # A company decided to give bonus of 5% to employee if his/her year of service is more than 5 years. Ask user for their salary and year of service and print the net bonus amount + +# In[41]: + + +target = 5 +def bonusCalc(sal,year): + if year > target: + netBonus = sal*0.05 + print('Your net bonus is: ', netBonus) + return netBonus + else: + print('Sorry, but at this time, you are not qualified for bonus') + + + +# In[42]: + + +salary = input('How much is your salary') +Year = input('how long is your year of service in this organization') + +bonusCalc(int(salary),int(Year)) + + +# # Take Input of age 3 people by user and determine oldest and youngest among them + +# In[52]: + + +def ageRange(age1,age2,age3): + if (age1 > age2) & (age1 > age3): + print('the oldest is the first person') + if age2 < age3: + print('the youngest is the second person') + else: + print('the youngest is the third person') + + elif (age2 > age1) & (age2 > age3): + print('the oldest pesron is the second person') + if age1 < age3: + print('the youngest is the first person') + else: + print('the youngest is the third person') + else: + print('the oldest is the third person') + if age1 < age2: + print('the youngest is the first person') + else: + print('the youngest is the second person') + + + + +# In[72]: + + +firstPerson = input('how old are you? ') +secondPerson = input('how old are you? ') +thirdPerson = input('how old are you? ') + +ageRange(int(firstPerson), int(secondPerson), int(thirdPerson)) + + +# # A school has following rules for grading system: +# Below 25 -F +# 25 to 45 -E +# 45 to 50 -D +# 50 to 60 -C +# 60 to 80 -B +# Above 80 -A + +# In[33]: + + +def scoreGrade(score): + if score > 80: + print("your grade is 'A'") + elif score >60 and score <=80: + print("your grade is 'B'") + elif score >50 and score <=60: + print("your grade is 'C'") + elif score >45 and score <=50: + print("your grade is 'D'") + elif score >25 and score <=45: + print("your grade is 'E'") + + else: + print("your grade is 'F'") +#return grd + + +# In[34]: + + +score = input('what was your score') +scoreGrade(int(score)) + + +# # Write a Python script to merge two python dictionaries + +# In[57]: + + + +dict2 = {'CAD':1.52, 'EUR':1.14, 'Tola':4, 'Temmy':40} + +dict1.update(dict2) +print(dict1)dict1 = {'NGN':470, 'GBP':0.99, 'MXN':20.1, 'ZAR':17.99, 'ZMK':15830, 'GHS':10.5, 'DEM':1.99, 'USD':1} + + +# # Write a Python program to remove a key from a dictionary + +# In[64]: + + +mergedDict = {'NGN': 470, 'GBP': 0.99, 'MXN': 20.1, 'ZAR': 17.99, 'ZMK': 15830, 'GHS': 10.5, 'DEM': 1.99, + 'USD': 1, 'CAD': 1.52, 'EUR': 1.14, 'Tola': 4, 'Temmy': 40} + +mergedDict.pop("Temmy") +print(mergedDict) + + +# # Write a Python program to get the largest number from a list + +# In[71]: + + +listEsden = [90, 28, 31, 23, 25, 59, 65] + +def largestNum(listEsden): + max = listEsden[0] + for a in listEsden: + if a > max: + max = a + return max +print(largestNum(listEsden)) + + +# In[ ]: + + + + diff --git a/DEBORAH.O.ipynb b/DEBORAH.O.ipynb new file mode 100644 index 0000000..7efb04d --- /dev/null +++ b/DEBORAH.O.ipynb @@ -0,0 +1,511 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "d54d45ce", + "metadata": {}, + "source": [ + "# print all elements of a list using for loop" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "6f35a4b6", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "James\n", + "Otobong\n", + "Temitayo\n", + "Blessing\n", + "Benard\n", + "Anthony\n", + "Isangha\n", + "Hilary\n", + "Opeoluwa\n", + "Victory\n" + ] + } + ], + "source": [ + "myList = ['James', 'Otobong', 'Temitayo', 'Blessing', 'Benard', 'Anthony', 'Isangha', 'Hilary', 'Opeoluwa', 'Victory']\n", + "\n", + "for student in myList:\n", + " print(student)" + ] + }, + { + "cell_type": "markdown", + "id": "5a2d5b07", + "metadata": {}, + "source": [ + "# using range(1,101), make two list, one containing all even numbers and other containing all odd numbers\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "5cd2c9af", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Even numbers between 1 and 101 are:\n", + "2\n", + "4\n", + "6\n", + "8\n", + "10\n", + "12\n", + "14\n", + "16\n", + "18\n", + "20\n", + "22\n", + "24\n", + "26\n", + "28\n", + "30\n", + "32\n", + "34\n", + "36\n", + "38\n", + "40\n", + "42\n", + "44\n", + "46\n", + "48\n", + "50\n", + "52\n", + "54\n", + "56\n", + "58\n", + "60\n", + "62\n", + "64\n", + "66\n", + "68\n", + "70\n", + "72\n", + "74\n", + "76\n", + "78\n", + "80\n", + "82\n", + "84\n", + "86\n", + "88\n", + "90\n", + "92\n", + "94\n", + "96\n", + "98\n", + "100\n" + ] + } + ], + "source": [ + "lowerRange = 1\n", + "upperRange = 101\n", + "i = 2\n", + "\n", + "print(\"Even numbers between\", lowerRange, \"and\", upperRange, \"are:\")\n", + "\n", + "for Z in range(lowerRange, upperRange + 1):\n", + " if Z > 1:\n", + " if (Z % i) == 0:\n", + " print(Z)" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "7a4e6e34", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Odd numbers between 1 and 101 are:\n", + "1\n", + "3\n", + "5\n", + "7\n", + "9\n", + "11\n", + "13\n", + "15\n", + "17\n", + "19\n", + "21\n", + "23\n", + "25\n", + "27\n", + "29\n", + "31\n", + "33\n", + "35\n", + "37\n", + "39\n", + "41\n", + "43\n", + "45\n", + "47\n", + "49\n", + "51\n", + "53\n", + "55\n", + "57\n", + "59\n", + "61\n", + "63\n", + "65\n", + "67\n", + "69\n", + "71\n", + "73\n", + "75\n", + "77\n", + "79\n", + "81\n", + "83\n", + "85\n", + "87\n", + "89\n", + "91\n", + "93\n", + "95\n", + "97\n", + "99\n", + "101\n" + ] + } + ], + "source": [ + "lowerRange = 1\n", + "upperRange = 101\n", + "i = 2\n", + "\n", + "print(\"Odd numbers between\", lowerRange, \"and\", upperRange, \"are:\")\n", + "\n", + "for Z in range(lowerRange, upperRange + 1):\n", + " if Z >= 1:\n", + " if (Z % i) != 0:\n", + " print(Z)" + ] + }, + { + "cell_type": "markdown", + "id": "c1ea7eda", + "metadata": {}, + "source": [ + "# A company decided to give bonus of 5% to employee if his/her year of service is more than 5 years. Ask user for their salary and year of service and print the net bonus amount" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "48ad05e7", + "metadata": {}, + "outputs": [], + "source": [ + "target = 5\n", + "def bonusCalc(sal,year):\n", + " if year > target:\n", + " netBonus = sal*0.05\n", + " print('Your net bonus is: ', netBonus)\n", + " return netBonus\n", + " else:\n", + " print('Sorry, but at this time, you are not qualified for bonus')\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "id": "9d86d7cd", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "How much is your salary40000\n", + "how long is your year of service in this organization10\n", + "Your net bonus is: 2000.0\n" + ] + }, + { + "data": { + "text/plain": [ + "2000.0" + ] + }, + "execution_count": 42, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "salary = input('How much is your salary')\n", + "Year = input('how long is your year of service in this organization')\n", + "\n", + "bonusCalc(int(salary),int(Year))" + ] + }, + { + "cell_type": "markdown", + "id": "15173add", + "metadata": {}, + "source": [ + "# Take Input of age 3 people by user and determine oldest and youngest among them" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "id": "690d4cc0", + "metadata": {}, + "outputs": [], + "source": [ + "def ageRange(age1,age2,age3):\n", + " if (age1 > age2) & (age1 > age3):\n", + " print('the oldest is the first person')\n", + " if age2 < age3:\n", + " print('the youngest is the second person')\n", + " else:\n", + " print('the youngest is the third person')\n", + " \n", + " elif (age2 > age1) & (age2 > age3):\n", + " print('the oldest pesron is the second person')\n", + " if age1 < age3:\n", + " print('the youngest is the first person')\n", + " else:\n", + " print('the youngest is the third person')\n", + " else:\n", + " print('the oldest is the third person')\n", + " if age1 < age2:\n", + " print('the youngest is the first person')\n", + " else:\n", + " print('the youngest is the second person')\n", + " \n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "id": "bd0d45ff", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "how old are you? 56\n", + "how old are you? 39\n", + "how old are you? 10\n", + "the oldest is the first person\n", + "the youngest is the third person\n" + ] + } + ], + "source": [ + "firstPerson = input('how old are you? ')\n", + "secondPerson = input('how old are you? ')\n", + "thirdPerson = input('how old are you? ')\n", + "\n", + "ageRange(int(firstPerson), int(secondPerson), int(thirdPerson))" + ] + }, + { + "cell_type": "markdown", + "id": "e959fee6", + "metadata": {}, + "source": [ + "# A school has following rules for grading system:\n", + " Below 25 -F\n", + " 25 to 45 -E\n", + " 45 to 50 -D\n", + " 50 to 60 -C\n", + " 60 to 80 -B\n", + " Above 80 -A" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "3af90ef8", + "metadata": {}, + "outputs": [], + "source": [ + "def scoreGrade(score):\n", + " if score > 80:\n", + " print(\"your grade is 'A'\")\n", + " elif score >60 and score <=80:\n", + " print(\"your grade is 'B'\")\n", + " elif score >50 and score <=60:\n", + " print(\"your grade is 'C'\")\n", + " elif score >45 and score <=50:\n", + " print(\"your grade is 'D'\")\n", + " elif score >25 and score <=45:\n", + " print(\"your grade is 'E'\")\n", + "\n", + " else: \n", + " print(\"your grade is 'F'\")\n", + "#return grd " + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "1f9d1330", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "what was your score25\n", + "your grade is 'F'\n" + ] + } + ], + "source": [ + "score = input('what was your score') \n", + "scoreGrade(int(score))" + ] + }, + { + "cell_type": "markdown", + "id": "b793a6cb", + "metadata": {}, + "source": [ + "# Write a Python script to merge two python dictionaries" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "id": "f84cdeb7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'NGN': 470, 'GBP': 0.99, 'MXN': 20.1, 'ZAR': 17.99, 'ZMK': 15830, 'GHS': 10.5, 'DEM': 1.99, 'USD': 1, 'CAD': 1.52, 'EUR': 1.14, 'Tola': 4, 'Temmy': 40}\n" + ] + } + ], + "source": [ + "\n", + "dict2 = {'CAD':1.52, 'EUR':1.14, 'Tola':4, 'Temmy':40}\n", + "\n", + "dict1.update(dict2)\n", + "print(dict1)dict1 = {'NGN':470, 'GBP':0.99, 'MXN':20.1, 'ZAR':17.99, 'ZMK':15830, 'GHS':10.5, 'DEM':1.99, 'USD':1}" + ] + }, + { + "cell_type": "markdown", + "id": "1417b3e7", + "metadata": {}, + "source": [ + "# Write a Python program to remove a key from a dictionary" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "id": "64b1b50d", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'NGN': 470, 'GBP': 0.99, 'MXN': 20.1, 'ZAR': 17.99, 'ZMK': 15830, 'GHS': 10.5, 'DEM': 1.99, 'USD': 1, 'CAD': 1.52, 'EUR': 1.14, 'Tola': 4}\n" + ] + } + ], + "source": [ + "mergedDict = {'NGN': 470, 'GBP': 0.99, 'MXN': 20.1, 'ZAR': 17.99, 'ZMK': 15830, 'GHS': 10.5, 'DEM': 1.99, \n", + " 'USD': 1, 'CAD': 1.52, 'EUR': 1.14, 'Tola': 4, 'Temmy': 40}\n", + "\n", + "mergedDict.pop(\"Temmy\")\n", + "print(mergedDict)" + ] + }, + { + "cell_type": "markdown", + "id": "67f563b9", + "metadata": {}, + "source": [ + "# Write a Python program to get the largest number from a list" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "id": "d9f665f7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "90\n" + ] + } + ], + "source": [ + "listEsden = [90, 28, 31, 23, 25, 59, 65]\n", + "\n", + "def largestNum(listEsden):\n", + " max = listEsden[0]\n", + " for a in listEsden:\n", + " if a > max:\n", + " max = a \n", + " return max\n", + "print(largestNum(listEsden))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "03d0c431", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/RandomForest Classifier- Deborah O..ipynb b/RandomForest Classifier- Deborah O..ipynb new file mode 100644 index 0000000..2b2f772 --- /dev/null +++ b/RandomForest Classifier- Deborah O..ipynb @@ -0,0 +1,778 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 4, + "id": "2a423298", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "from sklearn import datasets" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "23c36ef9", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['setosa', 'versicolor', 'virginica'], dtype='\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", + "
0123
05.13.51.40.2
14.93.01.40.2
24.73.21.30.2
34.63.11.50.2
45.03.61.40.2
\n", + "" + ], + "text/plain": [ + " 0 1 2 3\n", + "0 5.1 3.5 1.4 0.2\n", + "1 4.9 3.0 1.4 0.2\n", + "2 4.7 3.2 1.3 0.2\n", + "3 4.6 3.1 1.5 0.2\n", + "4 5.0 3.6 1.4 0.2" + ] + }, + "execution_count": 47, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = pd.DataFrame(iris.data)\n", + "df.head()" + ] + }, + { + "cell_type": "markdown", + "id": "7cfc2217", + "metadata": {}, + "source": [ + "# splitting the dataset to training and testing" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "b31cc670", + "metadata": {}, + "outputs": [], + "source": [ + "from sklearn.model_selection import train_test_split\n", + "X_train, X_test, y_train, y_test = train_test_split(X,y, test_size = 0.3)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "32dd69c3", + "metadata": {}, + "outputs": [], + "source": [ + "train_test_split" + ] + }, + { + "cell_type": "markdown", + "id": "6f9db476", + "metadata": {}, + "source": [ + "# Building the model" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "2dc44869", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
RandomForestClassifier(n_estimators=50)
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.
" + ], + "text/plain": [ + "RandomForestClassifier(n_estimators=50)" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from sklearn.ensemble import RandomForestClassifier\n", + "model = RandomForestClassifier(n_estimators= 50)\n", + "model.fit(X_train, y_train)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "4f6486a8", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 2, 0, 0, 2, 0, 2, 2, 1, 1,\n", + " 1, 2, 2, 2, 1, 0, 1, 0, 2, 1, 1, 1, 2, 0, 1, 2, 2, 2, 2, 0, 2, 0,\n", + " 1])" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "y_test" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "0fa0752b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[6.4, 2.9, 4.3, 1.3],\n", + " [5.5, 2.6, 4.4, 1.2],\n", + " [5.2, 4.1, 1.5, 0.1],\n", + " [5.9, 3. , 4.2, 1.5],\n", + " [4.4, 3.2, 1.3, 0.2],\n", + " [5.6, 2.9, 3.6, 1.3],\n", + " [6. , 2.9, 4.5, 1.5],\n", + " [5.2, 3.4, 1.4, 0.2],\n", + " [5.8, 4. , 1.2, 0.2],\n", + " [5.5, 2.3, 4. , 1.3],\n", + " [5.1, 3.8, 1.5, 0.3],\n", + " [6. , 2.7, 5.1, 1.6],\n", + " [4.3, 3. , 1.1, 0.1],\n", + " [5.7, 2.5, 5. , 2. ],\n", + " [4.6, 3.2, 1.4, 0.2],\n", + " [5.4, 3.9, 1.7, 0.4],\n", + " [6.8, 3.2, 5.9, 2.3],\n", + " [4.6, 3.6, 1. , 0.2],\n", + " [5.9, 3. , 5.1, 1.8],\n", + " [5.8, 2.8, 5.1, 2.4],\n", + " [5.5, 2.4, 3.7, 1. ],\n", + " [6.7, 3. , 5. , 1.7],\n", + " [6. , 3.4, 4.5, 1.6],\n", + " [6.5, 3. , 5.5, 1.8],\n", + " [6.9, 3.2, 5.7, 2.3],\n", + " [7.7, 2.6, 6.9, 2.3],\n", + " [6. , 2.2, 4. , 1. ],\n", + " [4.4, 2.9, 1.4, 0.2],\n", + " [5.8, 2.7, 3.9, 1.2],\n", + " [4.8, 3.4, 1.9, 0.2],\n", + " [6.1, 2.6, 5.6, 1.4],\n", + " [6.1, 2.9, 4.7, 1.4],\n", + " [6.2, 2.2, 4.5, 1.5],\n", + " [5.8, 2.6, 4. , 1.2],\n", + " [6.3, 2.8, 5.1, 1.5],\n", + " [5.5, 4.2, 1.4, 0.2],\n", + " [6.1, 2.8, 4.7, 1.2],\n", + " [7.1, 3. , 5.9, 2.1],\n", + " [6.7, 3.3, 5.7, 2.5],\n", + " [7.6, 3. , 6.6, 2.1],\n", + " [6.5, 3.2, 5.1, 2. ],\n", + " [5.4, 3.4, 1.5, 0.4],\n", + " [7.7, 2.8, 6.7, 2. ],\n", + " [5.1, 3.8, 1.9, 0.4],\n", + " [6.4, 3.2, 4.5, 1.5]])" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "X_test" + ] + }, + { + "cell_type": "markdown", + "id": "13adb2c4", + "metadata": {}, + "source": [ + "# Checking the model accuracy" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "01c195bb", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.9555555555555556" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "model.score(X_test, y_test)" + ] + }, + { + "cell_type": "markdown", + "id": "86db2eb0", + "metadata": {}, + "source": [ + "# predicting using the model built" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "1c83e4f5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 2, 0, 2, 0, 0, 2, 0, 2, 2, 1, 2,\n", + " 1, 2, 2, 2, 1, 0, 1, 0, 2, 1, 1, 1, 2, 0, 1, 2, 2, 2, 2, 0, 2, 0,\n", + " 1])" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "predicted_value = model.predict(X_test)\n", + "predicted_value" + ] + }, + { + "cell_type": "markdown", + "id": "de9dafda", + "metadata": {}, + "source": [ + "# Validating the model using confusion matrix" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "97c3542b", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[14, 0, 0],\n", + " [ 0, 15, 2],\n", + " [ 0, 0, 14]], dtype=int64)" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from sklearn.metrics import confusion_matrix\n", + "clfx = confusion_matrix(y_test, predicted_value)\n", + "clfx" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "21759dca", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(45, 4)" + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "X_test.shape" + ] + }, + { + "cell_type": "markdown", + "id": "3510f4b0", + "metadata": {}, + "source": [ + "# Visualising the confusion matrix" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "af71d1a0", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAwgAAAJaCAYAAACLNGBfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA4B0lEQVR4nO3df7zX8/0//vtLP44kh353TGpjfsyvfmCJ1CQLkX3nt0TZ/AglP3vHiuGwz0beNYmtwpaZt5/znlmGiBmlmIVI5EdJQ63o9OM8v3+cs9f7+VpFp06v1+vU9brL84/X4/U6z+f9sNdF927P+/ORSZIkCQAAgIjYqtAFAAAAxUODAAAAZGkQAACALA0CAACQpUEAAACyNAgAAECWBgEAAMjSIAAAAFkaBAAAIKt+oQvYFCpefbzQJUCd1LjzgEKXAMAWYtWKDwtdwjqtXPRO3q7VoPk383at9SVBAAAAsjbLBAEAADZY5epCV1BQEgQAACBLggAAAGlJZaErKCgJAgAAkCVBAACAtEoJAgAAQERIEAAAIEdiBgEAAKCKBAEAANLMIAAAAFSRI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ikWLFkVlZWW0bNmytusCAAAKYKN2Um7evHlt1QEAAEWhskhnA/Klxg1C+/btI5NZ9z+0d955Z6MKAgAACqfGDcKQIUNyXq9cuTJmzJgRf/rTn+LSSy+trboAAKAgivXpQvlS4wZh8ODBa13/5S9/GdOmTdvoggAAgMKp8T4I69K7d++4//77a+t0AABQEHZSriX/8z//E02bNq2t0wEAAAVQ41uMOnTokDOknCRJLFiwID755JO49dZba7U4AADINzMINdS3b9+c11tttVW0aNEiunfvHrvvvntt1QUAABRAjRqEVatWRbt27eKII46I1q1bb6qaAACgYIp1NiBfajSDUL9+/Tj33HOjoqJiU9UDAAAUUI2HlA888MCYMWPGpqgFAAAosBrPIJx33nlx8cUXxwcffBCdOnWKxo0b57y/zz771FpxAACQb1v6LUbr3SAMGDAgRo0aFSeeeGJERFx44YXZ9zKZTCRJEplMJlavXl37VQIAAHmx3g3CnXfeGTfccEPMnTt3U9YDAAAF5TGn6ylJkoiI2HnnnTdZMQAAQGHVaAYhvUEaAABsjiq38D/y1qhB+Pa3v/21TcKnn366UQUBAACFU6MG4eqrr47S0tJNVQsAABRcpRmE9XfSSSdFy5YtN1UtAABAga13g2D+AACALUFS6AIKbL13Uv73U4wAAIDN13onCJWVW/qecgAAbAm29D/1rneCAAAAbP5qNKQMAACbu8otfPZWggAAAGRJEAAAIGVLfzSPBAEAAMiSIAAAQIqnGAEAAFTTIAAAAFluMQIAgJTKLfsppxIEAADg/0gQAAAgpTK27AhBggAAAHXEhx9+GKeddlo0a9Ysttlmm9hvv/1i+vTptXoNCQIAAKQU60Zpn332WXTt2jV69OgRjz32WLRs2TLmzJkT22+/fa1eR4MAAAB1wI033hg77bRTTJgwIbvWrl27Wr+OW4wAACClMpO/o6KiIpYsWZJzVFRUrLWuRx55JDp37hzHH398tGzZMjp06BB33HFHrf/+GgQAACiQ8vLyKC0tzTnKy8vX+tl33nknxo4dG7vuums8/vjjcc4558SFF14Yd911V63WlEmSpFhvs9pg9RvuWOgSoE768qNnC10C1Eld9u5f6BKgzpk2v3j/mzNxx9Pydq2T3/n1GolBSUlJlJSUrPHZhg0bRufOneP555/Prl144YXx0ksvxV//+tdaq8kMAgAAFMi6moG1adOmTey55545a3vssUfcf//9tVqTBgEAAFKK9faarl27xptvvpmzNnv27Nh5551r9TpmEAAAoA646KKL4oUXXojrr78+3n777Zg0aVLcfvvtMWjQoFq9jgQBAABSKot0I+X9998/HnzwwRg2bFhcc8010b59+xg1alSceuqptXodDQIAANQRRx99dBx99NGb9BoaBAAASKksdAEFZgYBAADIkiAAAECKBAEAAKCaBAEAAFKSIn2KUb5IEAAAgCwNAgAAkOUWIwAASDGkDAAAUE2CAAAAKRIEAACAahIEAABISQpdQIFJEAAAgCwJAgAApFTaKA0AAKCKBAEAAFI8xQgAAKCaBAEAAFIkCAAAANUkCAAAkGIfBAAAgGoSBAAASLEPAgAAQDUJAgAApHiKEQAAQDUNAgAAkOUWIwAASPGYUwAAgGoSBAAASKncwjMEDQKQ1ajskEKXAHXSsmnjC10CQK3RIAAAQIrHnAIAAFSTIAAAQMqWPYEgQQAAAFIkCAAAkGIGAQAAoJoEAQAAUiozha6gsCQIAABAlgQBAABStvSdlCUIAABAlgQBAABStuz8QIIAAACkSBAAACDFPggAAADVJAgAAJDiKUYAAADVNAgAAECWW4wAACBly77BSIIAAACkSBAAACDFY04BAACqSRAAACDFY04BAACqSRAAACBly84PJAgAAECKBAEAAFI8xQgAAKCaBAEAAFKSLXwKQYIAAABkSRAAACDFDAIAAEA1DQIAAKRURpK3Y0OVl5dHJpOJIUOG1N4vXk2DAAAAdchLL70Ut99+e+yzzz6b5PwaBAAASEnyeNTU0qVL49RTT4077rgjdthhhw38Db+aBgEAAAqkoqIilixZknNUVFSs8/ODBg2Ko446Knr27LnJatIgAABAgZSXl0dpaWnOUV5evtbP/u53v4vp06ev8/3a4jGnAACQsjHDwzU1bNiwGDp0aM5aSUnJGp97//33Y/DgwfHnP/85tt56601akwYBAAAKpKSkZK0NwX+aPn16LFy4MDp16pRdW716dTzzzDMxZsyYqKioiHr16tVKTRoEAABIKcaN0g477LD4+9//nrN25plnxu677x6XX355rTUHERoEAAAoek2aNIm99torZ61x48bRrFmzNdY3lgYBAABSkjzOIBQjDQIAANRBTz/99CY5rwYBAABSinEGIZ/sgwAAAGRJEAAAIGVLn0GQIAAAAFkSBAAASDGDAAAAUE2CAAAAKZWJGQQAAICIkCAAAECOLTs/kCAAAAApEgQAAEip3MIzBAkCAACQJUEAAIAUOykDAABU0yAAAABZbjECAICUykIXUGASBAAAIEuCAAAAKR5zCgAAUE2CAAAAKR5zCgAAUE2CAAAAKZ5iBAAAUE2CAAAAKUliBgEAACAiJAgAAJDDPggAAADVJAgAAJDiKUYAAADVJAgAAJBiJ2UAAIBqEgQAAEjxFCMAAIBqGgQAACDLLUYAAJCSJG4xAgAAiAgJAgAA5LBRGgAAQDUJAgAApNgoDQAAoJoEAQAAUmyUBnlyztn94603/xpLl8yJv73wWBzc9YBClwR1gu8OfLVps96O828YF4f9+MrY5/gL48kXX13nZ68Z97vY5/gL4+7/fSqPFULdokEgL44//pi46Rcjo/yG/47OBxwRU6e+GI/+4Tex005lhS4NiprvDny9LytWxG477xjDBh7/lZ978sVX4+9vvRctdyjNU2XUVUmS5O0oRhoE8uKiwT+K8RN+F+Mn3BNvvPF2XHzJiHj/g4/inLNPL3RpUNR8d+DrHdJhz7jg5KOj54H7rvMzH//z87j+1/dF+eDTo379enmsDuoeDQKbXIMGDaJjx31i8hNTctYnT54SXb7buUBVQfHz3YHaUVlZGf81+u4445jDYped2hS6HOqAykjydhQjDQKbXPPmTaN+/fqx8ONFOesLFy6KVq1bFqgqKH6+O1A7xj/8RNSvt1WceuShhS4F6oSCNwhffvllTJ06NWbNmrXGe8uXL4+77rrrK3++oqIilixZknMU6/1cW7r//PeSyWT8u4L14LsDG27WnHnx2/+dEj8ddFpkMplCl0MdkeTxf8WooA3C7NmzY4899ohu3brF3nvvHd27d4/58+dn31+8eHGceeaZX3mO8vLyKC0tzTmSyn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Fx4sT8FwR1xLrm2yZMmBBnnHFGfouBOkiDAAAAZJlBAAAAsjQIAABAlgYBAADI0iAAAABZGgQAACBLgwAAAGRpEAAAgCwNAsBGGDlyZOy3337Z12eccUb07ds373W8++67kclkYubMmZv0Ou3atYtRo0Zt0msAUFgaBGCzc8YZZ0Qmk4lMJhMNGjSIb37zm3HJJZfEsmXLNvm1b7nllvXe5Thff6iPiNh7773jrLPOWut799xzTzRo0CA+/vjjTV4HAMVPgwBslr7//e/H/Pnz45133olrr702br311rjkkkvW+tmVK1fW2nVLS0tj++23r7Xz1ZaBAwfG73//+/jiiy/WeG/8+PFx9NFHR6tWrQpQGQDFRoMAbJZKSkqidevWsdNOO8Upp5wSp556ajz00EMR8X+3BY0fPz6++c1vRklJSSRJEosXL44f//jH0bJly9huu+3ie9/7Xrzyyis5573hhhuiVatW0aRJkxg4cGAsX7485/3/vMWosrIybrzxxthll12ipKQk2rZtG9ddd11ERLRv3z4iIjp06BCZTCa6d++e/bkJEybEHnvsEVtvvXXsvvvuceutt+Zc58UXX4wOHTrE1ltvHZ07d44ZM2Z85T+Pfv36RUVFRdx333056/PmzYsnn3wyBg4cGHPmzIljjz02WrVqFdtuu23sv//+8cQTT6zznGtLQD7//PPIZDLx9NNPZ9dmzZoVRx55ZGy77bbRqlWr6NevXyxatOgr6wWgcDQIwBahUaNGOUnB22+/Hb///e/j/vvvz/4B96ijjooFCxbEH//4x5g+fXp07NgxDjvssPj0008jIuL3v/99jBgxIq677rqYNm1atGnTZo0/uP+nYcOGxY033hhXXXVVzJo1KyZNmpT9m/oXX3wxIiKeeOKJmD9/fjzwwAMREXHHHXfE8OHD47rrrovXX389rr/++rjqqqvizjvvjIiIZcuWxdFHHx277bZbTJ8+PUaOHLnOdOTfmjVrFscee2xMmDAhZ33ChAnRqlWr6N27dyxdujSOPPLIeOKJJ2LGjBlxxBFHRJ8+fWLevHnr+U95TfPnz49DDz009ttvv5g2bVr86U9/io8//jhOOOGEDT4nAJtYArCZ6d+/f3LsscdmX//tb39LmjVrlpxwwglJkiTJiBEjkgYNGiQLFy7MfuYvf/lLst122yXLly/POde3vvWtZNy4cUmSJEmXLl2Sc845J+f9Aw88MNl3333Xeu0lS5YkJSUlyR133LHWOufOnZtERDJjxoyc9Z122imZNGlSztpPf/rTpEuXLkmSJMm4ceOSpk2bJsuWLcu+P3bs2LWeK+2xxx5LMplMMmfOnCRJkqSysjJp165dMmzYsHX+zJ577pmMHj06+3rnnXdObr755nXW/9lnnyURkTz11FNJkiTJVVddlfTq1SvnnO+//34SEcmbb765zusCUDgSBGCz9Oijj8a2224bW2+9dXTp0iW6desWo0ePzr6/8847R4sWLbKvp0+fHkuXLo1mzZrFtttumz3mzp0bc+bMiYiI119/Pbp06ZJznf98nfb6669HRUVFHHbYYetd9yeffBLvv/9+DBw4MKeOa6+9NqeOfffdN7bZZpv1quPfevXqFd/4xjeyKcKTTz4Z7777bpx55pkRUZVMXHbZZbHnnnvG9ttvH9tuu2288cYbG5UgTJ8+PZ566qmc32X33XePiMj+PgAUl/qFLgBgU+jRo0eMHTs2GjRoEGVlZdGgQYOc9xs3bpzzurKyMtq0aZNz7/y/bejQcaNGjWr8M5WVlRFRdZvRgQcemPNevXr1IiIiSZINqmerrbaKM844IyZOnBhXX311TJgwIbp16xa77rprRERceuml8fjjj8fPf/7z2GWXXaJRo0bxwx/+MFasWLHO8/1nPf858F1ZWRl9+vSJG2+8cY2fb9OmzQb9HgBsWhoEYLPUuHHj2GWXXdb78x07dowFCxZE/fr1o127dmv9zB577BEvvPBCnH766dm1F154YZ3n3HXXXaNRo0bxl7/8Za2PGG3YsGFERKxevTq71qpVq9hxxx3jnXfeiVNPPXWt591zzz3j7rvvji+//DLbhHxVHWlnnnlmXHvttfHAAw/EAw88ELfddlv2vWeffTbOOOOMOO644yIiYunSpfHuu++u81z/TmDmz58fHTp0iIhY45GtHTt2jPvvvz/atWsX9ev7Tw5AXeAWI4CI6NmzZ3Tp0iX69u0bjz/+eLz77rvx/PPPx5VXXhnTpk2LiIjBgwfH+PHjY/z48TF79uwYMWJE/OMf/1jnObfeeuu4/PLL47LLLou77ror5syZEy+88EL8+te/joiIli1bRqNGjbKDu4sXL46IqqcslZeXxy233BKzZ8+Ov//97zFhwoS46aabIiLilFNOia222ioGDhwYs2bNij/+8Y/x85//fL1+z/bt28f3vve9+PGPfxwNGjSIH/7wh9n3dtlll3jggQdi5syZ8corr8Qpp5ySTTTWplGjRvHd7343brjhhpg1a1Y888wzceWVV+Z8ZtCgQfHpp5/GySefHC+++GK888478ec//zkGDBiQ0xgBUDw0CAARkclk4o9//GN069YtBgwYEN/+9rfjpJNOinfffTf71KETTzwxfvKTn8Tll18enTp1ivfeey/OPffcrzzvVVddFRdffHH85Cc/iT322CNOPPHEWLhwYURE1K9fP/77v/87xo0bF2VlZXHsscdGRMRZZ50Vv/rVr2LixImx9957x6GHHhoTJ07MPhZ12223jT/84Q8xa9as6NChQwwfPnytt/Csy8CBA+Ozzz6Lk046KWeO4eabb44ddtghDjrooOjTp08cccQR0bFjx6881/jx42PlypXRuXPnGDx4cFx77bU575eVlcVzzz0Xq1evjiOOOCL22muvGDx4cJSWlmZvUQKguGSSDb2ZFQAA2Oz46xsAACBLgwAAAGRpEAAAgCwNAgAAkKVBAAAAsjQIAABAlgYBAADI0iAAAABZGgQAACBLgwAAAGRpEAAAgCwNAgAAkPX/A9SU+YpTe16CAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%matplotlib inline \n", + "import matplotlib.pyplot as plt\n", + "import seaborn as sns\n", + "plt.figure(figsize = (10,7))\n", + "sns.heatmap(clfx, annot = True)\n", + "plt.xlabel(\"Predicted Value\")\n", + "plt.ylabel(\"True Value\")\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0697431a", + "metadata": {}, + "outputs": [], + "source": [ + "From the confusion matrix, it can be seen that the model built predicted the values for 'setosa' correctly, predicted the values\n", + "for 'versicolor' correctly also, but predicted 14 values for 'virginica' correctly and 2 values for 'virginica' wrongly. It confused \n", + "it for 'versicolor'." + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "a3fd71ae", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['DESCR',\n", + " 'data',\n", + " 'data_filename',\n", + " 'data_module',\n", + " 'feature_names',\n", + " 'frame',\n", + " 'target',\n", + " 'target_filename']" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "diabetes = datasets.load_diabetes()\n", + "dir(diabetes)" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "id": "04397e9e", + "metadata": {}, + "outputs": [], + "source": [ + "X = diabetes.data\n", + "y = diabetes.target" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "id": "44a0b072", + "metadata": {}, + "outputs": [], + "source": [ + "from sklearn.model_selection import train_test_split\n", + "X_train, X_test, y_train, y_test = train_test_split(X,y, test_size = 0.3)" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "7f2c960b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
RandomForestClassifier(n_estimators=30)
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.
" + ], + "text/plain": [ + "RandomForestClassifier(n_estimators=30)" + ] + }, + "execution_count": 37, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "diab_model = RandomForestClassifier(n_estimators= 30)\n", + "diab_model.fit(X_train, y_train)" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "fa3f2644", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.0" + ] + }, + "execution_count": 39, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "diab_model.score(X_test, y_test)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "9be51f04", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['age', 'sex', 'bmi', 'bp', 's1', 's2', 's3', 's4', 's5', 's6']" + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "diabetes.feature_names" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "id": "6e7d0de1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
RandomForestRegressor()
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.
" + ], + "text/plain": [ + "RandomForestRegressor()" + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from sklearn.ensemble import RandomForestRegressor\n", + "model2 = RandomForestRegressor(n_estimators= 100)\n", + "model2.fit(X_train, y_train)" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "id": "5745eb13", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.3072018707051737" + ] + }, + "execution_count": 45, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "model2.score(X_test, y_test)" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "id": "93eb9ab3", + "metadata": {}, + "outputs": [ + { + "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", + "
0123456789
00.0380760.0506800.0616960.021872-0.044223-0.034821-0.043401-0.0025920.019907-0.017646
1-0.001882-0.044642-0.051474-0.026328-0.008449-0.0191630.074412-0.039493-0.068332-0.092204
20.0852990.0506800.044451-0.005670-0.045599-0.034194-0.032356-0.0025920.002861-0.025930
3-0.089063-0.044642-0.011595-0.0366560.0121910.024991-0.0360380.0343090.022688-0.009362
40.005383-0.044642-0.0363850.0218720.0039350.0155960.008142-0.002592-0.031988-0.046641
\n", + "
" + ], + "text/plain": [ + " 0 1 2 3 4 5 6 \\\n", + "0 0.038076 0.050680 0.061696 0.021872 -0.044223 -0.034821 -0.043401 \n", + "1 -0.001882 -0.044642 -0.051474 -0.026328 -0.008449 -0.019163 0.074412 \n", + "2 0.085299 0.050680 0.044451 -0.005670 -0.045599 -0.034194 -0.032356 \n", + "3 -0.089063 -0.044642 -0.011595 -0.036656 0.012191 0.024991 -0.036038 \n", + "4 0.005383 -0.044642 -0.036385 0.021872 0.003935 0.015596 0.008142 \n", + "\n", + " 7 8 9 \n", + "0 -0.002592 0.019907 -0.017646 \n", + "1 -0.039493 -0.068332 -0.092204 \n", + "2 -0.002592 0.002861 -0.025930 \n", + "3 0.034309 0.022688 -0.009362 \n", + "4 -0.002592 -0.031988 -0.046641 " + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = pd.DataFrame(diabetes.data)\n", + "df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "883a01cc", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/RandomForest- Deborah O..ipynb b/RandomForest- Deborah O..ipynb new file mode 100644 index 0000000..5457bcc --- /dev/null +++ b/RandomForest- Deborah O..ipynb @@ -0,0 +1,778 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 4, + "id": "c6c856ea", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "from sklearn import datasets" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "2444b6a4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['setosa', 'versicolor', 'virginica'], dtype='\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", + "
0123
05.13.51.40.2
14.93.01.40.2
24.73.21.30.2
34.63.11.50.2
45.03.61.40.2
\n", + "" + ], + "text/plain": [ + " 0 1 2 3\n", + "0 5.1 3.5 1.4 0.2\n", + "1 4.9 3.0 1.4 0.2\n", + "2 4.7 3.2 1.3 0.2\n", + "3 4.6 3.1 1.5 0.2\n", + "4 5.0 3.6 1.4 0.2" + ] + }, + "execution_count": 47, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = pd.DataFrame(iris.data)\n", + "df.head()" + ] + }, + { + "cell_type": "markdown", + "id": "084db56a", + "metadata": {}, + "source": [ + "# splitting the dataset to training and testing" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "86c6e0aa", + "metadata": {}, + "outputs": [], + "source": [ + "from sklearn.model_selection import train_test_split\n", + "X_train, X_test, y_train, y_test = train_test_split(X,y, test_size = 0.3)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6cadc1bc", + "metadata": {}, + "outputs": [], + "source": [ + "train_test_split" + ] + }, + { + "cell_type": "markdown", + "id": "e3e89d11", + "metadata": {}, + "source": [ + "# Building the model" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "fe6ebfa1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
RandomForestClassifier(n_estimators=50)
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.
" + ], + "text/plain": [ + "RandomForestClassifier(n_estimators=50)" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from sklearn.ensemble import RandomForestClassifier\n", + "model = RandomForestClassifier(n_estimators= 50)\n", + "model.fit(X_train, y_train)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "17dfd379", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 2, 0, 0, 2, 0, 2, 2, 1, 1,\n", + " 1, 2, 2, 2, 1, 0, 1, 0, 2, 1, 1, 1, 2, 0, 1, 2, 2, 2, 2, 0, 2, 0,\n", + " 1])" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "y_test" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "95e06ef6", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[6.4, 2.9, 4.3, 1.3],\n", + " [5.5, 2.6, 4.4, 1.2],\n", + " [5.2, 4.1, 1.5, 0.1],\n", + " [5.9, 3. , 4.2, 1.5],\n", + " [4.4, 3.2, 1.3, 0.2],\n", + " [5.6, 2.9, 3.6, 1.3],\n", + " [6. , 2.9, 4.5, 1.5],\n", + " [5.2, 3.4, 1.4, 0.2],\n", + " [5.8, 4. , 1.2, 0.2],\n", + " [5.5, 2.3, 4. , 1.3],\n", + " [5.1, 3.8, 1.5, 0.3],\n", + " [6. , 2.7, 5.1, 1.6],\n", + " [4.3, 3. , 1.1, 0.1],\n", + " [5.7, 2.5, 5. , 2. ],\n", + " [4.6, 3.2, 1.4, 0.2],\n", + " [5.4, 3.9, 1.7, 0.4],\n", + " [6.8, 3.2, 5.9, 2.3],\n", + " [4.6, 3.6, 1. , 0.2],\n", + " [5.9, 3. , 5.1, 1.8],\n", + " [5.8, 2.8, 5.1, 2.4],\n", + " [5.5, 2.4, 3.7, 1. ],\n", + " [6.7, 3. , 5. , 1.7],\n", + " [6. , 3.4, 4.5, 1.6],\n", + " [6.5, 3. , 5.5, 1.8],\n", + " [6.9, 3.2, 5.7, 2.3],\n", + " [7.7, 2.6, 6.9, 2.3],\n", + " [6. , 2.2, 4. , 1. ],\n", + " [4.4, 2.9, 1.4, 0.2],\n", + " [5.8, 2.7, 3.9, 1.2],\n", + " [4.8, 3.4, 1.9, 0.2],\n", + " [6.1, 2.6, 5.6, 1.4],\n", + " [6.1, 2.9, 4.7, 1.4],\n", + " [6.2, 2.2, 4.5, 1.5],\n", + " [5.8, 2.6, 4. , 1.2],\n", + " [6.3, 2.8, 5.1, 1.5],\n", + " [5.5, 4.2, 1.4, 0.2],\n", + " [6.1, 2.8, 4.7, 1.2],\n", + " [7.1, 3. , 5.9, 2.1],\n", + " [6.7, 3.3, 5.7, 2.5],\n", + " [7.6, 3. , 6.6, 2.1],\n", + " [6.5, 3.2, 5.1, 2. ],\n", + " [5.4, 3.4, 1.5, 0.4],\n", + " [7.7, 2.8, 6.7, 2. ],\n", + " [5.1, 3.8, 1.9, 0.4],\n", + " [6.4, 3.2, 4.5, 1.5]])" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "X_test" + ] + }, + { + "cell_type": "markdown", + "id": "c48d3056", + "metadata": {}, + "source": [ + "# Checking the model accuracy" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "bda0fa81", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.9555555555555556" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "model.score(X_test, y_test)" + ] + }, + { + "cell_type": "markdown", + "id": "7eab165b", + "metadata": {}, + "source": [ + "# predicting using the model built" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "d2422899", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 2, 0, 2, 0, 0, 2, 0, 2, 2, 1, 2,\n", + " 1, 2, 2, 2, 1, 0, 1, 0, 2, 1, 1, 1, 2, 0, 1, 2, 2, 2, 2, 0, 2, 0,\n", + " 1])" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "predicted_value = model.predict(X_test)\n", + "predicted_value" + ] + }, + { + "cell_type": "markdown", + "id": "28914d28", + "metadata": {}, + "source": [ + "# Validating the model using confusion matrix" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "0062630e", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[14, 0, 0],\n", + " [ 0, 15, 2],\n", + " [ 0, 0, 14]], dtype=int64)" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from sklearn.metrics import confusion_matrix\n", + "clfx = confusion_matrix(y_test, predicted_value)\n", + "clfx" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "f479555a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(45, 4)" + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "X_test.shape" + ] + }, + { + "cell_type": "markdown", + "id": "ffbcd935", + "metadata": {}, + "source": [ + "# Visualising the confusion matrix" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "c5ef3e40", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEU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1yq4fd9xx8Ze//KVWiwMAAPKrxgnC1KlT47nnnouGDRvmrO+8887x4Ycf1lphAABQCIaUa6iysjJWr169xvoHH3wQTZo0qZWiAACAwqhxg3D44YfHqFGjsq8zmUwsXbo0RowYEUceeWRt1gYAAHmXJJm8HcWoxrcY3XzzzdGjR4/Yc889Y/ny5XHKKafEW2+9Fc2bN4977rlnU9QIAADkSY0bhLKyspg5c2bcc8898fLLL0dlZWUMHDgwTj311JyhZQAAqIuSykJXUFgbtJNyo0aNYsCAATFgwIDargcAACigGjcId91111e+f/rpp29wMQAAUGiVRTobkC81bhAGDx6c83rlypXxxRdfRMOGDWObbbbRIAAAQB1W4wbhs88+W2PtrbfeinPPPTcuvfTSWikKAAAKpVifLpQvNX7M6drsuuuuccMNN6yRLgAAALVj1apVceWVV0b79u2jUaNG8c1vfjOuueaaqKys3anqDRpSXpt69erFRx99VFunAwCAgijWnZRvvPHGuO222+LOO++M73znOzFt2rQ488wzo7S0tFb/or7GDcIjjzyS8zpJkpg/f36MGTMmunbtWmuFAQAA/+evf/1rHHvssXHUUUdFRES7du3innvuiWnTptXqdWrcIPTt2zfndSaTiRYtWsT3vve9+MUvflFbdQEAQEEkSf6uVVFRERUVFTlrJSUlUVJSssZnDz744Ljtttti9uzZ8e1vfzteeeWVmDp1aowaNapWa6pxg1Db9zgBAMCWqry8PK6++uqctREjRsTIkSPX+Ozll18eixcvjt133z3q1asXq1evjuuuuy5OPvnkWq2p1mYQAABgc5DPGYRhw4bF0KFDc9bWlh5ERNx7773xm9/8JiZNmhTf+c53YubMmTFkyJAoKyuL/v3711pN69Ug/GfRX+Wmm27a4GIAAGBLsq7bidbm0ksvjSuuuCJOOumkiIjYe++947333ovy8vL8NwgzZsxYr5NlMsU58Q0AAOurWHdS/uKLL2KrrXJ3KahXr15hHnP61FNP1epFAQCAmunTp09cd9110bZt2/jOd74TM2bMiJtuuikGDBhQq9cxgwAAAHXA6NGj46qrrorzzjsvFi5cGGVlZXH22WfHT37yk1q9z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AYhvUEaAABsjiq38D/y1qhB+Pa3v/21TcKnn366UQUBAACFU6MG4eqrr47S0tJNVQsAABRcpRmE9XfSSSdFy5YtN1UtAABAga13g2D+AACALUFS6AIKbL13Uv73U4wAAIDN13onCJWVW/qecgAAbAm29D/1rneCAAAAbP5qNKQMAACbu8otfPZWggAAAGRJEAAAIGVLfzSPBAEAAMiSIAAAQIqnGAEAAFTTIAAAAFluMQIAgJTKLfsppxIEAADg/0gQAAAgpTK27AhBggAAAHXEhx9+GKeddlo0a9Ysttlmm9hvv/1i+vTptXoNCQIAAKQU60Zpn332WXTt2jV69OgRjz32WLRs2TLmzJkT22+/fa1eR4MAAAB1wI033hg77bRTTJgwIbvWrl27Wr+OW4wAACClMpO/o6KiIpYsWZJzVFRUrLWuRx55JDp37hzHH398tGzZMjp06BB33HFHrf/+GgQAACiQ8vLyKC0tzTnKy8vX+tl33nknxo4dG7vuums8/vjjcc4558SFF14Yd911V63WlEmSpFhvs9pg9RvuWOgSoE768qNnC10C1Eld9u5f6BKgzpk2v3j/mzNxx9Pydq2T3/n1GolBSUlJlJSUrPHZhg0bRufOneP555/Prl144YXx0ksvxV//+tdaq8kMAgAAFMi6moG1adOmTey55545a3vssUfcf//9tVqTBgEAAFKK9faarl27xptvvpmzNnv27Nh5551r9TpmEAAAoA646KKL4oUXXojrr78+3n777Zg0aVLcfvvtMWjQoFq9jgQBAABSKot0I+X9998/HnzwwRg2bFhcc8010b59+xg1alSceuqptXodDQIAANQRRx99dBx99NGb9BoaBAAASKksdAEFZgYBAADIkiAAAECKBAEAAKCaBAEAAFKSIn2KUb5IEAAAgCwNAgAAkOUWIwAASDGkDAAAUE2CAAAAKRIEAACAahIEAABISQpdQIFJEAAAgCwJAgAApFTaKA0AAKCKBAEAAFI8xQgAAKCaBAEAAFIkCAAAANUkCAAAkGIfBAAAgGoSBAAASLEPAgAAQDUJAgAApHiKEQAAQDUNAgAAkOUWIwAASPGYUwAAgGoSBAAASKncwjMEDQKQ1ajskEKXAHXSsmnjC10CQK3RIAAAQIrHnAIAAFSTIAAAQMqWPYEgQQAAAFIkCAAAkGIGAQAAoJoEAQAAUiozha6gsCQIAABAlgQBAABStvSdlCUIAABAlgQBAABStuz8QIIAAACkSBAAACDFPggAAADVJAgAAJDiKUYAAADVNAgAAECWW4wAACBly77BSIIAAACkSBAAACDFY04BAACqSRAAACDFY04BAACqSRAAACBly84PJAgAAECKBAEAAFI8xQgAAKCaBAEAAFKSLXwKQYIAAABkSRAAACDFDAIAAEA1DQIAAKRURpK3Y0OVl5dHJpOJIUOG1N4vXk2DAAAAdchLL70Ut99+e+yzzz6b5PwaBAAASEnyeNTU0qVL49RTT4077rgjdthhhw38Db+aBgEAAAqkoqIilixZknNUVFSs8/ODBg2Ko446Knr27LnJatIgAABAgZSXl0dpaWnOUV5evtbP/u53v4vp06ev8/3a4jGnAACQsjHDwzU1bNiwGDp0aM5aSUnJGp97//33Y/DgwfHnP/85tt56601akwYBAAAKpKSkZK0NwX+aPn16LFy4MDp16pRdW716dTzzzDMxZsyYqKioiHr16tVKTRoEAABIKcaN0g477LD4+9//nrN25plnxu677x6XX355rTUHERoEAAAoek2aNIm99torZ61x48bRrFmzNdY3lgYBAABSkjzOIBQjDQIAANRBTz/99CY5rwYBAABSinEGIZ/sgwAAAGRJEAAAIGVLn0GQIAAAAFkSBAAASDGDAAAAUE2CAAAAKZWJGQQAAICIkCAAAECOLTs/kCAAAAApEgQAAEip3MIzBAkCAACQJUEAAIAUOykDAABU0yAAAABZbjECAICUykIXUGASBAAAIEuCAAAAKR5zCgAAUE2CAAAAKR5zCgAAUE2CAAAAKZ5iBAAAUE2CAAAAKUliBgEAACAiJAgAAJDDPggAAADVJAgAAJDiKUYAAADVJAgAAJBiJ2UAAIBqEgQAAEjxFCMAAIBqGgQAACDLLUYAAJCSJG4xAgAAiAgJAgAA5LBRGgAAQDUJAgAApNgoDQAAoJoEAQAAUmyUBnlyztn94603/xpLl8yJv73wWBzc9YBClwR1gu8OfLVps96O828YF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AkGIGAQAAoJoEAQAAUuykDAAAUE2DAAAAZLnFCAAAUgwpAwAAVJMgAABAio3SAAAAqkkQAAAgxQwCAABANQkCAACk2CgNAACgmgQBAABSEk8xAgAAqCJBAACAFDMIAAAA1SQIAACQYh8EAACAahIEAABI8RQjAACAahIEAABIMYMAAABQTYMAAAB1yK233hrt27ePrbfeOjp16hTPPvtsrZ5fgwAAAClJkuTtqKl77703hgwZEsOHD48ZM2bEIYccEr1794558+bV2u+fSTbDm6zqN9yx0CUAsAVZNm18oUuAOqdknyMKXcI6NcjjnyVXrviwRp8/8MADo2PHjjF27Njs2h577BF9+/aN8vLyWqlJggAAAClJHo+aWLFiRUyfPj169eqVs96rV694/vnna/prrpOnGAEAQIFUVFRERUVFzlpJSUmUlJSs8dlFixbF6tWro1WrVjnrrVq1igULFtRaTZtlg7CqhlEN+VNRURHl5eUxbNiwtf4fH1iT7w1sGN8dNlQ+/yw5cuTIuPrqq3PWRowYESNHjlznz2QymZzXSZKssbYxNssZBIrXkiVLorS0NBYvXhzbbbddocuBOsH3BjaM7w51QU0ShBUrVsQ222wT9913Xxx33HHZ9cGDB8fMmTNjypQptVKTGQQAACiQkpKS2G677XKOdSVeDRs2jE6dOsXkyZNz1idPnhwHHXRQrdW0Wd5iBAAAm6OhQ4dGv379onPnztGlS5e4/fbbY968eXHOOefU2jU0CAAAUEeceOKJ8c9//jOuueaamD9/fuy1117xxz/+MXbeeedau4YGgbwqKSmJESNGGBaDGvC9gQ3ju8Pm6rzzzovzzjtvk53fkDIAAJBlSBkAAMjSIAAAAFkaBAAAIEuDAAAAZGkQyJtbb7012rdvH1tvvXV06tQpnn322UKXBEXtmWeeiT59+kRZWVlkMpl46KGHCl0S1Anl5eWx//77R5MmTaJly5bRt2/fePPNNwtdFtQZGgTy4t57740hQ4bE8OHDY8aMGXHIIYdE7969Y968eYUuDYrWsmXLYt99940xY8YUuhSoU6ZMmRKDBg2KF154ISZPnhyrVq2KXr16xbJlywpdGtQJHnNKXhx44IHRsWPHGDt2bHZtjz32iL59+0Z5eXkBK4O6IZPJxIMPPhh9+/YtdClQ53zyySfRsmXLmDJlSnTr1q3Q5UDRkyCwya1YsSKmT58evXr1ylnv1atXPP/88wWqCoAtxeLFiyMiomnTpgWuBOoGDQKb3KJFi2L16tXRqlWrnPVWrVrFggULClQVAFuCJEli6NChcfDBB8dee+1V6HKgTqhf6ALYcmQymZzXSZKssQYAten888+PV199NaZOnVroUqDO0CCwyTVv3jzq1au3RlqwcOHCNVIFAKgtF1xwQTzyyCPxzDPPxDe+8Y1ClwN1hluM2OQaNmwYnTp1ismTJ+esT548OQ466KACVQXA5ipJkjj//PPjgQceiCeffDLat29f6JKgTpEgkBdDhw6Nfv36RefOnaNLly5x++23x7x58+Kcc84pdGlQtJYuXRpvv/129vXcuXNj5syZ0bRp02jbtm0BK4PiNmjQoJg0aVI8/PDD0aRJk2yCXVpaGo0aNSpwdVD8POaUvLn11lvjZz/7WcyfPz/22muvuPnmmz1uDr7C008/HT169FhjvX///jFx4sT8FwR1xLrm2yZMmBBnnHFGfouBOkiDAAAAZJlBAAAAsjQIAABAlgYBAADI0iAAAABZGgQAACBLgwAAAGRpEAAAgCwNAsBGGDlyZOy3337Z12eccUb07ds373W8++67kclkYubMmZv0Ou3atYtRo0Zt0msAUFgaBGCzc8YZZ0Qmk4lMJhMNGjSIb37zm3HJJZfEsmXLNvm1b7nllvXe5Thff6iPiNh7773jrLPOWut799xzTzRo0CA+/vjjTV4HAMVPgwBslr7//e/H/Pnz45133olrr702br311rjkkkvW+tmVK1fW2nVLS0tj++23r7Xz1ZaBAwfG73//+/jiiy/WeG/8+PFx9NFHR6tWrQpQGQDFRoMAbJZKSkqidevWsdNOO8Upp5wSp556ajz00EMR8X+3BY0fPz6++c1vRklJSSRJEosXL44f//jH0bJly9huu+3ie9/7Xrzyyis5573hhhuiVatW0aRJkxg4cGAsX7485/3/vMWosrIybrzxxthll12ipKQk2rZtG9ddd11ERLRv3z4iIjp06BCZTCa6d++e/bkJEybEHnvsEVtvvXXsvvvuceutt+Zc58UXX4wOHTrE1ltvHZ07d44ZM2Z85T+Pfv36RUVFRdx333056/PmzYsnn3wyBg4cGHPmzIljjz02WrVqFdtuu23sv//+8cQTT6zznGtLQD7//PPIZDLx9NNPZ9dmzZoVRx55ZGy77bbRqlWr6NevXyxatOgr6wWgcDQIwBahUaNGOUnB22+/Hb///e/j/vvvz/4B96ijjooFCxbEH//4x5g+fXp07NgxDjvssPj0008jIuL3v/99jBgxIq677rqYNm1atGnTZo0/uP+nYcOGxY033hhXXXVVzJo1KyZNmpT9m/oXX3wxIiKeeOKJmD9/fjzwwAMREXHHHXfE8OHD47rrrovXX389rr/++rjqqqvizjvvjIiIZcuWxdFHHx277bZbTJ8+PUaOHLnOdOTfmjVrFscee2xMmDAhZ33ChAnRqlWr6N27dyxdujSOPPLIeOKJJ2LGjBlxxBFHRJ8+fWLevHnr+U95TfPnz49DDz009ttvv5g2bVr86U9/io8//jhOOOGEDT4nAJtYArCZ6d+/f3LsscdmX//tb39LmjVrlpxwwglJkiTJiBEjkgYNGiQLFy7MfuYvf/lLst122yXLly/POde3vvWtZNy4cUmSJEmXLl2Sc845J+f9Aw88MNl3333Xeu0lS5YkJSUlyR133LHWOufOnZtERDJjxoyc9Z122imZNGlSztpPf/rTpEuXLkmSJMm4ceOSpk2bJsuWLcu+P3bs2LWeK+2xxx5LMplMMmfOnCRJkqSysjJp165dMmzYsHX+zJ577pmMHj06+3rnnXdObr755nXW/9lnnyURkTz11FNJkiTJVVddlfTq1SvnnO+//34SEcmbb765zusCUDgSBGCz9Oijj8a2224bW2+9dXTp0iW6desWo0ePzr6/8847R4sWLbKvp0+fHkuXLo1mzZrFtttumz3mzp0bc+bMiYiI119/Pbp06ZJznf98nfb6669HRUVFHHbYYetd9yeffBLvv/9+DBw4MKeOa6+9NqeOfffdN7bZZpv1quPfevXqFd/4xjeyKcKTTz4Z7777bpx55pkRUZVMXHbZZbHnnnvG9ttvH9tuu2288cYbG5UgTJ8+PZ566qmc32X33XePiMj+PgAUl/qFLgBgU+jRo0eMHTs2GjRoEGVlZdGgQYOc9xs3bpzzurKyMtq0aZNz7/y/bejQcaNGjWr8M5WVlRFRdZvRgQcemPNevXr1IiIiSZINqmerrbaKM844IyZOnBhXX311TJgwIbp16xa77rprRERceuml8fjjj8fPf/7z2GWXXaJRo0bxwx/+MFasWLHO8/1nPf858F1ZWRl9+vSJG2+8cY2fb9OmzQb9HgBsWhoEYLPUuHHj2GWXXdb78x07dowFCxZE/fr1o127dmv9zB577BEvvPBCnH766dm1F154YZ3n3HXXXaNRo0bxl7/8Za2PGG3YsGFERKxevTq71qpVq9hxxx3jnXfeiVNPPXWt591zzz3j7rvvji+//DLbhHxVHWlnnnlmXHvttfHAAw/EAw88ELfddlv2vWeffTbOOOOMOO644yIiYunSpfHuu++u81z/TmDmz58fHTp0iIhY45GtHTt2jPvvvz/atWsX9ev7Tw5AXeAWI4CI6NmzZ3Tp0iX69u0bjz/+eLz77rvx/PPPx5VXXhnTpk2LiIjBgwfH+PHjY/z48TF79uwYMWJE/OMf/1jnObfeeuu4/PLL47LLLou77ror5syZEy+88EL8+te/joiIli1bRqNGjbKDu4sXL46IqqcslZeXxy233BKzZ8+Ov//97zFhwoS46aabIiLilFNOia222ioGDhwYs2bNij/+8Y/x85//fL1+z/bt28f3vve9+PGPfxwNGjSIH/7wh9n3dtlll3jggQdi5syZ8corr8Qpp5ySTTTWplGjRvHd7343brjhhpg1a1Y888wzceWVV+Z8ZtCgQfHpp5/GySefHC+++GK888478ec//zkGDBiQ0xgBUDw0CAARkclk4o9//GN069YtBgwYEN/+9rfjpJNOinfffTf71KETTzwxfvKTn8Tll18enTp1ivfeey/OPffcrzzvVVddFRdffHH85Cc/iT322CNOPPHEWLhwYURE1K9fP/77v/87xo0bF2VlZXHsscdGRMRZZ50Vv/rVr2LixImx9957x6GHHhoTJ07MPhZ12223jT/84Q8xa9as6NChQwwfPnytt/Csy8CBA+Ozzz6Lk046KWeO4eabb44ddtghDjrooOjTp08cccQR0bFjx6881/jx42PlypXRuXPnGDx4cFx77bU575eVlcVzzz0Xq1evjiOOOCL22muvGDx4cJSWlmZvUQKguGSSDb2ZFQAA2Oz46xsAACBLgwAAAGRpEAAAgCwNAgAAkKVBAAAAsjQIAABAlgYBAADI0iAAAABZGgQAACBLgwAAAGRpEAAAgCwNAgAAkPX/A9SU+YpTe16CAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%matplotlib inline \n", + "import matplotlib.pyplot as plt\n", + "import seaborn as sns\n", + "plt.figure(figsize = (10,7))\n", + "sns.heatmap(clfx, annot = True)\n", + "plt.xlabel(\"Predicted Value\")\n", + "plt.ylabel(\"True Value\")\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4e610386", + "metadata": {}, + "outputs": [], + "source": [ + "From the confusion matrix, it can be seen that the model built predicted the values for 'setosa' correctly, predicted the values\n", + "for 'versicolor' correctly also, but predicted 14 values for 'virginica' correctly and 2 values for 'virginica' wrongly. It confused \n", + "it for 'versicolor'." + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "e5679084", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['DESCR',\n", + " 'data',\n", + " 'data_filename',\n", + " 'data_module',\n", + " 'feature_names',\n", + " 'frame',\n", + " 'target',\n", + " 'target_filename']" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "diabetes = datasets.load_diabetes()\n", + "dir(diabetes)" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "id": "d6cd8827", + "metadata": {}, + "outputs": [], + "source": [ + "X = diabetes.data\n", + "y = diabetes.target" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "id": "19a23fca", + "metadata": {}, + "outputs": [], + "source": [ + "from sklearn.model_selection import train_test_split\n", + "X_train, X_test, y_train, y_test = train_test_split(X,y, test_size = 0.3)" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "b007be23", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
RandomForestClassifier(n_estimators=30)
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.
" + ], + "text/plain": [ + "RandomForestClassifier(n_estimators=30)" + ] + }, + "execution_count": 37, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "diab_model = RandomForestClassifier(n_estimators= 30)\n", + "diab_model.fit(X_train, y_train)" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "22683910", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.0" + ] + }, + "execution_count": 39, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "diab_model.score(X_test, y_test)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "9eed31da", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['age', 'sex', 'bmi', 'bp', 's1', 's2', 's3', 's4', 's5', 's6']" + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "diabetes.feature_names" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "id": "539dc1a3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
RandomForestRegressor()
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.
" + ], + "text/plain": [ + "RandomForestRegressor()" + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from sklearn.ensemble import RandomForestRegressor\n", + "model2 = RandomForestRegressor(n_estimators= 100)\n", + "model2.fit(X_train, y_train)" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "id": "ae5a552c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.3072018707051737" + ] + }, + "execution_count": 45, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "model2.score(X_test, y_test)" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "id": "09fb4676", + "metadata": {}, + "outputs": [ + { + "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", + "
0123456789
00.0380760.0506800.0616960.021872-0.044223-0.034821-0.043401-0.0025920.019907-0.017646
1-0.001882-0.044642-0.051474-0.026328-0.008449-0.0191630.074412-0.039493-0.068332-0.092204
20.0852990.0506800.044451-0.005670-0.045599-0.034194-0.032356-0.0025920.002861-0.025930
3-0.089063-0.044642-0.011595-0.0366560.0121910.024991-0.0360380.0343090.022688-0.009362
40.005383-0.044642-0.0363850.0218720.0039350.0155960.008142-0.002592-0.031988-0.046641
\n", + "
" + ], + "text/plain": [ + " 0 1 2 3 4 5 6 \\\n", + "0 0.038076 0.050680 0.061696 0.021872 -0.044223 -0.034821 -0.043401 \n", + "1 -0.001882 -0.044642 -0.051474 -0.026328 -0.008449 -0.019163 0.074412 \n", + "2 0.085299 0.050680 0.044451 -0.005670 -0.045599 -0.034194 -0.032356 \n", + "3 -0.089063 -0.044642 -0.011595 -0.036656 0.012191 0.024991 -0.036038 \n", + "4 0.005383 -0.044642 -0.036385 0.021872 0.003935 0.015596 0.008142 \n", + "\n", + " 7 8 9 \n", + "0 -0.002592 0.019907 -0.017646 \n", + "1 -0.039493 -0.068332 -0.092204 \n", + "2 -0.002592 0.002861 -0.025930 \n", + "3 0.034309 0.022688 -0.009362 \n", + "4 -0.002592 -0.031988 -0.046641 " + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = pd.DataFrame(diabetes.data)\n", + "df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "760f6747", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}