Spotle.
ai Study Material
Spotle.ai/Learn
Python Environment Setup
Installing
Python (3.7.2)
Python libraries
PyCharm (Community Edition)
Jupyter
Steps to install Python
• Download Python from https://www.python.org/downloads/.
• Run the installer to install Python in your computer.
• Open terminal or command prompt.
• Type ‘python3’. Press enter to check if Python is installed in your computer.
• You may have to add installation directory to PATH variable, if you see error.
Spotle.ai Study Material
Spotle.ai/Learn
Steps to install PyCharm
• Download PyCharm from https://www.jetbrains.com/pycharm/download/
• Download Community edition and run the installer.
Spotle.ai Study Material
Spotle.ai/Learn
Steps to install Jupyter notebook
Installing Jupyter notebook from terminal.
• Run the following command in terminal (or command prompt) to install
Jupyter.
(sudo) pip3 install jupyter
Spotle.ai Study Material
Spotle.ai/Learn
Install NumPy
Command to install NumPy: pip3 install –U numpy
NumPy is the fundamental package for scientific computing with Python. It
contains among other things:
• a powerful N-dimensional array object
• sophisticated functions
• tools for integrating C/C++ and Fortran code
• useful linear algebra, Fourier transform, and random number capabilities
Besides its obvious scientific uses, NumPy can also be used as an efficient
multi-dimensional container of generic data. Arbitrary data-types can be
defined. This allows NumPy to seamlessly and speedily integrate with a
wide variety of databases.
Spotle.ai Study Material
Spotle.ai/Learn
Install Pandas
Command to install Pandas: pip3 install -U pandas
Pandas is an open source, library providing high-performance, easy-to-use data
structures and data analysis tools for the python programming language. Python
with Pandas is used in a wide range of domain finance, economics, statistics,
analytics, etc.
Some key features of pandas include the following:
• It can process a variety of data sets in different formats: time series, tabular
heterogeneous, and matrix data.
• It facilitates loading/importing data from varied sources such as CSV and
DB/SQL.
• It can handle a myriad of operations on data sets: sub-setting, slicing,
filtering, merging, group-by, re-ordering, and re-shaping.
• It can deal with missing data according to rules defined by the user/
developer: ignore, convert to 0, and so on.
• It can be used for parsing and munging (conversion) of data as well as
modelling and statistical analysis.
Spotle.ai Study Material
Spotle.ai/Learn
Install Matplotlib
Command to install Matplotlib: pip3 install -U matplotlib
Matplotlib is a standard Python library used by every data scientist for
creating 2D plots and graphs. It’s pretty low-level, meaning it requires more
commands to generate nice-looking graphs and figures and you can make
any kind of graph you want with Matplotlib. You can build diverse charts, from
histograms and scatterplots to non-Cartesian coordinates graphs.
Spotle.ai Study Material
Spotle.ai/Learn
Install scikit-learn
Command to install scikit-learn: pip3 install -U scikit-learn
This is one the most basic and popular ML libraries. It supports many
supervised and unsupervised learning algorithms. Examples include
linear and logistic regressions, decision trees, clustering, k-means and so
on.
It adds a set of algorithms for common machine learning and data mining
tasks, including clustering, regression and classification. Even tasks like
transforming data, feature selection and ensemble methods can be
implemented in a few lines.
Spotle.ai Study Material
Spotle.ai/Learn
Install TensorFlow
Command to install TensorFlow: pip3 install -U tensorflow (tensorflow-gpu)
If you are in the world of machine learning, you have probably heard about,
tried or implemented some form of deep learning algorithm. One intersting
point about Tensorflow is that when you write a program in Python, you can
compile and run on either your CPU or GPU. So we don’t have to write at the
C++ or CUDA level to run on GPUs.
It uses a system of multi-layered nodes that allows you to quickly set up, train,
and deploy artificial neural networks with large datasets.
This is what allows Google to identify objects in photos or understand spoken
words in its voice-recognition app.
Spotle.ai Study Material
Spotle.ai/Learn
Install Keras
Command to install Keras: pip3 install -U keras
Keras is a high-level neural networks API, written in Python and capable of
running on top of TensorFlow and some other machine learning library
Use Keras whenever we need a deep learning library that:
• Allows for easy and fast prototyping.
• Supports both convolutional networks and recurrent networks, as well as
combinations of the two.
• Runs seamlessly on CPU and GPU.
Spotle.ai Study Material
Spotle.ai/Learn
Few charts from gallery
Spotle.ai Study Material
Spotle.ai/Learn