Machine Learning With Python-Python EcoSystem
Machine Learning With Python-Python EcoSystem
Python EcoSystem
With the help of following steps, we can install Python on Windows platform:
· First, go to https://www.python.org/downloads/.
· Next, click on the link for Windows installer python-XYZ.msi file.
Here XYZ is the version we wish to install.
· Now, we must run the file that is downloaded. It will take us to the
Python install wizard, which is easy to use. Now, accept the default
settings and wait until the install is finished.
Step1: First, we need to download the required installation package from Anaconda distribution. The link for
the same is https://www.anaconda.com/distribution/. You can choose from Windows, Mac and Linux OS as per
your requirement.
Step2: Next, select the Python version you want to install on your machine. The latest Python version is 3.7.
There you will get the options for 64-bit and 32-bit Graphical installer both.
Step3: After selecting the OS and Python version, it will download the Anaconda installer on your computer.
Now, double click the file and the installer will install Anaconda package.
Step4: For checking whether it is installed or not, open a command prompt and type Python as follows:
Jupyter Notebook
Jupyter notebooks basically provides an interactive computational environment for developing
Python based Data Science applications. They are formerly known as ipython notebooks. The
following are some of the features of Jupyter notebooks that makes it one of the best
components of Python ML ecosystem:
· Jupyter notebooks can illustrate the analysis process step by step by arranging the stuff like
code, images, text, output etc. in a step by step manner.
· It helps a data scientist to document the thought process while developing the analysis
process.
· One can also capture the result as the part of the notebook.
· With the help of jupyter notebooks, we can share our work with a peer also.
After pressing enter, it will start a notebook server at localhost:8888 of your computer. It is
shown in the following screen shot:
Code cells: As the name suggests, we can use these cells to write code. After writing the
code/content, it will send it to the kernel that is associated with the notebook.
Markdown cells: We can use these cells for notating the computation process. They can
contain the stuff like text, images, Latex equations, HTML tags etc.
Raw cells: The text written in them is displayed as it is. These cells are basically used to add
the text that we do not wish to be converted by the automatic conversion mechanism of
jupyter notebook.
If you are using Anaconda distribution, then no need to install NumPy separately as it is already installed with it. You
just need to import the package into your Python script with the help of following:
On the other hand, if you are using standard Python distribution then NumPy can be
installed using popular python package installer, pip.
After installing NumPy, you can import it into your Python script as you did above.
1 5 10 15 24 25 28 36 40 89
Aarav 1 15 Male
Harshit 2 14 Male
Kanika 3 16 Female
Mayank 4 15 Male
We can understand these data structures as the higher dimensional data structure
is the container of lower dimensional data structure.
On the other hand, if you are using standard Python distribution then Pandas can be
installed using popular python package installer, pip.
pip install Pandas
After installing Pandas, you can import it into your Python script as did above.
Example
In [4]: s= pd.Series(data)
In [5]: print(s)
0 g
1 a
2 u
3 r
4 a
5 v
dtype: object
· It is an open source and can be reused under Berkeley Software Distribution (BSD) license.
· Wide range of machine learning algorithms covering major areas of ML like classification,
clustering, regression, dimensionality reduction, model selection etc. can be implemented with
the help of it.
On the other hand, if you are using standard Python distribution and having
NumPy and
SciPy then Scikit-learn can be installed using popular python package installer,
pip.
After installing Scikit-learn, you can use it into your Python script as you have
done above.