A new architecture of internet of things and big data ecosystem for
1. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
A new architecture of Internet of Things and big data ecosystemfor
Securedsmart healthcare monitoring andalerting system
In this paper author is describing concept to transfer patient data securelyfrom
wearable sensors, in health care system all critical patient’s condition can be
monitored via body sensors, sensors will capture current patient condition
such as heart rate, blood sugar level, blood pressure etc and sent this sense
data to hospital server which are hosted by cloud servers and this cloud
servers will run machine learning algorithms such as Support Vector Machine,
Random Forest or propose algorithm called Stochastic Gradient Logistic
Regression algorithm to predict whether patient data is normal or abnormal, if
patient data is abnormal then it will send alarm to hospital peoples and
patient. By receiving this alarm hospital peoples will take timely precautions
and save patient life.
While implementing above concept various problems arises and given
solutions, this project consists of two modules
1) Meta Fog-Redirection (MF-R): this module is responsible to collect data
from various sensors wear by different patients. In simple terms this
module is responsible for collecting sensors data and then storing this
data. Various sensors will reports data every minutes so huge data will
be gather and this data will be called as BigData. To manage BigData
author is using Apache Pig and Apache HBase BigData processing
technologies installed on amazon cloud services. Apache Pig responsible
to process big data and ApacheHBase responsible to store BigData. Both
this services are offered by amazon and this amazon cloud services are
not free of cost and as a student’s we cannot purchase amazon cloud
service so we are building dummy cloud which will receive input patient
request from Client application and then predict whether input contains
normal or abnormal values.
2) Grouping and Choosing: This module provide security to the patient data
by encrypting patient data at sensor side and then sent to cloud server.
Cloud application will decrypt patient data and then process data and
send result back to doctors. By encrypting data we are providing security
to patient data as any hacker the data then we won’t understand
anything from encrypted patient data.
3) Machine Learning Algorithm: Actually we don’t have any sensors so
author is using CLEVELAND Heart Disease Dataset and generating
2. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
machine learning train model on this heart disease dataset by using
different algorithms such as Support Vector Machine, Random Forest
and propose Stochastic Gradient Regression Algorithm. From this 3
algorithms propose Stochastic Gradient Algorithm giving better
performance. We are generating training model on heart disease
dataset by using above algorithms. Whenever patient request comes
from client application then dummy cloud will apply new patient data on
train model and ask algorithms to predict patient condition. Predicted
patient condition will be inform to hospital peoples.
4) Here we are designing dummy cloud as cloud server and fog server to
process patient data. Client application will read patient data from file
and we consider it as reading from sensor and then report to cloud
server for processing. Connection between client and cloud server will
be consider as IOT (internet of things) communication.
Above is the propose working functionality and propose work also called as
MR-F.
SVM Working procedure
Machine learning involves predicting and classifying data and to do so we
employ various machine learning algorithms according to the dataset. SVM or
Support Vector Machine is a linear model for classification and regression
problems. It can solve linear and non-linear problems and work well for many
practical problems. The idea of SVM is simple: The algorithm creates a line or a
hyperplane which separates the data into classes. In machine learning, the
radial basis function kernel, or RBF kernel, is a popular kernel function used in
various kernelized learning algorithms. In particular, it is commonly used in
support vector machine classification. As a simple example, for a classification
task with only two features (like the image above), you can think of a
hyperplane as a line that linearly separates and classifies a set of data.
Intuitively, the further from the hyperplane our data points lie, the more
confident we are that they have been correctly classified. We therefore want
our data points to be as far away from the hyperplane as possible, while still
being on the correct side of it.
So when new testing data is added, whatever side of the hyperplane it lands
will decide the class that we assign to it.
3. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
How do we find the right hyperplane?
Or, in other words, how do we best segregate the two classes within the data?
The distance between the hyperplane and the nearest data point from either
set is known as the margin. The goal is to choose a hyperplane with the
greatest possible margin between the hyperplane and any point within the
training set, giving a greater chance of new data being classified correctly.
Random Forest Algorithm Details
Random Forest Algorithm: it’s an ensemble algorithm which means internally
it will use multiple classifier algorithms to build accurate classifier model.
Internally this algorithm will use decision tree algorithm to generate it train
model for classification.
Heart disease dataset is kept inside dataset folder and below are the dataset details
age,sex,cp,trestbps,chol,fbs,restecg,thalach,exang,oldpeak,slope,ca,thal,class
63.0,1.0,1.0,145.0,233.0,1.0,2.0,150.0,0.0,2.3,3.0,0.0,6.0,0
67.0,1.0,4.0,160.0,286.0,0.0,2.0,108.0,1.0,1.5,2.0,3.0,3.0,2
67.0,1.0,4.0,120.0,229.0,0.0,2.0,129.0,1.0,2.6,2.0,2.0,7.0,1
37.0,1.0,3.0,130.0,250.0,0.0,0.0,187.0,0.0,3.5,3.0,0.0,3.0,0
First records contains dataset column names and remaining records are the
values of dataset. In last column we have class values as 0, 2, 1 and 3. 0 means
normal values and 1, 2 and 3 are abnormal values. By analysing all parameters
doctors will come to conclusion and give value as 0 or 1 or 2 or 3. So using
above dataset machine learning algorithms will be trained. New patient records
which we read from test file will not have 0 or 1 or 2 or 3 values and this values
will be predicted by machine learning algorithm by analysing other values such
as cholesterol and other parameters. Right now we are giving this value from
test file to the application but in real time it will come from sensor. Below are
some test values from test file.
4. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above test values you can see result value 0, 1, 2 or 3 not available,
application will send to cloud and cloud will predict using machine learning
algorithms and send results to doctor.
Screen shots
To run this project first double click on ‘run.bat’ file to get below screen
5. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screen click on ‘Upload Heart Disease Dataset’ button and upload
heart disease dataset
In above screen I am uploading ‘dataset’ file and then click on ‘Open’ button to
get below screen
In above screen we are getting dataset details such as size of dataset and
training number of records and testing number of records. In this application
fromcomplete dataset algorithm using 242 records for training and 61 records
6. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
for testing. Now click on ‘Run SVM Algorithm’ button to build SVM model on
loaded dataset
In above screen we can see SVM got prediction accuracy as 57. Now click on
‘Run Random Forest Algorithm’ button to build random forest model on
loaded dataset
7. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In abovescreen random forest also got same prediction accuracy, now click on
“propose Stochastic Gradient with Logistic Regression Algorithm’ button to
train model on same dataset
In above screen propose algorithm got 62% accuracy which is more than SVM
and Random Forest. Now click on ‘Accuracy Graph’ button to see accuracy
comparison graph on all algorithms
8. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above graph x-axis represents algorithm name and y-axis represents
accuracy of those algorithms. From comparison graph we can conclude
propose work is better than existing algorithm. Now if you want to receive
patient data then click on ‘Start Patient Data Receiving & Alert Monitoring
System’ to make this application act like cloud server
in above screen this application start like a cloud server to send data to this
server then double click on ‘run_client_sensors.bat’ filewhich run client sensor
program and send data to above cloud server and cloud server will predict
patient condition and send result back to client sensor application
9. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screen client send input values in encrypted format to cloud server
and got the result as normal or abnormal values. In server we can see all those
input values is in encrypted format. Cloud server decrypt and then predict
result and send back to client
In server screen you can see it enters into infinite running mode to receive
request from client sensors and to process.