You are on page 1of 35

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

BELAGAVI-590018

An Internship Report on
“Artificial Intelligence & Machine Learning”
Submitted in Partial Fulfillment of the award of the
Degree of Bachelor of Engineering
in
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted by

SATISH PATIL
(2JI19EC112)

Internship carried out


at
Aqmenz Automation Pvt. Ltd.

Internal Guide External Guide


Prof. Vinayak Dalavi Mr. M.d. Hussain
Dept of ECE,JCE CTO

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING


JAIN COLLEGE OF ENGINEERING
BELAGAVI– 590 014
2022-2023
JAIN COLLEGE OF ENGINEERING,
BELAGAVI-590 014

Department of Electronics and Communication Engineering

CERTIFICATE

Certified that the Internship entitled “Artificial Intelligence & Machine Learning”,
is carried out by Mr. Satish Patil, USN: 2JI19EC112 a bonafide student of Department of
Electronics and Communication Engineering, Jain College of Engineering, Belagavi, in
partial fulfilment for the award of Bachelor of Engineering in Electronics and
Communication Engineering of the Visvesvaraya Technological University, Belagavi,
during the year 2022-2023. It is certified that all corrections/suggestions indicated for
Continuous Internal Evaluation have been incorporated in the report. The internship report
has been approved as it satisfies the academic requirements in respect of Internship prescribed
for the said Degree.

Guide HOD Principal & Director


Prof.Vinayak Dalavi Dr.Krupa.R.Rasane Dr. J. Shivakumar

Name of the examiners Signature with date

1. _________________________ __________________

2. __________________________ __________________
DECLARATION

I Satish Patil, hereby declare that my Internship is carried out at “Aqmenz Automation
Pvt. Ltd.” with entitled “Artificial Intelligence & Machine Learning”, submitted by me to
the Department of Electronics and Communication Engineering, Jain College of Engineering,
Belagavi, under the supervision of Prof.Vinayak Dalavi The report is for academic purpose.

Mr. Satish Patil


(USN NO: 2JI19EC112)
Date:
Place:
Jain College of Engineering, Belagavi
Department of Electronics & Communication Engineering

Department VISION
“To impart quality technical education for developing globally competent,
ethically sound Electronics & Communication Engineers”

Department MISSION
1. To provide conducive environment through structured student centric,
teaching learning process
2. To nurture needs of society by infusing scientific temper in students
and to grow as a centre of excellence with efficient industry-institute
interaction.
3. To inculcate self-learning skills, entrepreneurial ability and
professional ethics.

Program Educational Objectives (PEO)


1. Graduates will be able to contemplate real-time social problems and
deliver efficient solutions
2. Graduates will be able to succeed in professional careers.
3. Graduates will demonstrate leadership qualities.

Program Specific Outcomes (PSO)


1. Specify, design, build and test analog, digital and embedded systems
for signal processing.
2. Understand and architect wired and wireless analog and digital
communication systems as per specifications, and determine their
performance

5
Jain College of Engineering, Belagavi
Department of Electronics & Communication Engineering
Electronics Engineering Graduates will be able to achieve the following:

1. Engineering knowledge: Apply the knowledge of mathematics, science, and


engineering fundamentals to the solution of Electronics engineering problems.
2. Problem analysis: Identify, formulate, review research literature, and analyze
complex engineering problems reaching substantiated conclusions using first principles
of mathematics, natural sciences, and engineering sciences.
Design/development of solutions: Design solutions for engineering problems and
design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and
environmental considerations.
4. Conduct investigations of complex problems: Use research-based knowledge and
research methods including design of experiments, analysis and interpretation of data,
and synthesis of the information to provide valid conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex
engineering activities with an understanding of the limitations.
6.The engineer and society: Apply reasoning informed by the contextual knowledge
to assess societal, health, safety, legal and cultural issues and the consequent
responsibilities relevant to the professional engineering practice.
7.Environment and sustainability: Understand the impact of the professional
engineering solutions in societal and environmental contexts, and demonstrate the
knowledge of, and need for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and
responsibilities and norms of the engineering practice.
9. Individual and teamwork: Function effectively as an individual, and as a member
or leader in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with
the engineering community and with society at large, such as, being able to comprehend
and write effective reports and design documentation, make effective presentations, and
give and receive clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of
the engineering and management principles and apply these to one’s own work, as a
member and leader in a team, to manage projects and in multidisciplinary
environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological
change.

6
Jain College of Engineering, Belagavi
Department of Electronics & Communication Engineering
Subject : Internship Subject Code:18ECI85

Course Objectives:
1: Exposure to the current technological developments relevant to the subject area of training
2. Learn to apply the Technical knowledge in real industrial situations.
3. Gain experience in writing Technical reports/projects
4. Expose students to the engineer’s responsibilities and ethics.
5. Expose the students to future employers
CO-PO/PSO Mapping:
L1: Remembering L2: Understanding L3: Applying L4: Analyzing L5: Evaluating L6: Creating
Course Bloom’s
Description
Outcomes Cognitive level
Articulate and apply principles learned in the class rooms to
18ECI85.1 specific internship site experience
L3
18ECI85.2 Develop work competencies for a specific profession or
occupation.
L3
18ECI85.3 Will be able to use modern tools and processes to solve the
problems
L3
18ECI85.4 Present thoughts and ideas clearly and effectively. (Oral and
written communication, report writing, presentation skills).
L3
18ECI85.5 Explore career options and gain general work experience L5

Strength of CO Mapping to PO/PSOs with Justification:


1: Slight (Low) 2: Moderate (Medium) 3: Substantial (High)

COs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2

18EC
2 1
I85.1
18EC
1 2 1
I85.2
18EC
1 1 2
I85.3
18EC
1 2
I85.4
18EC
1 2
I85.5
Avg 0.667 0.667 0.2 0.4 0.2 0.2 0.4 0.4

CO-PO Justification

7
Jain College of Engineering, Belagavi
Department of Electronics & Communication Engineering
CO-1 PO1-(2) Students will gain the engineering knowledge

PO2(1) Students will analyze and solve the problem with different tools

CO-2 PO1 (1) Students will gain the engineering knowledge

PO2(2) Students will analyze and solve the problem with different tools

PO3(1) Participation in Innovation Competitions

CO-3 PO1 (1) Students will gain the engineering knowledge

PO2(1) Students will analyze and solve the problem with different tools

PO5(2) Students will gain the knowledge of modern tool usage

CO-4 PO9(1) Student will develop ability to work effectively as a member in teams,
preferably in a multi-disciplinary.
PO10(2) Students will gain soft skills and develop report writing capability.

CO-5 PO8(1) Students can work ethically and professionally in the workplace

PO12(2) Students will learn to implement knowledge into practice and innovate

Prepared by (Course Faculty) Approved by HOD Approved by HOD (End of


(Before Semester Commencement) Semester)

Signature: Signature: Signature:

Name Prof. S. B. Shindhe Name: Dr. Krupa Rasane Name: Dr. Krupa Rasane

8
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

ABSTRACT

Artificial intelligence (AI) and machine learning (ML) are two of the most rapidly
growing and important fields in computer science. AI is the study of how to create
computers that can “think” for themselves, while ML is the study of how to create
computers that can learn from data. Both AI and ML have been used for years in a wide
variety of applications, including search engines, spam filtering, medical diagnosis, and
voice recognition. In recent years, there has been a huge increase in the amount of data
available, and as a result, there has been a corresponding increase in the use of AI and
ML techniques to extract information from data. In this talk, we will give a brief
overview of AI and ML, and we will discuss some of the applications of these
techniques in data science

JCE, BELAGAVI Page 9


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

TABLE OF CONTENTS

CHAPTER 1 ..................................................................................................................4
INTRODUCTION..........................................................................................................4

CHAPTER 2 ..................................................................................................................5
COMPANY PROFILE...................................................................................................5
2.1.1 COMANY PROFILE……………………………………………………………5

CHAPTER 3 ..................................................................................................................6
WORK CARRIED OUT ...............................................................................................6
3.1 INTRODUCTION TO MACHINE LEARNIG USING PYTHON AND
JUPYTER NOTEBOOK ...............................................................................................6
3.2 PYTHON..................................................................................................................6
3.3 JUPYTER NOTEBOOK .........................................................................................8
3.4 DATA SCIENCE...................................................................................................10
3.5 MACHINE LEARNING........................................................................................12
3.6 VARIOUS PYTHON LIBRARIES USED IN THE PROJECT............................13
3.7 PROJECT…………………………………………………………………...........16

CHAPTER 4 ...............................................................................................................23
SKILLS ACQUIRED...................................................................................................23
4.1 SCOPE OF THE SKILLS ACQUIRED ...............................................................23
4.2 APPLICATIONS...................................................................................................24

CHAPTER 5 ................................................................................................................25
CONCLUSION............................................................................................................25

JCE, BELAGAVI Page 10


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

TABLE OF FIGURES

FIGURE 2.1.1: COMPANY LOGO…………………………………………….4


FIGURE 3.1.1: DATASET………………………………………………………14
FIGURE 3.1.2: LOADED DATA………………………………………………15
FIGURE 3.1.3: NULL DATA.…………………………………………………16
FIGURE 3.1.4: MISSING PERCENTAGE…………………………………….16
FIGURE 3.1.5: FILLING DATA.……….……………………………………...18
FIGURE 3.1.6: HEATMAP………….…………………………………………...19
FIGURE 3.1.7: DATASET….…………………………………………………....20
FIGURE 3.1.8: DATA INFO….….……………………………………………....20
FIGURE 3.1.9: REMOVED COLOUMNS….…………………………………....21
FIGURE 3.1.10: DATA PROCESSING……...…………………………………....21
FIGURE 3.1.11: GRAPH…....…….……………………………………………....22

JCE, BELAGAVI Page 11


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

CHAPTER 1

INTRODUCTION

An internship is a structured work experience related to a student’s major and/or


career goal. It is an experience that should enhance a student’s academic, career,
and personal development. It is an involvement, closely aligned with the student’s
major and arranged with an employer who believes it is desirable to aid in the
training and education of the student. It is of a short duration, typically two to four
months, through direct personal contact hours or through a training program, and
to aid the intern in developing a summary report of his/her experience.

To sum up, internships play a crucial role in shaping one's career. It not only helps
undergraduates and graduates gain real exposure to working environments but
also helps them develop the necessary skills required to stand out in a saturated
job market. It highlights the potential of candidate during hiring and Career
Development Generally, an internship is a task-specific exchange of service for
experience between a student and a business. Within internships, classroom
concepts suddenly become real tools of the trade as you interact and learn in a
professional setting. Internship experiences are formal, formative, and
foundational to your career. Developing your knowledge of workplace
collaboration, business etiquette, and strong communication tactics are among the
vital “soft skills” that can only be Character Growth Not only do internships help
develop your professionalism, but they also encourage character growth. Many
employers even value personal qualities over professional knowledge when it
comes to employment. A Door to Opportunity Internships is foundational in
preparing students for the workforce and providing opportunities after graduation.
Most employers seek career ready college graduates who have been equipped
with prior experiences and skills in a given field.

JCE, BELAGAVI Page 12


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

CHAPTER 2

COMPANY PROFILE

Aqmenz Automation Private Limited is a Private incorporated on 15th October 2018.


It is classified as Non-govt company and is registered at Registrar of Companies,
Bangalore. It is an EdTech Company mainly Focused Corporate Trainings & Value-
Added Skill Development Training to the Students. We are also involved in Building
Industrial Projects based on Industrial Automation, Embedded Systems, Robotics, Al
& Machine Learning. Indoskill offers skill-oriented hands-on training through an
online platform. Present Challenge is to provide hands-on training online for remotely
located students. To overcome these challenges, the Aqmenz Automation Pvt Ltd team
taken a holistic approach towards personally assisted hands-on training on Real-time
Industrial projects online. Aqmenz Automation Pvt Ltd has now trained around 5000+
students under various skill-oriented training programs.

FIG 2.1.1: COMPANY PROFILE

Company age 5 years


Head quarter location Bangalore
Industry Automation specialization
Main products Industrial robots, Conveyors, Sensors,
Control systems
Staff headcount (2015) 600

JCE, BELAGAVI Page 13


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

CHAPTER -3

WORK CARRIED OUT

3.1 INTRODUCTION TO MACHINE LEARNING USING PYTHON AND


JUPYTER NOTEBOOK:

Machine learning is a subfield of artificial intelligence (AI) that involves the


development of algorithms and models that enable computers to learn from data and
make predictions or decisions without being explicitly programmed to do so.

In traditional programming, a computer is given a set of instructions to follow inorder


to solve a certain problem. Machine learning, on the other hand, entails teaching a
computer to recognize patterns and correlations in data and then using that
knowledge to base predictions or judgments on fresh, unstudied data.

Machine learning comes in a variety of forms, such as reinforcement learning,


unsupervised learning, and supervised learning. Unsupervised learning is the process
of identifying patterns in unlabeled data, while supervised learning involves building
a model on labelled data. Through trial-and-error training, reinforcement learning
entails giving the model feedback in the form of incentives or penalties.

Natural language processing, image identification, fraud detection, and autonomous


driving are just a few of the many uses for machine learning. It is a quickly expanding
sector with lots of room for research and growth, and it has the potential to
completely change a lot of industries in the years to come.

3.2 Python:

JCE, BELAGAVI Page 14


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

Python is a high-level, interpreted general-purpose programming language. Python,


which was developed by Guido van Rossum and originally made available in 1991,
stresses code readability and makes extensive use of whitespace. It offers building
blocks that make it possible to programme clearly on both small and big scales. After
30 years as the top figure in the language community, Van Rossum retired in July 2018.
Python has an autonomous memory management system and a dynamic type system.
It includes a sizable and thorough standard library, supports a variety of programming
paradigms, including imperative, functional, procedural, and object-oriented.
There are Python interpreters available for many different operating systems. The
community-based development model is shared by nearly all of Python's other
implementations, including CPython, the reference implementation. The non-profit
Python Software Foundation oversees maintaining Python and CPython. Python's
syntax is straightforward and quick to learn, emphasising readability, which lowers the
cost of programme maintenance. Additionally, Python offers packages and modules,
which promotes programme modularity and code reuse.

Advantages of using PYTHON :

The combination of features that give the Python language an advantage over others
has led to its wide range of applications. Among the advantages of Python
programming are:

1.Presence of Third Party Modules:


Numerous third-party modules are available in the Python Package Index (PPI),
enabling Python to communicate with the majority of other systems and languages.

2.Extensive Support Libraries:


Python offers a sizable standard library that covers topics including operating system
interfaces, string manipulation, web services tools, and internet protocols. The standard
library has already scripted many high-use programming operations, which
considerably minimizes the amount of code that needs to be created.

JCE, BELAGAVI Page 15


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

3.Open Source and Community Development:


The Python programming language is created under an open source license that has
been authorized by OSI, making it free to use and distribute, even for profit.
Additionally, the community works on its code through organizing conferences and
mailing groups and providing for its many modules, which in turn drives its
development.

4.Learning Ease and Support Available:


Python's outstanding readability and uncomplicated, easy-to-learn syntax make it a
great programming language for novices. PEP 8's code style standards offer a set of
recommendations to help with code formatting. The large user base and active
developer community have also produced a wealth of online resources to support
further development and language adoption.

5.User-friendly Data Structures:


To create quick runtime data structures, Python includes built-in list and dictionary data
structures. Additionally, Python offers dynamic high-level data type, which cuts down
on the amount of support code required.

6. Productivity and Speed:


The boost in Python's speed and productivity can be attributed to the language's clear
object-oriented architecture, increased process management capabilities, robust text
processing and integration capabilities, as well as its own unit testing framework.
Python is regarded as a practical choice for creating intricate multi-protocol network
systems.

JCE, BELAGAVI Page 16


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

3.3Jupyter Notebook :

A well-liked Python tool for machine learning is Jupyter Notebook. In a web-based


interface, it enables users to develop and run Python code, which is especially helpful
for jobs involving data science and machine learning.

Jupyter Notebook is an open-source web application that allows users to create and
share documents that contain live code, equations, visualizations, and narrative text. It
is widely used by data scientists, researchers, and educators to perform data analysis,
numerical simulations, and machine learning tasks.

Jupyter Notebook is built on top of the IPython kernel, which supports various
programming languages, including Python, Julia, R, and others. The notebook interface
provides a convenient way to write and execute code, visualize data, and document the
analysis process. The notebooks can be saved in various formats, including HTML,
PDF, and Markdown, making them easy to share and collaborate on with others.

Here are the main steps involved in using Jupyter Notebook for machine learning
using Python:

JCE, BELAGAVI Page 17


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

1. Install the required libraries: You must install the necessary Python libraries,
including NumPy, Pandas, Scikit-learn, TensorFlow, and Keras, before using Jupyter
Notebook for machine learning.
2. Load the dataset: Using a library like Pandas, load the dataset into Jupyter Notebook
so that it may be used for machine learning.
3. Explore the dataset: To learn more about the dataset, use data visualization and
summary statistics.
4. Data preparation: Prepare the dataset by cleaning and transforming the data. This
entails actions like eliminating null values, scaling the features, and encoding category
variables.
5. Division of the data to evaluate the machine learning model's performance, divide
the dataset into training and testing sets.
6.Train the machine learning model: Train the machine learning model using a library
like Scikit-learn, TensorFlow, or Keras.
7.Evaluate the model: Evaluate the performance of the machine learning model using
metrics like accuracy, precision, recall, and F1 score.
8.Fine-tune the model: Fine-tune the machine learning model by adjusting the
hyperparameters and exploring different algorithms and architectures.
9.Predict on new data: Use the trained machine learning model to make predictions on
new, unseen data.

Jupyter Notebook allows you to easily perform these tasks in a single environment,
making it a powerful tool for machine learning using Python.
Overall, Jupyter Notebook is a powerful and versatile tool that provides a convenient
and flexible environment for data analysis and scientific computing. Its popularity and
user community make it a valuable resource for anyone working in data science or
related fields.

JCE, BELAGAVI Page 18


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

3.4 DATA SCIENCE :

Data Science is a multidisciplinary field that involves the use of statistical and
computational methods to extract insights and knowledge from data. It
combines techniques from statistics, computer science, and domain-specific
knowledge to analyze, interpret, and visualize complex data sets.

Data Science typically involves several steps, including data collection, data
cleaning, data preprocessing, exploratory data analysis, modeling, and
communication of results. Data scientists use programming languages like
Python, R, or SQL, as well as machine learning algorithms and statistical
models to uncover patterns and relationships in data.

“Data science” is just about as broad of a term as they come. It may be easiest
to describe what it is by listing its more concrete components:

1) Data exploration &analysis : Included here: Pandas; NumPy; SciPy; a


helping hand from Python’s Standard Library.

2) Data visualization : A pretty self-explanatory name. Taking data and turning


it into something colorful. Included here: Matplotlib; Seaborn; Datashader.

3) Classical machine learning : Conceptually, we could define this as any


supervised or unsupervised learning task that is not deep learning (see below).
Scikit-learn is far-and-away the go-to tool for implementing classification,
regression, clustering, and dimensionality reduction, while StatsModels is less
actively developed but still has a number of useful features. Included here:
Scikit-Learn, StatsModels

JCE, BELAGAVI Page 19


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

4) Deep learning : This is a subset of machine learning that is seeing a


renaissance, and is commonly implemented with Keras, among other libraries.
It has seen monumental improvements over the last ~5 years, such as AlexNet
in 2012, which was the first design to incorporate consecutive convolutional
layers. Included here: Keras, TensorFlow, and a whole host of others.

5) Data storage and big data frameworks : Big data is best defined as data that
is either literally too large to reside on a single machine, or can’t be processed
in the absence of a distributed environment. The Python bindings to Apache
technologies play heavily here. Apache Spark; Apache Hadoop; HDFS; Dask;
h5py/pytables.

6) Odds and ends : Includes subtopics such as natural language processing, and
imag manipulation with libraries such as OpenCV. Included here: nltk; Spacy;
OpenCV/cv2; scikit-image; Cython.

Practical Implementation of Data Science :

Problem Statement :

You are given a dataset which comprises of comprehensive statistics on


a range of aspects like distribution & nature of prison institutions, overcrowding
in prisons, type of prison inmates etc. You have to use this dataset to perform
descriptive statistics and derive useful insights out of the data. Below are few
tasks ;
1) ta loaDading : Load a dataset “prisoners.csv” using pandas and display the
first and last five rows in the dataset. Then find out the number of columns using
describe method in Pandas.
2) Data Manipulation : Create a new column -“total benefitted”, which is the
sum of inmates benefitted through all modes.
3) Data Visualization : Create a bar plot with each state name on the x-axis and
their total benefitted inmates as their bar heights

JCE, BELAGAVI Page 20


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

3.5MACHINE LEARNING :

Machine learning is a subset of artificial intelligence in the field of computer


science that often uses statistical techniques to give computers the ability to
"learn" (i.e., progressively improve performance on a specific task) with data,
without being explicitly programmed.

Machine learning is closely related to (and often overlaps with) computational


statistics, which also focuses on prediction-making through the use of
computers. It has strong ties to mathematical optimization, which delivers
methods, theory and application domains to the field.

Machine learning (ML) is a category of algorithm that allows software


applications to become more accurate in predicting outcomes without being
explicitly programmed. The basic premise of machine learning is to build
algorithms that can receive input data and use statistical analysis to predict an
output while updating outputs as new data becomes available.

Advantages of Machine Learning are :


1) Accuracy: ML algorithms can analyze large volumes of data and identify
patterns and insights that might be missed by humans, leading to more accurate
predictions and decisions.
2) Personalization: ML algorithms can learn from user behavior and preferences
to personalize experiences and recommendations, such as in e-commerce,
marketing, and entertainment.
3) Efficiency: ML algorithms can optimize processes and reduce waste by
identifying areas of inefficiency and suggesting improvements.
4) Scalability: ML algorithms can scale to handle large amounts of data and
complex tasks, making them ideal for applications such as fraud detection,
image recognition, and language translation.
5) Continuous improvement: ML algorithms can learn from feedback and new
data to continuously improve their performance over time

JCE, BELAGAVI Page 21


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

3.6 VARIOUS LIBRARIES USED IN PYTHON THE PROJECT:

• Numpy:
NumPy is the fundamental package for scientific computing with Python. It contains
among other things.
1) a powerful N-dimensional array object.
2) sophisticated (broadcasting) functions.
3) tools for integrating C/C++ and Fortran code .
4) useful linear algebra, Fourier transform, and random number capabilities.

• Pandas
Pandas is an open-source, BSD-licensed Python 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 fields including academic and
commercial domains including finance, economics, Statistics, analytics, etc. In this
tutorial, we will learn the various features of Python Pandas and how to use them in
practice.

• Matplotlib
Matplotlib is a Python 2D plotting library which produces publication quality figures in
a variety of hardcopy formats and interactive environments across platforms. Matplotlib
can be used in Python scripts, the Python and IPython shells, the Jupyter notebook,
web application servers, and four graphical user interface toolkits.

For simple plotting the pyplot module provides a MATLAB-like interface, particularly
when combined withIPython. For the power user, you have full control of line styles,
font properties, axes properties, etc, via an object-oriented interface or via a set of
functions familiar to MATLAB users.

• Scikit-Learn
Scikit-learn is a popular machine learning library for the Python programming language.
It provides a variety of tools for data preprocessing, model selection, model training,
and model evaluation, making it a powerful tool for both beginners and experienced
machine learning practitioners.
1) Scikit-learn provides a clean and consistent interface to tons of different models.
2) It provides you with many options for each model, but also chooses sensible
defaults.
3) Its documentation is exceptional, and it helps you to understand the models as well
as how to use them properly.
4) It is also actively being developed

JCE, BELAGAVI Page 22


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

3.7Project:

Explorative Data Analysis on Titanic Dataset

Project Objective

the objective of this project is to conduct exploratory data analysis (EDA) and statistical
modeling on the Titanic Dataset in order to gather insights and evenutally predicting
survior(0 = Not Survived, 1 = Survived). Out of the 891 passengers that went on board
the titanic, approximately 38% of them got surived where as majority 62% did not survive
the disaster..

Dataset

First let’s look at the dataset. It is titanic.csv.


It has 12 columns.

Below is the dataset.

Fig:3.1.1:dataset

Step 1: Import the relavent python libraries for the analysis

Below is the code snippet for loading the dataset.


We will be using the pandas,numpy,matplotlib,seaborn data frame.

JCE, BELAGAVI Page 23


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

Data.head() #inspect first few rows of the dataset

Data.shape will give number of rows and coloumns

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

# read the csv File


data = pd.read_csv("titanic.csv")
print(data.shape)

data.head()

Below is the output

Fig:3.1.2: read file

Step 2: To find null data

#data.null().sum() will give the number of null data in dataset


data.isnull().sum()

JCE, BELAGAVI Page 24


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

Fig:3.1.3:null data

Step 3: To check missing value percentage

print(data.isnull().sum()/data.shape[0]*100)

Fig:3.1.4:missing value percentage

Step 4: Filling the missing data

As we can see from the diagram the column ‘Age’ and ‘Cabin’ have got null values.

While ‘Cabin’ has huge amount null values, ‘Age’ has moderate amount of null

values.

JCE, BELAGAVI Page 25


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

Here we would drop the ‘Cabin’ column as it has got mostly NULL values.

To do so we shall use the following code snippet.


data = data.drop(["Cabin"],axis = 1)
data["Age"] = data["Age"] .fillna(data["Age"].mean())
data["Fare"] = data["Fare"] .fillna(data["Fare"].mean())
data.isnull().sum()

Fig:3.1.5:filling data

Step 5 Heatmap

sns.heatmap(data.corr(),annot = True, fmt = "0.1f")

Fig:3.1.6:Heatmap

JCE, BELAGAVI Page 26


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

Step 6 Now Data looks like

Fig:3.1.7:Data

Data info

Which shows non null count and data type

data.info()

Fig:3.1.8:Data info

JCE, BELAGAVI Page 27


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

Step 7 — Removing the coloumns which are not important


#Name, Ticket, Passenger ID Features are Not important, we can drop
these Features
data = data.drop(["PassengerId","Name","Ticket"],axis = 1)
data

Fig:3.1.9:Important coloumns
Data processing

➢ # Data Preprocessing
➢ # convert categorical Features into Numerical (Sex, Embarked)
➢ # since only few categories in "Sex" & "Embarked column", we can
use Label Encoding

➢ from sklearn.preprocessing import LabelEncoder

➢ le = LabelEncoder()
➢ data["Sex"] = le.fit_transform(data["Sex"])
➢ data["Embarked"] = le.fit_transform(data["Embarked"])
➢ data

JCE, BELAGAVI Page 28


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

Fig:3.1.10:Data preprocessing

Relation between sex and survived

Let us try to know if the dependent variable ‘Survived’ has any relation with the variable
‘Sex’.

To do so we would use factorplot. The following code snippet would return us the
required
sns.factorplot(x=’Survived’,col=’Sex’,kind=’count’,data=tra
in)

Fig:3.1.11:Graph

JCE, BELAGAVI Page 29


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

Inference: As we all know from the movie as well as the


story of titanic females were given priority while saving
passengers. The above graph also tells us the same story.
More number of male passengers have died than female
ones.

➢ Split the data into X and Y

# Split Data into Features (X) & Label (Y)

X = data.drop("Survived",axis = 1)
Y = data["Survived"]

➢ Split the data into train and test

# Split the data into Train & Test


from sklearn.model_selection import train_test_split

xtrain,xtest,ytrain,ytest = train_test_split(X,Y,test_size =
0.2,random_state = 2)
print(xtrain.shape,xtest.shape,ytrain.shape,ytest.shape)

Here is the complete code:

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

# read the csv File


data = pd.read_csv("titanic.csv")
print(data.shape)

JCE, BELAGAVI Page 30


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

data.head()
data.isnull().sum()
# Checking the Missing Values percentage

print(data.isnull().sum()/data.shape[0]*100)
data = data.drop(["Cabin"],axis = 1)
data["Age"] = data["Age"].fillna(data["Age"].mean())
data["Fare"] = data["Fare"].fillna(data["Fare"].mean())
data.isnull().sum()
#heatmap
sns.heatmap(data.corr(),annot = True, fmt = "0.1f")
data
data.info()
#Name, Ticket, Passenger ID Features are Not important,
we can drop these Features
data = data.drop(["PassengerId","Name","Ticket"],axis =
1)
data
# Data Preprocessing
# convert categorical Features into Numerical (Sex,
Embarked)
# since only few categories in "Sex" & "Embarked
column", we can use Label Encoding

from sklearn.preprocessing import LabelEncoder

le = LabelEncoder()
data["Sex"] = le.fit_transform(data["Sex"])
data["Embarked"] = le.fit_transform(data["Embarked"])
data
sns.factorplot(x=’survived’,col=’sex’,kind=’count’
,data=data)

# Split Data into Features (X) & Label (Y)

X = data.drop("Survived",axis = 1)
Y = data["Survived"]
# Split the data into Train & Test
from sklearn.model_selection import train_test_split

xtrain,xtest,ytrain,ytest =
train_test_split(X,Y,test_size = 0.2,random_state = 2)
print(xtrain.shape,xtest.shape,ytrain.shape,ytest.shape)

JCE, BELAGAVI Page 31


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

JCE, BELAGAVI Page 32


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

CHAPTER-4
SKILLS ACQUIRED

4.1 SCOPE OF THE SKILLS ACQUIRED :


The following are the skills acquired through the four weeks internship
programme:
• Fundamentals of coding through Python programming.
• Learned to use different python text editors.
• Evaluated many codes through the things learned during internship.
• Learned to do various projects on Jupyter Notebook and VS code.
• Usage of Python packages like NumPy, Matplotlib, Scikit learn, etc.
• Working with images, csv files, pdf and emails using python
• Object oriented programming using python.

JCE, BELAGAVI Page 33


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

4.2 APPLICATIONS :
1. Image Recognition :
➢ Object detection and recognition

➢ Facial recognition

➢ Image classification

2.Speech Recognition :
➢ Voice assistants
➢ Speaker identification

➢ Language translation

3.RecommenationSystems :
➢ E-Commerce

➢ Entertainment

➢ Social media,Music,Travel

JCE, BELAGAVI Page 34


E&C DEPARTMENT
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

CHAPTER 5

CONCLUSION

In conclusion, my AI and machine learning internship has been an enriching


experience that has enhanced my technical and professional skills. During the
internship, I gained a thorough understanding of various machine learning techniques,
including supervised and unsupervised learning, deep learning, and natural language
processing. I also acquired practical experience in developing and implementing AI
and ML models to solve real-world problems.

The internship provided me with an opportunity to work on several projects, one of


which involved employee salary prediction using linear regression. Through this
project, I learned about data pre-processing, model building, model evaluation, and
hyperparameter tuning. The experience taught me the importance of collaboration,
communication, and problem-solving skills in a workplace.

Overall, the internship has equipped me with skills that will be invaluable in my
future career. I am grateful for the opportunity to work with my mentors and
colleagues, and I look forward to applying my newfound knowledge and skills in my
future endeavours.

JCE, BELAGAVI Page 35


E&C DEPARTMENT

You might also like