SAIFULLA
SAIFULLA
SAIFULLA
A report submitted in partial fulfilment of the requirements for the Award of Degree of
BACHELOR OF TECHNOLOGY
in
SAIFULLA
Regd.No.: 20781A04F0
Under Supervision of
(05/07/2022 to 31/08/2022)
CERTIFICATE
This is to certify that the “Internship report” submitted by S.SAIFULLA
(Regd.No.:20781A04F0) is work done by him/her and submitted during 2021- 2022 academic
year, in partial ful fillment of the requirements for the award of the degree of BACHELOR OF
I wish to record my deep sense of gratitude and profound thanks to our beloved
Vice Chairman, Sri R.V.Srinivas for his valuable support throughout the course.
I express our sincere thanks to Dr.M.MOHAN BABU, our beloved principal for his
encouragement and suggestion during the course of study.
I express our sincere thanks to the internship coordinator, for her keen interest, stimulating
guidance, constant encouragement with our work during all stages, to bring this report into
fruition.
I wish to convey my gratitude and sincere thanks to all members for their support and
cooperation rendered for successful submission of report.
Finally, I would like to express my sincere thanks to all teaching, non-teaching faculty
members, our parents, friends and for all those who havesupported us to complete the internship
successfully.
V
MACHINE LEARNING WITH PYTHON
ABSTRACT
TABLE CONTENT
CHAPTER-1
INTRODUCTION 4-5
CHAPTER-2
2.DOWNLOADING PYTHON…………………………………………. 6
2.1INSTALLING PYTHON………………………………………………… 7
CHAPTER-3
3.1DATA TYPES………………………………………………………….. 12
SVCET(CHITTOOR) 2
MACHINE LEARNING WITH PYTHON
5.2 CONDITION STATEMENT… ................................................................... 22-23
5.3 FUNCTION ..................................................................................................... 23
MACHINE LEARNING
6 Introduction ............................................... 24-25
6.1 TASTE OF MACHINE LEARNING ........................................................ 24-25
6..2 FUTURE OF MACHINE LEARNING ....................................................... 25
SVCET(CHITTOOR) 3
MACHINE LEARNING WITH PYTHON
List of Tables
S.NO Name of the Table Page No
6 Loop types 20
List of figures
S.NO Name of Figure Page
No
1 Downloading python 6
2 Installing python 7-10
3 Running python IDE 10,11
4 Machine learning 24
5 Time optimization 25
6 Byte marks 26
7 Comparision circles 27
8 Machine learning uses 29
9 Techniques of machine learning 31
SVCET(CHITTOOR) 4
MACHINE LEARNING WITH PYTHON
Chapter-1
introduction
Python is a widely used high-level, general-purpose, interpreted, dynamic
programming
language. Its design philosophy emphasizes code readability, and its syntax allows
programmers to express concepts in fewer lines of code than would be possible in
languages such as C++ or Java. The language provides constructs intended to enable
clear programs on both a small and large scale.
Scripting Language
A scripting or script language is a programming language that supports scripts,
programs written for a special run-time environment that automate the execution of
tasks that could alternatively be executed one-by-one by a human operator.
Scripting languages are often interpreted (rather than compiled). Primitives are
usually the elementary tasks or API calls, and the language allows them to be
combined into more
complex programs. Environments that can be automated through scripting include
software applications, web pages within a web browser, the shells of operating
systems
SVCET(CHITTOOR) 5
MACHINE LEARNING WITH PYTHON
procedures can access and often modify the data fields of the object with which they are associated
(objects have a notion of "this" or "self").
History
Python was conceived in the late 1980s, and its implementation was started in
December
1989 by Guido van Rossum at CWI in the Netherlands as a successor to the ABC
language (itself inspired by SETL) capable of exception handling and interfacing
with the
Amoeba operating system. Van Rossum is Python's principal author, and his
continuing central role in deciding the direction of Python is reflected in the title
given to him by the
Python community, benevolent dictator for life (BDFL).
SVCET(CHITTOOR) 6
MACHINE LEARNING WITH PYTHON
Chapter-2
Over six years ago, in December 1989, I was looking for a "hobby" programming project that
would keep me occupied during the week around Christmas. My office ... would be closed,
but I had a home Computer, and not much else on my hands. I decided to write an interpreter
forthe new scripting language I had been thinking about lately: a descendant of ABC that
would appeal to Unix/C hackers. I chose Python as a working title for the project, being n a
slightlyirreverent mood (and a big fan of Monty Python's Flying Circus).
Now that you are on the download page, select which of the software builds you would like
to download. For the purposes of this article we will use the most up to date version
available (Python 3.4.1).
Once you have clicked on that, you will be taken to a page with a description of all the new
updates and features of 3.4.1, however, you can always read that while the download is in
process. Scroll to the bottom of the page till you find the “Download” section and click on
the link that says “download page.”
SVCET(CHITTOOR) 7
MACHINE LEARNING WITH PYTHON
Now you will scroll all the way to the bottom of the page and find the
“Windows x86 MSI installer.” If you want to download the 86-64 bit MSI, feel
free to do so. We believe that even if you have a 64-bit operating system installed
on your computer, the 86-bit MSI is preferable. We say this because it will still run
well and sometimes, with the 64bit architectures, some of the compiled binaries
and Python libraries don’t work well.
If you are the only person who uses your computer, simply leave the “Install for all
users” option selected. If you have multiple accounts on your PC and don’t want to
install it across all accounts, select the “Install just for me” option then press “Next.”
SVCET(CHITTOOR) 8
MACHINE LEARNING WITH PYTHON
if you want to change the install location, feel free to do so; however, it is best to
Scroll down in the window and find the “Add Python.exe to Path” and click on the
small red “x.” Choose the “Will be installed on local hard drive” option then press
“Next.”
SVCET(CHITTOOR) 9
MACHINE LEARNING WITH PYTHON
Once you have the “Environment Variables” window open, direct your focus to the
bottom half. You will notice that it controls all the “System Variables” rather than
just this associated with your user. Click on “New…” to create a new variable for
Python.
Simply enter a name for your Path and the code shown below. For the purposes of
this example we have installed Python 2.7.3, so we will call the path:
“Python path.” The string that you will need to enter is:
“C:\Python27\;C:\Python27\Scripts;”
SVCET(CHITTOOR) 10
MACHINE LEARNING WITH PYTHON
Once the GUI is open, we will begin by using the simplest directive possible. This is
the “print” directive which simply prints whatever you tell it to, into a new line. Start
by typing a print directive like the one shown in the image below or copy and paste
this text then press
SVCET(CHITTOOR) 11
MACHINE LEARNING WITH PYTHON
SVCET(CHITTOOR) 12
MACHINE LEARNING WITH PYTHON
Chapter-3
DATA TYPES & OPERATORS
3.1 Data types
(this is called dynamic typing). Data types determine whether an object can do
something, or whether it just would not make sense. Other programming languages
often determine whether an operation makes sense for an object by making sure the
object can never be stored somewhere where the operation will be performed on the
object (this type system is called static typing). Python does not do that. Instead it
stores the type of an object with the object, and checks when the operation is
performed whether that operation makes sense for that object Python has many
native data types. Here are the important ones:
3.2 Variables
Variables are nothing but reserved memory locations to store values. This means that
when you create a variable you reserve some space in memory. Based on the data
type of a variable, the interpreter allocates memory and decides what can be stored in
the reserved memory. Therefore, by assigning different data types to variables, you
can store integers, decimals or characters in these variables. Ex: counter = 100
# An integer assignment miles = 1000.0 # A floating point name =
"John" # A string
Multiple Assignment
Python allows you to assign a single value to several variables simultaneously. For example −
a=b=c=1
Here, an integer object is created with the value 1, and all three variables are assigned to the
same memory location. You can also assign multiple objects to multiple variables.
For example −
a,b,c = 1,2,"john"
Here, two integer objects with values 1 and 2 are assigned to variables a and b respectively, and one
string object with the value "john" is assigned to the variable c.
SVCET(CHITTOOR) 13
MACHINE LEARNING WITH PYTHON
• Numbers
• String
• List
• Tuple Dictionary
Python Numbers
Number data types store numeric values. Number objects are created when you assign a value
to them. For example −
var1 = 1 var2
= 10
You can also delete the reference to a number object by using the del statement. The syntax of
the del statement is −
del var1[,var2[,var3[. .. ,varN]]]]
You can delete a single object or multiple objects by using the del statement. For example −
del var del var_a,
var_b
Python supports four different numerical types −
Int
SVCET(CHITTOOR) 14
MACHINE LEARNING WITH PYTHON
3.3Python operators
Arithmetic Operators
SVCET(CHITTOOR) 15
MACHINE LEARNING WITH PYTHON
Comparison Operator
SVCET(CHITTOOR) 16
MACHINE LEARNING WITH PYTHON
Chapter-4
Tuples &list
4.1 Tuples
A tuple is a sequence of immutable Python objects. Tuples are sequences, just like
lists. The differences between tuples and lists are, the tuples cannot be changed
unlike lists and tuples use parentheses.
Accessing Values in Tuples:
To access values in tuple, use the square brackets for slicing along with the index or
indices to obtain value available at that index. For example − tup1 = ('physics',
'chemistry', 1997,
2000); tup2 = (1, 2, 3, 4, 5, 6, 7 ); print "tup1[0]: ", tup1[0] print "tup2[1:5]: ",
tup2[1:5]
When the above code is executed, it produces the following result − tup1[0]: physics
tup2[1:5]: [2, 3, 4, 5]
SVCET(CHITTOOR) 17
MACHINE LEARNING WITH PYTHON
LISTS
4.2 List
The list is a most versatile datatype available in Python which can be written as a list
of commaseparated values (items) between square brackets. Important thing about a
list is that items in a list need not be of the same type.
SVCET(CHITTOOR) 18
MACHINE LEARNING WITH PYTHON
SVCET(CHITTOOR) 19
MACHINE LEARNING WITH PYTHON
SVCET(CHITTOOR) 20
MACHINE LEARNING WITH PYTHON
Chapter-5
Loops& conditional statements
Loop Example:
For Loop:
>>> for mynum in [1, 2, 3, 4, 5]:
SVCET(CHITTOOR) 21
MACHINE LEARNING WITH PYTHON
SVCET(CHITTOOR) 22
MACHINE LEARNING WITH PYTHON
Example:
If
Statement: a=33 b=200
If b>a: print(“b”)
If...Else
SVCET(CHITTOOR) 23
MACHINE LEARNING WITH PYTHON
5.3 Function
Function blocks begin with the keyword def followed by the function name and
parentheses( ( )
).
Any input parameters or arguments should be placed within these parentheses. You
can also define parameters inside these parentheses.
The first statement of a function can be an optional statement - the documentation
string of the function.
The code block within every function starts with a colon (:) and is indented.
Syntex:
Def function name(parameters):
“function_doc string”
Function _suite
Return[expression] Def
printme(str):
“this print a passed string into this function” print
str return
1. # Function definition is here def printme( str
):
"This prints a passed string into this function" print str
return;
SVCET(CHITTOOR) 24
MACHINE LEARNING WITH PYTHON
Machine Learning
6. Introduction
6.1.A Taste of Machine Learning
✓ Over the past two decades Machine Learning has become one of the
mainstays of information technology.
• Data mining uses many machine learning methods, but with different goals;
on the other hand, machine learning also employs data mining methods as
"unsupervised learning" or as a preprocessing step to improve learner
accuracy.
1.3. Relation to Optimization
SVCET(CHITTOOR) 25
MACHINE LEARNING WITH PYTHON
Machine learning also has intimate ties to optimization: many learning problems are formulated
as minimization of some loss function on a training set of examples.
Loss functions express the discrepancy between the predictions of the model being trained and
the actual problem instances
• Machine Learning revolution will stay with us for long and so will be the future of
Machine Learning.
SVCET(CHITTOOR) 26
MACHINE LEARNING WITH PYTHON
Chapter-7
Technology Learnt
• Data Economy
• World is witnessing real time flow of all types structured and unstructured data from social media,
communication, transportation, sensors, and devices.
• International Data Corporation (IDC) forecasts that 180 zettabytes of data will be generated by
2025.
• This explosion of data has given rise to a new economy known as the Data Economy.
• Data is the new oil that is precious but useful only when cleaned and processed.
• There is a constant battle for ownership of data between enterprises to derive benefits from it.
SVCET(CHITTOOR) 27
MACHINE LEARNING WITH PYTHON
Machine Learning is an approach or subset of Artificial Intelligence that is based on the idea that machines
can be given access to data along with the ability to learn from it.
SVCET(CHITTOOR) 28
MACHINE LEARNING WITH PYTHON
• It involves repetitive training to improve the learning and decision making of algorithms.
• As more data gets added, Machine Learning training can be automated for learning new data
patterns and adapting its algorithm.
7.3. Machine Learning Algorithms
Traditional Programming vs. Machine Learning Approach
•
SVCET(CHITTOOR) 28
• Image Processing
• Self-driving cars
• Robotics
• Industrial robotics
• Human simulation
• Data Mining
• Association rules
• Anomaly detection
• Video games
• Pokémon
SVCET(CHITTOOR) 30
MACHINE LEARNING WITH PYTHON
• PUBG
• Text Analysis
Spam Filtering
• Information Extraction
• Sentiment Analysis
• Healthcare
• Research
SVCET(CHITTOOR) 31
MACHINE LEARNING WITH PYTHON
Chapter-8
In supervised learning, each example is a pair consisting of an input object (typically a vector) and a
desired output value (also called the supervisory signal).
Feature Engineering
Reserve 80% of data for Training (Train_X) and 20% for Evaluation (Train_E)
• Training Step
If accuracy score is high, you have the final learned algorithm y = f(x) If
accuracy score is low, go back to training step
• Production Deployment
Use the learned algorithm y = f(x) to predict production data.
The algorithm can be improved by more training data, capacity, or algo redesign.
• If the learning is poor, we have an underfitted situation. The algorithm will not
work well on test data. Retraining may be needed to find a better fit.
SVCET(CHITTOOR) 33
MACHINE LEARNING WITH PYTHON
• Voice Assistants
• Gmail Filters
• Weather Apps
SVCET(CHITTOOR) 34
MACHINE LEARNING WITH PYTHON
• Classification
Applied when the output has finite and discreet values Example: Social media sentiment analysis has
three potential outcomes, positive, negative, or neutral
data preprocessing
Data Preparation
• Data Preparation Process
SVCET(CHITTOOR) 35
MACHINE LEARNING WITH PYTHON
•
• Machine Learning depends largely on test data.
• A large amount of data is generally required for the most common forms of ML.
• Types of Data
• Unlabeled Data
Test Data
• Validation Data
SVCET(CHITTOOR) 36
MACHINE LEARNING WITH PYTHON
Feature Engineering refers to selecting and extracting right features from the data that are relevant to
the task and model in consideration.
• Feature Selection
Most useful and relevant features are selected from the available data
• Feature Addition
New features are created by gathering new data
• Feature Extraction
Existing features are combined to develop more useful ones
• Feature Filtering
Filter out irrelevant features to make the modelling step easy
Feature Scaling
• Define Feature Scaling
SVCET(CHITTOOR) 37
MACHINE LEARNING WITH PYTHON
• Standardization
• Standardization is a popular feature scaling method, which gives data the property
of a standard normal distribution (also known as Gaussian distribution).
• The mean of each feature is centered at zero, and the feature column has a standard
deviation of one.
SVCET(CHITTOOR) 38
MACHINE LEARNING WITH PYTHON
• Normalization
SVCET(CHITTOOR) 39
MACHINE LEARNING WITH PYTHON
• In the given equation, subtract the min value for each feature from each feature
instance and divide by the spread between max and min.
• In effect, it measures the relative percentage of distance of each instance from the
min value for that feature.
2.3.4. Datasets
• Machine Learning problems often need training or testing datasets.
• In many cases, it has input and output labels that assist in Supervised Learning.
SVCET(CHITTOOR) 40
MACHINE LEARNING WITH PYTHON
• Applications of PCA
• Noise reduction
• Compression
• Preprocess
SVCET(CHITTOOR) 41
MACHINE LEARNING WITH PYTHON
Experts have discovered multi-layered learning networks that can be leveraged for deep
learning as they learn in layers.
Scientists have figured out that high-performing graphics processing units (GPU) can be
used for deep learning.
• ML Vs Deep Learning
SVCET(CHITTOOR) 42
MACHINE LEARNING WITH PYTHON
SVCET(CHITTOOR) 43
MACHINE LEARNING WITH PYTHON
REFERANCE
https://www.simplilearn.com/
https://www.wikipedia.org/
https://towardsdatascience.com/
https://www.expertsystem.com/
https://www.coursera.org/
https://www.edureka.co/
https://subhadipml.tech/
https://www.forbes.com/
https://medium.com/
https://www.google.com/
https://www.simplilearn.com/
https://www.google.com/
https://www.wikipedia.org/
https://www.youtube.com/
https://www.edureka.co/
SVCET(CHITTOOR) 44
MACHINE LEARNING WITH PYTHON
CONCLUSION:
I am happy to complete my internship in VERZEO.
The organisation is very friendly to everyone and lecture given by the analytic team are useful.
Project work is the major task for the student .It should be done by individual.Evaluation should
be done by the instructor.
Finally,VERZEO makes the student well fit for future internships.
Best training platform for ever.
→I solemnly declare that the information given above are true and best of my knowledge.
SVCET(CHITTOOR) 45