Data Science Projects Overview
Data Science Projects Overview
PROJECTS RELATING TO
DATA SCIENCE
Part I
Predictive Model in Detail
Part II
Portfolio
Part III
Energy Efficiency in Building Systems
Part I: Building of a Predictive Model
Conceptually…
Problem
Source: [Link]
Predictive Model in Detail
Dataset
Source: [Link]
Predictive Model in Detail
R Language
load(".\\[Link]")
[Link](samsungData)
# [1] TRUE
table(duplicated(names(samsungData))) # checking
for duplicate headers
# FALSE TRUE
# 479 84
Predictive Model in Detail
Column Types
table(sapply(samsDF, class))
# character integer numeric
# 1 1 561
which(sapply(samsDF, [Link]))
# activity
# 563
which(sapply(samsDF, [Link]))
# subject
# 562
Predictive Model in Detail
dim(samsDF)
# [1] 7352 563
table([Link](samsDF))
# TRUE
# 7352
table(sapply(samsDF[,1:561], [Link]))
# TRUE
# 4124472 #7352*561 = 4124472
Predictive Model in Detail
Balanced Data
table(samsDF$activity)
# laying sitting standing walk walkdown walkup
# 1407 1286 1374 1226 986 1073
sum(table(samsDF$activity))
# [1] 7352
round( table(samsDF$activity)/nrow(samsDF), 2)
# laying sitting standing walk walkdown walkup
# 0.19 0.17 0.19 0.17 0.13 0.15
Predictive Model in Detail
Splitting Data
library(caTools)
# Randomly split the data into training and testing sets
[Link](1000)
split = [Link](samsDF$activity, SplitRatio = 0.7)
round( table(train$activity)/nrow(train), 2)
# laying sitting standing walk walkdown walkup
# 0.19 0.17 0.19 0.17 0.13 0.15
Predictive Model in Detail
Test Data
round( table(test$activity)/nrow(test), 2)
# laying sitting standing walk walkdown walkup
# 0.19 0.17 0.19 0.17 0.13 0.15
Predictive Model in Detail
Random Forest
library(randomForest)
[Link](415)
trainF = train
trainF[562] = NULL
dim(trainF)
# [1] 5146 562
Predictive Model in Detail
Determining ntree
ntree = 293
Initial Results:
Prediction <- predict(fit, test[1:561])
library(caret)
confusionMatrix(Prediction , test[,563])
# Accuracy : 0.9782
# 95% CI : (0.9713, 0.9839)
Predictive Model in Detail
Determining mtry
library(caret)
confusionMatrix(PredictionF , test[,563])
# Accuracy : 0.9805
# 95% CI : (0.9738, 0.9859)
Reduction in Error = (0.9805 - 0.9782)/(1 - 0.9782) = 0.1055
Predictive Model in Detail
AUC
library(pROC)
Source: [Link]
MapReduce: Apache Weblog
Problem
[Link]
MapReduce: Apache Weblog
Source: [Link]
MapReduce: Apache Weblog
URI Referer
MapReduce: Apache Weblog
Challenges
[Link]
MapReduce: Apache Weblog
RegEx Groups
[Link]
MapReduce: Apache Weblog
EpochTime
import time
fmt ='%d/%b/%Y:%H:%M:%S'
utci = int(utc)
epot = [Link]([Link](d, fmt)) #parses string given the format; converts to sec
epod = (abs(utci) % 100)/60.0 + (abs(utci) // 100) # minutes converted to hrs + int division in hrs
if [Link]():
epf = epot + epod*3600
else:
epf = epot - epod*3600
return int(epf)
MapReduce: Apache Weblog
Reducer
[Link]
Source: [Link]
MapReduce: Apache Weblog
Mapper
#!/usr/bin/env python
import sys
print value
[Link]
MapReduce: Apache Weblog
Hadoop
Sample Output
[Link]
MapReduce: Apache Weblog
Impact
Background
Problem
Challenges
Computed LTV
Visualization: LTV
Weighted LTV
Visualization: LTV
Impact
Customer LTV
>
Cost of customer Acquisition (CAC)
CAC
$10 engagement -> 5 new users -> these users
acquire 15 more users at no cost
CAC = $10/(5+15) = $0.50
Streaming Data: Speech
[Link]
Streaming Data: Speech
[Link]
Streaming Data: Speech
Problem
[Link]
Streaming Data: Speech
Challenges
[Link]
Streaming Data: Speech
Technology Stack
[Link]
Streaming Data: Speech
User Interface
[Link]
Streaming Data: Speech
Impact
Measurement tool
Motivational: helps to set goal
Customer retention
[Link]
Artificial Neural Network (ANN)
ANN
Source: [Link]
ANN
Source: [Link]
ANN
Multi-Layer Perceptron
Fully interconnected
Source: [Link]
ANN
Optimization function
Challenges
Saturation at Initialization
Known solutions:
Small initial weights
Hyperbolic Tangent Function instead of Sigmoidal
Other challenges relating to speech
processing
[Link]
ANN
Saturation at Initialization
[Link]
ANN
Introduced (N)
where (N) 1
[Link]
ANN
Impact
Problem
Piezo-electric Transducer
Receiver
Transmitter
Water-Sludge interface Detection
Collecting Data
Data Visualization
Leakage
Reverberation
3.68 ms
Bottom of
the Tank
Water-Sludge interface Detection
1.5x103 x 3.68 ms
= 5.52 m
Depth of water
= 2.76 m
= 9.05 ft
Water-Sludge interface Detection
Impact
Addition of Internet?
IoT
On a computer or a device
Part III
Powerwall by Tesla
Powerwall
Energy Efficiency in Building Systems
Sun Shades
UC Davis West Village is the largest planned “zero net energy” community
Energy Efficiency in Building Systems
Source: [Link]/articles/read/California-Wants-All-New-Homes-to-be-Net-Zero-in-2020
Energy Efficiency in Building Systems
Related Work
[Link]
Source: [Link]/articles/read/California-Wants-All-New-Homes-to-be-Net-Zero-in-2020