0% found this document useful (0 votes)
215 views

Data Analytics Lab File Rohit

Uploaded by

Rohit Maurya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
215 views

Data Analytics Lab File Rohit

Uploaded by

Rohit Maurya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Babu Banarasi Das Institute of Technology & Management

Department of Information Technology


Dr. A.P.J. Abdul Kalam Technical University, Lucknow

LAB FILE

III Year B. Tech VI- Semester


INFORMATION TECHNOLOGY

Data Analytics Lab (KIT-651)


2023-24

Prepared By: Rohit Maurya


Roll no: 2100540130026
Submitted To: Ms. Soumya Saxena
INDEX

S.No Contents
1. Institute Vision and Mission
2. Department Vision, Mission and PEO
3. Program Outcomes and Program Specific Outcomes.

4. Computer Lab DO’s and DON’T


5. Course outcomes
6. List of Experiment
7. Experiment Description
VISION OF THE INSTITUTE

“To become a leading institute of providing professionally


competent and socially responsive technocrats with high
moral values.”

MISSION OF THE INSTITUTE

• To create an eco-system for the dissemination of


technical knowledge, to achieve academic excellence.
• To develop technocrats with creative skills and
leadership qualities, to solve local and global
challenges.
• To impart human values and ethics in students, to
make them socially and Eco-friendly responsible.
VISION OF THE DEPARTMENT
“To transform the students to be skilled IT professionals,
Innovative leaders and environmentally receptive citizens”

MISSION OF THE DEPARTMENT


M1: To develop and deliver quality academic programs in
emerging & innovative fields of engineering to empower
the students to meet industry standards.
M2: To build students community with ethical standards
to undertake R&D in thrust areas of national &
international needs.
M3: To inculcate professional behavior, positive attitude
and communication skills.
Program Educational Objectives (PEOs)
• To develop the ability among students to understand
the concept of core Information Technology subjects
that will facilitate understanding of new Technology.
• PEO2To embed a strong foundation in the engineering
fundamentals to solve, analyze and design real time
engineering products.
• PEO3To give exposures to emerging edge
technologies, adequate training and opportunities to
work as team on multidisciplinary projects with
effective communication skills and leadership
qualities.
Program Outcomes
1. Engineering knowledge: Apply the knowledge of mathematics, science,
engineering fundamentals, and an engineering specialization to the solution of
complex 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.

3. Design/development of solutions: Design solutions for complex 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 team work: 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

PROGRAMME SPECIFIC OUTCOMES (PSOs)

PSO 1: Use and apply current technical concepts and practices in the core
Information Technologies of Human Machine Learning, Information Management,
Programming, Cloud Computing.

PSO 2: Design, develop and test software systems for worldwide network of
computers to provide solutions to real world problems.
Computer Lab DO’s and DON’T

Do’s
1. Know the location of the fire extinguisher and the first aid box and how to use them in case of an
emergency.
2. Read and understand how to carry out an activity thoroughly before coming to the laboratory.
3. Report fires or accidents to your lecturer/laboratory technician immediately.
4. Report any broken plugs or exposed electrical wires to your lecturer/laboratory technician
immediately.

Don’ts
1. Do not eat or drink in the laboratory.

2. Avoid stepping on electrical wires or any other computer cables.

3. Do not open the system unit casing or monitor casing particularly when the power is turned on.
Some internal components hold electric voltages of up to 30000 volts, which can be fatal.

4. Do not insert metal objects such as clips, pins and needles into the computer casings. They may
cause fire.

5. Do not remove anything from the computer laboratory without permission.

6. Do not touch, connect or disconnect any plug or cable without your lecturer/laboratory
technician’s permission.
Course outcomes

CO-1 Implement numerical and statistical analysis on various data sources

CO-2 Apply data preprocessing and dimensionality reduction methods on raw data

CO-3 Implement linear regression technique on numeric data for prediction

CO-4 Execute clustering and association rule mining algorithms on different datasets

CO-5 Implement and evaluate the performance of KNN algorithm on different datasets
INDEX
Assessment Criterion Sign.
Experiment Experiment
S.No Practical’s Name COs
Performance Result
(5) (5) Viva Record
(5) (5)
1. To get the input from user and CO1
perform numerical operations
(MAX, MIN, AVG, SUM,
SQRT, ROUND) using in R.
2. To perform data CO2
import/export (.CSV, .XLS,
.TXT) operations using data
frames in R.
3. To get the input matrix from CO1
user and perform Matrix
addition, subtraction,
multiplication, inverse
transpose and division
operations using vector
concept in R.
4. To perform CO1
statistical operations
(Mean, Median, Mode and
Standard deviation) using R.
5. To perform data CO2
preprocessing operations i)
Handling Missing data ii)
Min-Max normalization
Course Name : Data Analytics Lab EXPERIMENT NO. 1

Course Code : KIT651 Branch: IT Semester: VI

Faculty : Ms. Soumya Saxena

OBJECTIVE: To get the input from user and perform numerical operations (MAX,
MIN,AVG,SUM,SQRT,ROUND) using R.

CODE:
>x<- c(3.5,2.87,3.14,0.99,7.12,9.11)

>#to find the minimum


>min.result=min(x)
>print(min.result)
[1] 0.99

>#to find the maximum


>max.result=max(x)
>print(max.result)
[1] 9.11

>#to find the average


>mean.result=mean(x)
>print(mean.result)
[1] 4.455

>#to find the sum


>sum.result=sum(x)
>print(sum.result)
[1] 26.73
>#to find the sqrt
>sqrt.result=sqrt(x)
>print(sqrt.result)
[1] 1.8708287 1.6941074 1.7720045 0.9949874 2.6683328 3.0182777

>#to find the round


>round.result=round(x)
>print(round.result)
[1] 4 3 3 1 7

OUTPUT:
Course Name : Data Analytics Lab EXPERIMENT NO. 2

Course Code : KIT651 Branch: IT Semester: VI

Faculty : Ms. Soumya Saxena

OBJECTIVE: To perform data import/export (.CSV,.XLS,.TXT) operations using data frames in R.


CODE:
#R program to illustrate operation on a data frame
# Creating a data frame

>df=data.frame("NAME"=c("KRATOS","FAYE","FREYA"),"LANGUAGE"=c("JAVA","PYTHON","R"),"
AGE"=c(21,20,19))

>cat("Before adding a row\n")

Before adding a row

> print(df)

NAME LANGUAGE AGE


1 KRATOS JAVA 21
2 FAYE PYTHON 20
3 FREYA R 19

> #add a new row using rbind()

>newDF=rbind(df,data.frame(NAME="ODIN",LANGUAGE="RUBY",AGE="23"))

>cat("After adding a row\n")

After adding a row

> print(newDF)

NAME LANGUAGE AGE RANK


1 KRATOS JAVA 21 3
2 FAYE PYTHON 20 1
3 FREYAR 19 2
> #creating a dataframe ,adding a new column

>df=data.frame("NAME"=c("KRATOS","FAYE","FREYA"),"LANGUAGE"=c("JAVA","PYTHON","R"),"
AGE"=c(21,20,19))

>cat("Before adding a column\n")

Before adding a column

> print(df)

NAME LANGUAGE AGE


1 KRATOS JAVA 21
2 FAYE PYTHON 20
3 FREYA R 19

> #add a new column using cbind()

>newDf=cbind(df,"RANK"=c("3","5","1"))

>cat("After adding a column\n")

After adding a column

> print(newDf)

NAME LANGUAGE AGE RANK


1 KRATOS JAVA 21 3
2 FAYE PYTHON 20 5
3 FREYA R 19 1

OUTPUT:
Initial Data frame:
Data frame after adding a ROW:

Data frame after adding COLUMN:


Course Name : Data Analytics Lab EXPERIMENT NO. 3

Course Code : KIT651 Branch: IT Semester: VI

Faculty : Ms. Soumya Saxena

OBJECTIVE: To get the input matrix from user and perform Matrix addition, subtraction,
multiplication, inverse transpose and division operations using vector concept in R.

CODE:
>#create two 2*3 matrixes
>m1 = matrix(c(1 , 2 , 3 , 4 , 5 , 6),nrow=2)

>print("Matrix-1:")

[1] "Matrix-1:"

>print(m1)

[,1] [,2] [,3]


[1,] 1 3 5
[2,] 2 4 6

>m2 = matrix(c(0 , 1 , 2 , 3 , 0 , 2),nrow=2)

>print("Matrix-2:")

[1] "Matrix-2:"

>print(m2)

[,1] [,2] [,3]


[1,] 0 2 0
[2,] 1 3 2

>result = m1 + m2

>print("Result of addition")

[1] "Result of addition"


>print(result)

[,1] [,2] [,3]


[1,] 1 5 5
[2,] 3 7 8

>result = m1 - m2

>print("Result of substraction")

[1] "Result of substraction"

>print(result)

[,1] [,2] [,3]


[1,] 1 1 5
[2,] 1 1 4

>result = m1 * m2

>print("Result of multiplication")

[1] "Result of multiplication"

>print(result)

[,1] [,2] [,3]


[1,] 0 6 0
[2,] 2 12 12
>result = m1 / m2

>print("Result of division")

[1] "Result of division"

>print(result)

[,1] [,2] [,3]


[1,] Inf1.500000 Inf
[2,] 2 1.333333 3
OUTPUT:
Matrix 1:

Matrix 2:

Result of ADDITION:

Result of SUBSTRACTION:
Result of MULTIPLICATION:

Result of DIVISION:
Course Name : Data Analytics Lab EXPERIMENT NO. 4

Course Code : KIT651 Branch: IT Semester: VI

Faculty : Ms. Soumya Saxena

OBJECTIVE: To perform statistical operations (Mean, Median, Mode and Standard deviation)
using R.

Mean: Calculate sum of all the values and divide it with the total number of values in the dataset.

Median: The middle value of the dataset.

Mode: The most occurring number in the dataset. For calculating mode, there is no default function in
R. So, we have to create our own custom function.
Standard Deviation: A measure that is used to quantify the amount of variation or dispersion of a set
of data values.

CODE:
Mean
>x <- c(1,2,3,4,5,1,2,3,1,2,4,5,2,3,1,1,2,3,5,6)#dataset

>mean.result= mean(x)

>print(mean.result)

[1] 2.8

Median

>x <- c(1,2,3,4,5,1,2,3,1,2,4,5,2,3,1,1,2,3,5,6)#dataset

>median.result= median(x)

>print(median.result)

[1] 2.5
Mode

>mode <- function(x){


+ ux<- unique(x)

+ ux[which.max(tabulate(match(x,ux)))]

+}

>x <- c(1,2,3,4,5,1,2,3,1,2,4,5,2,3,1,1,2,3,5,6)

>mode.result = mode(x)

>print(mode.result)

[1] 1

Standard Deviation

>sd.result = sqrt(var(x))

>print(sd.result)

[1] 1.576138
Course Name : Data Analytics Lab EXPERIMENT NO. 5

Course Code : KIT651 Branch: IT Semester: VI

Faculty : Ms. Soumya Saxena

OBJECTIVE: To perform data pre-processing operations-


i) Handling Missing data

ii) Min-Max normalization

Step1:
Create Data Frame
Let us first create data frame with some missing values and then demonstrate with an example how to find the
missing values

>data <- data.frame(x1= c(NA,5,6,8,9),x2= c(2,4,NA,NA,1),x3= c(3,6,7,0,3),


x4=c("Hello","value",NA,"BBDITM",NA))

>print(data)

We have created a data frame with some missing values .

Step2:
Now to check the missing values we are using is.na() function in R and print out the number of missing items
in the data frame as shown below.

Syntax: is.na()
Parameter: x:dataframe
Example1:
In this example, we have first created data with some missing values and then found the missing value in
particular columns x1,×2,x3, and x4 respectively using the above function
CODE:
>data <- data.frame(x1= c(NA,5,6,8,9),x2= c(2,4,NA,NA,1),x3= c(3,6,7,0,3),x4=
c("Hello","value",NA,"BBDITM",NA))

>#to find missing values

>which(is.na(data$x1))
[1] 1

>which(is.na(data$x2))
[1] 3 4

>which(is.na(data$x3)) integer(0)

>which(is.na(data$x4))
[1] 3 5

OUTPUT:

You might also like