You are on page 1of 15

ARTIFICIAL INTELLIGENCE & MACHINE LEARNING

PRACTICAL TRAINING REPORT

Submitted for the Partial Fulfillment of the Requirement of the

Degree

of

BACHELOR OF TECHNOLOGY

In

COMPUTER SCIENCE & ENGINEERING

Submitted to: Submitted By:


Prof. Santosh Gupta Ms. Aditi Jain
Training In charge (III B. Tech., V Sem.)

Department of Computer Science and Engineering


Jodhpur Institute of Engineering & Technology,
JIET Group of Institutions, Jodhpur.
Bikaner Technical University, Bikaner (Raj.)
2020-21
SELF CERTIFICATION

I Ms. Aditi Jain hereby undertake that, I have completed 50 days summer
training at Cipher Schools from 11th May 2020 to 30th June 2020.
The record of practical training is prepared by me and submitted for the
partial fulfillment of the Requirement of the degree Bachelor of
Technology in Computer Science and Engineering at Jodhpur Institute of
Engineering & Technology, Jodhpur; is a record of the undertaken by her.

Aditi Jain Countersigned:


Date : (Mamta Garg)
Place: Jodhpur (HEAD-CSE)

COMPANY CERTIFICATE
ACKNOWLEDGEMENT

I wish to express deep sense of gratitude to my guide Mr. Kanav Bansal


for his valuable guidance, constant support, and encouragement throughout
the report formation. His attitude of generating innovative solutions to
problems and making thoughts into reality through hard work are a source of
inspiration for me. His approachable nature creates a comfortable working
environment. It has been a great experience learning from him.

I would also like to pay my sincere gratitude to Ms. Mamta Garg, Head of
the Department of Computer Science & Engineering for providing all
facilities necessary for the report formation, for all her support and
motivation extended.

It is an honor to work in a cooperative environment, where one can work


with zeal and enthusiasm for which I am thankful to Mr. Kanav Bansal and
Mr. Ashutosh Mahawar . They have provided me all the support needed
throughout the experimental work for the successful completion of the
project.

I would also like to express my special thanks to few of my batch mates for
their continued support during the report formation.

Ms. Aditi Jain


Roll No. 18EJICS008
(III B. Tech., V Sem.)
ABSTRACT

The application of ‘Machine Learning’ and ‘Artificial Intelligence’ has


become popular within last decade. Both terms are frequently used in
science and media, sometimes interchangeably , sometimes with different
meanings.

In this work, the project report entitled to ‘MACHINE LEARNING &


ARTIFICIAL INTELLIGENCE’. We review relevant literature and
present a conceptual framework which clarifies the role of machine learning
and artificial intelligence. Machine Learning has been used in multiple field
and industries. For example, in this report we will show how we can use ML
in Classification & Regression, Prediction and performing Exploratory Data
Analysis etc.

In this project we were asked to experiment with a real world dataset and to
explore how Machine Learning algorithms can be used to find Patterns in
data.
CONTENTS

1. Basic Introduction to Python


 Features and Applications of Python
 Identifiers and Operators in Python
 Data Types
2. Mathematics
 Linear Algebra
 Statistics
 Probability
3. Mathematical Libraries in Python
 Numpy
 Pandas
4. Exploratory Data Analysis
 Pyplot in Matplotlib
 Seaborn
 Express in Plotly
5. Basic Algorithms in Machine Learning
a) Regression :
 Linear Regression
b) Classification :
 K-NN
 Logistic Regression
 Decision Trees
 Support Vector Machines
6. Deployment
CHAPTER-1

Basic Introduction to Python

Python is a widely used general-purpose, high level programming language. It’s an open
source programming language. It is available and can run on various operating systems
such as Mac OS, Windows, Linux , Unix etc. This makes it a cross platform and portable
language.

Features of Python :
1. Simple and easy to learn
2. Free and open source.
3. General Purpose and high level programming language.
4. Platform independent.
5. Case Sensitive.
6. Interpreted Language.
7. Dynamically typed.
8. Rich Library.
9. We can write concise code using python.

Applications :
1. Desktop Applications (Calculator, Notepad, etc..)
2. Web Applications (YouTube, Dropbox, Google, Instagram, Quora, Spotify)
3. Scientific and Numeric Computing (Scipy, Numpy)
4. Database Applications (Library Management Systems, Pharmaceutical)
5. Network Applications
6. Developing Games (Battlefield, Sims 4, PUBG)
7. Data Science (Pandas, Matplotlib, Seaborn, etc)
8. Machine Learning
9. AI
10. IOT

Identifiers :
Rules to define identifiers :
1. Allowed characters → Alphabets, Digits and Underscore Symbol
2. Identifier should never start with a digit
3. Case Sensitive.
4. No length limit.
5. Can't use reserved words for identifier.

Displaying list of Keywords :


import keyword
print(keyword.kwlist);
Output :['False', 'None', 'True', 'and', 'as', 'assert', 'async',
'await', 'break', 'class', 'continue', 'def', 'del', 'elif',
'else', 'except', 'finally', 'for', 'from', 'global', 'if',
'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass',
'raise', 'return', 'try', 'while', 'with', 'yield']
Operators :
Operator is a symbol that perform certain operation.

Operators available in python are:


 Arithmatic (+, -, , /, %, //, **)
 Relational (>, >=, <, <=)
 Equality (==, !=)
 Logical (and, or, not)
 Bitwise (&, |, ^, ~, <<, >>)
 Assignment (=, +=, -=, *=, /=, etc..)
 Ternary
 Identity --> is, is not (used for address comparision)
 Membership --> in, not in

Data Types :
 Numeric - int, float, complex (Immutable)
 Boolean - bool (True/False)
 Strings (Immutable)
 List (Mutable, mostly used to store homogeneous data types)
 Tuple (Immutable, faster compared to List)
 Set (Unordered collection of items, mutable, removes duplicates)
 Dictionary (Unordered collection of Key-Value Pairs, Mutable, Keys are
Unique - values may not be unique)

Comments :
# This is a single line comment

'''
this is a
multiline comment - 1
'''

"""
this is a
multiline comment - 2
"""
Here are some problem statements :
# 1. Write a program to get a user input in the form of a list data
type. Return a list by removing all the duplicates.

lst=[]
n=int(input("Enter no. of elements : "))

for item in range(1,n+1):


lst.append(int(input("Enter element : ")))

lst=list(set(lst))
lst.sort()
lst

Enter no. of elements : 7


Enter element : 4
Enter element : 4
Enter element : 5
Enter element : 6
Enter element : 8
Enter element : 4
Enter element : 5
Out[1]:[4, 5, 6, 8]

# 2. Write a program to create a user defined tuple with ‘int’ data type
and perform the following operations:
# (a) Find the length of tuples
# (b) Find the sum of all the elements of a tuple
# (c) Find the largest and smallest elements of a tuple

lst=[]
n=int(input("Enter no. of elements : "))

for item in range(0,n):


lst.append(int(input("Enter element : ")))
lst=tuple(lst)

print("\nLength : ",len(lst))
print("Sum : ",sum(lst))
print("Largest : ",max(lst))
print("Smallest : ",min(lst))

Enter no. of elements : 5


Enter element : 2
Enter element : 3
Enter element : 3
Enter element : 6
Enter element : 9

Length : 5
Sum : 23
Largest : 9
Smallest : 2
# 3. Given a number and ith bit, change the ith bit of that number to 1.
# Sample Input -> num = 13, i = 1
# Output -> 15

num=int(input("Enter a Number : "))


i=int(input("Enter the Bit to Change : "))
mag_num=1<<i
newNum=num^mag_num
print(newNum)

Enter a Number : 13
Enter the Bit to Change : 1
15

# 4. Given a number, print 1 if the number is odd otherwise print 0.


x=int(input("Enter a number : "))
x%2

Enter a number : 6
0

# 5. Given two lists of integers A and B. Write a program to merge them


into a single sorted list that contains every item from list A and B in
ascending order.

lst1=[1,3,9,12]
lst2=[5,9,3,19,13,7]

lst1=set(lst1)
lst2=set(lst2)

mlist=lst1.union(lst2)
mlist=list(mlist)
mlist.sort()

mlist

[1, 3, 5, 7, 9, 12, 13, 19]

# 6. Create a user defined dictionary to store names and marks of 5


students. Sort the dictionary according to marks and return this sorted
dictionary to the user.

n = int(input("enter total number of students : "))

dict1 = dict()
for x in range (0,n):
user_input = input("enter the name and the marks of the students
separated by commas(,) : ")
key,value = user_input.split(",")
dict1[key] = value
lst=list(dict1.items())
lst.sort(key=lambda x:x[1])
print(lst)

enter total number of students : 4


enter the name and the marks of the students separated by
commas(,) : Berlin,70
enter the name and the marks of the students separated by
commas(,) : Oslo,0
enter the name and the marks of the students separated by
commas(,) : Moscow,50
enter the name and the marks of the students separated by
commas(,) : Nairobi,100
[('Oslo', '0'), ('Nairobi', '100'), ('Moscow', '50'), ('Berlin',
'70')]
CHAPTER-2

Mathematics

Linear Algebra

 A point can be represented as a vector. By default, column vector is used.

In the above figure, the LHS shows the column vector of a point in m dimensions.
And right one shows the row vector as the transpose of it’s column vector.

 Euclidean distance between two points in two dimensions is given as follows:

Therefore, Euclidean distance between two points in n dimensions is given as


follows:

 From above, we can also conclude that Euclidean of a Point from origin in n
dimensions is as follows :
 Since we represent points as vectors, we use operations like vector addition and
vector multiplication. Here we’ll use only dot products of vectors.

The dot product of two vectors a = [a1, a2… an] and b = [b1, b2… bn] is defined as:

Or,

where ||a||=magnitude of vector a ,and


||b||=magnitude of vector b

In n dimensions,

 Projection:

where a1 = || projba ||

 The magnitude of a unit vector is unity. Unit vector has only direction and no
units or dimensions.
e.g.
Margins : 1” on top, bottom & right, 1.25” on left.
Page Nos. : Bottom right corner starting from Chapter 1 to end
Text Font : Time New Roman
Main Body : 12 pts, 1.5 spacing with 0.5” paragraph margin and
one blank line between all paragraphs and between
titles/subtitles and paragraphs

Headings - : Left Justified, 14 Pts, Bold Face, Title Case with Section Nos., Chapter
wise.
Sub Headings-: Left Justified, 12 Pts, Bold Face, and Title Case with Section Nos.

Figure Captions:
Figure – Chapter No. Figure No. – Name of Figure
(Bold Face, Title Case, Centered, 10 Pts. at the bottom of Figures)

Table Captions:
Table – Chapter No. Table No. – Name
(Bold Face, Title Case, Centered, 10 Pts. at the top of Table)

Chapter should include all the assignment; Which


were given by the company during training with the
problem statement.

CHAPTER : DETAILS OF PROJECT (IF ANY GIVEN BY THE


COMPANY )/ TECHNICAL DATA OF COMPANY/TASK ASSIGNED
CHAPTER CONCLUSION
REFERENCES

NOTE-
1. Page no- Bottom right corner starting from Chapter 1 to end as mention above.
2. Page no for certificate, acknowledgement and index must be in roman.
3. Conclusion and Bibliography/References in last two pages must be there.

You might also like