JNTUA Python Programming & Data Science - PPT Notes - R20
JNTUA Python Programming & Data Science - PPT Notes - R20
me/jntua
Python
Python Language
Python is a high level interpreted, interactive,
and object-oriented programming language
created by Guido Rossum in 1989.
Python Language
Python is one of the scripting languages which
were ideally, designed for prototyping of
complex applications.
Python Language
Introduction to Python
For anyone serious about pursuing and growing in a career in IT, a basic question that roils
the mind is this: which is the best programming language to learn? Most people who want
answers to this question tend to get slightly confused, because they would have heard
about multiple languages, such as Java, Python, PHP, etc. It is in selecting that one truly apt
programming language to learn that the challenge lies.
Even learners who are fully aware of the benefits of most programming languages are in a
fix about choosing the one language they should learn, and also about the best ways to
learn a programming language.
It is very important for the students to make the right choice from the start as it will take a
lot of time and effort to master any given programming language. While selecting any
programming language to learn, students need to consider few aspects such as:
• The difficulty level of a programming language you are willing to learn
• The skills you already know that align with a programming language
• Reasons you want to learn a programming language.
Every programming language has its advantages as well as disadvantages. A language that
is perfectly suited for developing a certain types of applications might not fit for
developing other types.
So, keeping the debate aside of which programming language is good to learn among all,
here in the following discussion we will focus towards understanding what is Python
programming language and what are its benefits. At a later stage of this blog, we will
discuss different reasons to learn Python.
In the upcoming discussion we will focus on the following topics:
• What is Python?
• Python 2 VS Python 3
• History of Python
• Features of Python
• Reasons to learn Python in 2020
• Advantages of Python
• Applications of Python.
What is Python? This is one of the most asked questions these days in the technology space.
The answer is, Python is one of the powerful programming languages that is high-level, open-
source, and most commonly used for web development, scientific and mathematical
application development, etc.
One of the great advantages of this programming language is it provides excellent library
support and has a large developer community. It also provides easy integration with web
services and GUI-based desktop applications.
“Did You Know? Python is one of the 9 programming languages that influenced
the design of JavaScript”.
Python is fast, easy-to-use and the most preferred programming language for developing
projects by many companies such as YouTube, Instagram, Pinterest, and Quora, etc. Because
of its excellent features, Python is considered an easy to learn programming language for
beginners and is also sophisticated enough for experienced professionals to use.
Apart from web development and desktop app development, Python is extensively used in
the Data Science field and is used for developing Machine Learning projects. Because of
its huge popularity, many IT professionals are learning this programming language to build
their career as a Python developer.
Having understood what is Python, let us start exploring the different versions of Python,
such as Python 2 and Python 3. Later we will look at the major differences between them.
Python 2: Python 2 has been the more popular version. This version released in the year
2000 and made the code development process very easy compared to its earlier versions.
Python 2 is a more transparent and inclusive language development process than its earlier
versions.
Python 2 has implemented technical details of Python Enhancement Proposal (PEP). Python
2.7 or Python 2.7.20 is the last version of Python 2 and is no longer under development and
in the year 2020, it will be discontinued.
Different versions of Python and their release dates are as follows:
• Python 2.0 – October 16, 2000
• Python 2.1 – April 17, 2001
• Python 2.2 – December 21, 2001
• Python 2.3 – July 29, 2003
• Python 2.4 – November 30, 2004
• Python 2.5 – November 19, 2006
• Python 2.6 – October 1, 2008
• Python 2.7 – July 3, 2010
CLASSIFICATION
LINEAR CLASSIFICATION
Naive Bayes:
• It is based on the Bayes Theorem and lies in the domain of Supervised Machine Learning.
• Every feature is considered equal and independent of the others during Classification.
• Naive Bayes indicates the likelihood of occurrence of an event. It is also known as conditional probability.
(ii) Feature Importance - All features are equally important. It is essential to know all the
features to make good predictions and get the most accurate results.
→ The model builds a regression model to predict the probability of a given data entry.
→ Similar to linear regression, logistic regression uses a linear function and, in addition, makes use of the 'sigmoid'
function.
Non-Linear Classification:
→ Non-Linear Classification refers to categorizing those instances that are not linearly
separable.
Hyperparameter
Hyperparameters are the tunable parameters adjusted before running the
training process. These parameters directly affect model performance and help
you achieve faster global minima.
. GridSearch
1
2. RandomSearch
3. Successive Halving
4. Bayesian Optimizers
5. Manual Search
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntua
www.android.universityupdates.in | www.universityupdates.in | https://telegram.me/jntua
Machine Translation:
Given an input in one language, RNNs can be used to translate the input into different languages as output.
Loss function
Loss functions are used to estimate and understand how well a
particular algorithm performs.
The loss function is the function that computes the distance
between the current output of the algorithm and the expected
output.
It’s a method to evaluate how your algorithm models the data. It
can be categorized into two groups. One
for classification (discrete values, 0,1,2…) and the other
for regression (continuous values).
The most common losses used in Machine learning and Deep
learning is:
Categorical Crossentropy
Binary Crossentropy
Mean Absolute Error
Mean Squared Error
The LSTM networks are popular nowadays. The LSTM network are called
cells and these cells take the input from the previous state ht-1 and current
input xt. The main function of the cells is to decide what to keep in mind and
what to omit from the memory. The past state, the current memory and the
present input work together to predict the next output
Sigmoid
Forget Gate
Input Gate
Cell State
Output Gate