Learn practical skills, build real-world projects, and advance your career
!pip install jovian --upgrade --quiet
!pip install numpy
!pip install sklearn
!pip install statsmodels
Requirement already satisfied: numpy in /srv/conda/envs/notebook/lib/python3.7/site-packages (1.19.2) Requirement already satisfied: sklearn in /srv/conda/envs/notebook/lib/python3.7/site-packages (0.0) Requirement already satisfied: scikit-learn in /srv/conda/envs/notebook/lib/python3.7/site-packages (from sklearn) (0.23.2) Requirement already satisfied: threadpoolctl>=2.0.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from scikit-learn->sklearn) (2.1.0) Requirement already satisfied: scipy>=0.19.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from scikit-learn->sklearn) (1.5.2) Requirement already satisfied: numpy>=1.13.3 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from scikit-learn->sklearn) (1.19.2) Requirement already satisfied: joblib>=0.11 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from scikit-learn->sklearn) (0.17.0) Collecting statsmodels Downloading https://files.pythonhosted.org/packages/ff/68/ca52fc6a114141f13dfaee340fc355e2825753f1cbe3702a13a5046e16de/statsmodels-0.12.0-cp37-cp37m-manylinux1_x86_64.whl (9.5MB) |████████████████████████████████| 9.5MB 3.3MB/s eta 0:00:01 Requirement already satisfied: numpy>=1.15 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from statsmodels) (1.19.2) Collecting pandas>=0.21 (from statsmodels) Downloading https://files.pythonhosted.org/packages/25/47/22fc373440e144e2111363adaa07abb09ec1f03fbc071b6d9fc0bbf65f68/pandas-1.1.3-cp37-cp37m-manylinux1_x86_64.whl (9.5MB) |████████████████████████████████| 9.5MB 45.7MB/s eta 0:00:01 Requirement already satisfied: scipy>=1.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from statsmodels) (1.5.2) Collecting patsy>=0.5 (from statsmodels) Downloading https://files.pythonhosted.org/packages/ea/0c/5f61f1a3d4385d6bf83b83ea495068857ff8dfb89e74824c6e9eb63286d8/patsy-0.5.1-py2.py3-none-any.whl (231kB) |████████████████████████████████| 235kB 41.1MB/s eta 0:00:01 Collecting pytz>=2017.2 (from pandas>=0.21->statsmodels) Downloading https://files.pythonhosted.org/packages/4f/a4/879454d49688e2fad93e59d7d4efda580b783c745fd2ec2a3adf87b0808d/pytz-2020.1-py2.py3-none-any.whl (510kB) |████████████████████████████████| 512kB 38.2MB/s eta 0:00:01 Requirement already satisfied: python-dateutil>=2.7.3 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from pandas>=0.21->statsmodels) (2.8.0) Requirement already satisfied: six in /srv/conda/envs/notebook/lib/python3.7/site-packages (from patsy>=0.5->statsmodels) (1.12.0) Installing collected packages: pytz, pandas, patsy, statsmodels Successfully installed pandas-1.1.3 patsy-0.5.1 pytz-2020.1 statsmodels-0.12.0
import jovian
import numpy as np
jovian.commit()
[jovian] Attempting to save notebook.. [jovian] Please enter your API key ( from https://jovian.ml/ ): API KEY: ········ [jovian] Updating notebook "tiwari12-rst/metrices-part1" on https://jovian.ml/ [jovian] Uploading notebook.. [jovian] Capturing environment.. [jovian] Committed successfully! https://jovian.ml/tiwari12-rst/metrices-part1

Creating variable

These are just dummy variable for showing how the metrices work. In later article we will be working with the predicted values

Y_actual = [1, 1, 0, 1, 0, 0, 1, 0, 0, 0,0,1,2,3]
Y_predic = [1, 0, 1, 1, 1, 0, 1, 1, 0, 0,3,4,5,0]