Geethanjali College of Engineering and Technology (Ugc Autonomous Institution)
Geethanjali College of Engineering and Technology (Ugc Autonomous Institution)
2021-2022
(Accredited by NBA and NAAC with ‘A’ grade, Approved by AICTE New
Delhi and Affiliated to JNTUH)
CERTIFICATE
Head Faculty
(Autonomous)
- - 2/- 1
Prerequisite(s):
Course Objectives:
Develop ability to
1. Know the basic elements of Big Data and Data science to handle huge amount of data.
2. Gain knowledge of basic mathematics behind the Big data.
3. Understand the different Big data processing technologies.
4. Apply the Analytical concepts of Big data using R and Python.
5. Visualize the Big Data using different tools.
LIST OF EXPERIMENTS
Week 9: Data Visualization using Pie, Bar, Boxplot Chart Plotting Framework.
Week 11: Data Visualization using Line Graph Plotting, Scatterplot Plotting Framework.
● To provide graduates with analytical and problem solving skills to design algorithms, other
hardware / software systems, and inculcate professional ethics, inter-personal skills to
work in a multi-cultural team.
● To facilitate graduates to get familiarized with the art software / hardware tools, imbibing
creativity and innovation that would enable them to develop cutting-edge technologies of
multi-disciplinary nature for societal development.
PROGRAM OUTCOMES (POs)
Program Outcomes (POs) describe what students are expected to know and be able to do by
the time of graduation to accomplish Program Educational Objectives (PEOs). The Program
Outcomes for Computer Science and Engineering graduates are:
PO 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.
PO 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.
PO 8: Ethics: Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.
PO 9: Individual and team work: Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.
PO 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.
PSO 2: To follow the best practices, namely, SEI-CMM levels and 6-sigma which varies
from time to time for software development projects using open-ended programming
environments to produce software deliverables as per customer needs.
Course Objectives:
Develop ability to
1. Know the basic elements of Big Data and Data science to handle huge amount of data.
2. Gain knowledge of basic mathematics behind the Big data.
3. Understand the different Big data processing technologies.
4. Apply the Analytical concepts of Big data using R and Python.
5. Visualize the Big Data using different tools.
• Observation book and lab records submitted for the lab work are to be checked and
signed before the next lab session.
• Students should be instructed to switch ON the power supply after the connections are
checked by the lab assistant / teacher.
• The promptness of submission should be strictly insisted by awarding the marks
accordingly.
• Ask viva questions at the end of the experiment.
• Do not allow students who come late to the lab class.
• Encourage the students to do the experiments innovatively.
• Fill continuous Evaluation sheet, on regular basis.
• Ensure that the students are dressed in formals
Scheme of Lab Exam Evaluation:
Vectors:
apple <- c('red','green',"yellow")
print(apple)
print(class(apple))
[1] "red" "green" "yellow"
[1] "character"
Lists:
list1 <- list(c(2,5,3),21.3,sin)
print(list1)
[[1]]
[1] 2 5 3
[[2]]
[1] 21.3
[[3]]
function (x) .Primitive("sin")
Matrices:
M=matrix(c('a','a','b','c','b','a'),
nrow=2,ncol=3,byrow=TRUE)
print(M)
[,1] [,2] [,3]
[1,] "a" "a" "b"
[2,] "c" "b" "a"
Arrays:
a <- array(c('green','yellow'),dim = c(3,3,1))
print(a)
,,1
[,1] [,2] [,3]
[1,] "green" "yellow" "green"
[2,] "yellow" "green" "yellow"
[3,] "green" "yellow" "green"
Data Frames:
BMI <- data.frame(
gender = c("Male", "Male","Female"),
height = c(152, 171.5, 165),
weight = c(81,93, 78),
Age = c(42,38,26)
)
print(BMI)
gender height weight Age
1 Male 152.0 81 42
2 Male 171.5 93 38
3 Female 165.0 78 26
WEEK2
1. Write a R program to take input from the user (name and age) and display the
values. Also print the version of R installation.
Output
name = "Python";
n1 = 10;
n2 = 0.5
nums = c(10, 20, 30, 40, 50, 60)
print(ls())
print("Details of the objects in memory:")
print(ls.str())
Output
3. Write a R program to create a sequence of numbers from 20 to 50 and find the mean
of numbers from 20 to 60 and sum of numbers from 51 to 91.
Output
Output
Output
6.Write a R program to get all prime numbers up to a given number (based on the sieve
of Eratosthenes).
Output
[1] 2 3 5 7 11
7.Write a R program to print the numbers from 1 to 100 and print "Fizz" for multiples
of 3, print "Buzz" for multiples of 5, and print "FizzBuzz" for multiples of both
for (n in 1:100) {
if (n %% 3 == 0 & n %% 5 == 0) {print("FizzBuzz")}
else if (n %% 3 == 0) {print("Fizz")}
else if (n %% 5 == 0) {print("Buzz")}
else print(n)
Ouput
[1] 1
[1] 2
[1] "Fizz"
[1] 4
[1] "Buzz"
[1] "Fizz"
[1] 7
[1] 8
[1] "Fizz"
[1] "Buzz"
[1] 11
[1] "Fizz"
[1] 13
[1] 14
[1] "FizzBuzz"
[1] 16
[1] 17
[1] "Fizz"
[1] 19
[1] "Buzz"
[1] "Fizz"
[1] 22
[1] 23
[1] "Fizz"
[1] "Buzz"
[1] 26
[1] "Fizz"
[1] 28
[1] 29
[1] "FizzBuzz"
[1] 31
[1] 32
[1] "Fizz"
[1] 34
[1] "Buzz"
[1] "Fizz"
[1] 37
[1] 38
[1] "Fizz"
[1] "Buzz"
[1] 41
[1] "Fizz"
[1] 43
[1] 44
[1] "FizzBuzz"
[1] 46
[1] 47
[1] "Fizz"
[1] 49
[1] "Buzz"
[1] "Fizz"
[1] 52
[1] 53
[1] "Fizz"
[1] "Buzz"
[1] 56
[1] "Fizz"
[1] 58
[1] 59
[1] "FizzBuzz"
[1] 61
[1] 62
[1] "Fizz"
[1] 64
[1] "Buzz"
[1] "Fizz"
[1] 67
[1] 68
[1] "Fizz"
[1] "Buzz"
[1] 71
[1] "Fizz"
[1] 73
[1] 74
[1] "FizzBuzz"
[1] 76
[1] 77
[1] "Fizz"
[1] 79
[1] "Buzz"
[1] "Fizz"
[1] 82
[1] 83
[1] "Fizz"
[1] "Buzz"
[1] 86
[1] "Fizz"
[1] 88
[1] 89
[1] "FizzBuzz"
[1] 91
[1] 92
[1] "Fizz"
[1] 94
[1] "Buzz"
[1] "Fizz"
[1] 97
[1] 98
[1] "Fizz"
[1] "Buzz"
8.Write a R program to extract first 10 english letter in lower case and last 10 letters in
upper case and extract letters between 22nd to 24th letters in upper case.
Output
print_factors = function(n) {
print(paste("The factors of",n,"are:"))
for(i in 1:n) {
if((n %% i) == 0) {
print(i)
}
}
}
print_factors(4)
print_factors(7)
print_factors(12)
Output
10.Write a R program to find the maximum and the minimum value of a given vector.
Output
str1 = "The quick brown fox jumps over the lazy dog."
print("Original vector(string)")
print(str1)
print("Unique elements of the said vector:")
print(unique(tolower(str1)))
nums = c(1, 2, 2, 3, 4, 4, 5, 6)
print("Original vector(number)")
print(nums)
print("Unique elements of the said vector:")
print(unique(nums))
Output
a<-c(1,2,3)
b<-c(4,5,6)
c<-c(7,8,9)
m<-cbind(a,b,c)
print("Content of the said matrix:")
print(m)
Output
1. summary(iris)
Output:
Min. :4.300 Min. :2.000 Min. :1.000 Min. :0.100 setosa :50
Median :5.800 Median :3.000 Median :4.350 Median :1.300 virginica :50
2. str(mtcars)
Output:
$ mpg : num 21 21 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 ...
$ drat: num 3.9 3.9 3.85 3.08 3.15 2.76 3.21 3.69 3.92 3.92 ...
$ vs : num 0 0 1 1 0 1 0 1 1 1 ...
$ am : num 1 1 1 0 0 0 0 0 0 0 ...
Output:
4. tail(mtcars)
Output:
5. names(mtcars)
Output:
[1] "mpg" "cyl" "disp" "hp" "drat" "wt" "qsec" "vs" "am" "gear" "carb"
6. nrow(mtcars)
Output:
[1] 32
7. aggregate(Sepal.Length~Species,iris,mean)
Output:
Species Sepal.Length
1 setosa 5.006
2 versicolor 5.936
3 virginica 6.588
8. fix(iris)
Output:
9. sepalsub<- subset(iris,Sepal.Length>7)
sepalsub
Output:
BINOMIAL DISTRIBUTION
1. choose(10,3)*((1/6)^3*(5/6)^7)
Output:
[1] 0.1550454
2. dbinom(3,size=10,prob=(1/6))
Output:
[1] 0.1550454
3. choose(10,0)*((1/6)^0*(5/6)^10) +
choose(10,1)*((1/6)^1*(5/6)^9)+
choose(10,2)*((1/6)^2*(5/6)^8)+
choose(10,3)*((1/6)^3*(5/6)^7)
Output:
[1] 0.9302722
4. pbinom(3,size=10,prob=(1/6),lower=T)
Output:
[1] 0.9302722
5. pbinom(3,size=10,prob=(1/6),lower=F)
Output:
[1] 0.06972784
6. dbinom(4,size=12,prob=0.2)
Output:
[1] 0.1328756
7. dbinom(0,size=12,prob=0.2)+
dbinom(1,size=12,prob=0.2)+
dbinom(2,size=12,prob=0.2)+
dbinom(3,size=12,prob=0.2)+
dbinom(4,size=12,prob=0.2)
Output:
[1] 0.9274445
8. pbinom(4,size=12,prob=0.2)
Output:
[1] 0.9274445
9. x <- pbinom(26,51,0.5)
print(x)
Output:
[1] 0.610116
print(x)
Output:
[1] 23
print(x)
Output:
[1] 60 71 57 60 62 62 50 59
POISSON DISTRIBUTION
1. ppois(16,lambda = 12)
Output:
[1] 0.898709
2. ppois(16,lambda = 12,lower=F)
Output:
[1] 0.101291
3. rpois(16,lambda = 12)
Output:
[1] 12 8 12 10 13 8 11 13 12 11 15 12 10 11 14 11
4. dpois(16,lambda = 12)
Output:
[1] 0.05429334
NORMAL DISTRIBUTION
1. pnorm(84,mean=72,sd=15.2,lower.tail=FALSE)
Output:
[1] 0.2149176
plot(x,y)
Output:
plot(x,y)
Output:
4. x <- seq(0, 1, by = 0.02)
plot(x,y)
Output:
5. y <- rnorm(50)
Output:
LINEAR REGRSSION
head(cars)
Output:
speed dist
1 4 2
2 4 10
3 7 4
4 7 22
5 8 16
6 9 10
scatter.smooth(x=cars$speed,y=cars$dist,main="dist~speed")
Output:
linearMod<-lm(dist~speed,data=cars)
print(linearMod)
Output:
Coefficients:
(Intercept) speed
-17.579 3.932
summary(linearMod)
Output:
Residuals:
Coefficients:
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
LOGISTIC REGRESSION
input<-mtcars[,c("am","cyl","hp","wt")]
print(input)
Output:
am cyl hp wt
input<-mtcars[,c("am","cyl","hp","wt")]
am.data=glm(formula=am~cyl+hp+wt,data=input,family=binomial)
print(summary(am.data))
Output:
Deviance Residuals:
Coefficients:
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
AIC: 17.841