Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1.INTRODUCTION
Generally, data mining (sometimes called data or knowledge discovery) is the process of analyzing
data from different perspectives and summarizing it into useful information - information that can
be used to increase revenue, cuts costs, or both. Data mining software is one of a number of
analytical tools for analyzing data. It allows users to analyze data from many different dimensions
or angles, categorize it, and summarize the relationships identified. Technically, data mining is the
process of finding correlations or patterns among dozens of fields in large relational databases.
While large-scale information technology has been evolving separate transaction and analytical
11systems, data mining provides the link between the two. Data mining software analyzes
relationships and patterns in stored transaction data based on open-ended user queries. Several types
of analytical software are available: statistical, machine learning, and neural networks. Generally,
any of four types of relationships are sought:
Classes: Stored data is used to locate data in predetermined groups. For example, a
restaurant chain could mine customer purchase data to determine when customers visit and
what they typically order. Clusters: Data items are grouped according to logical
relationships or consumer preferences. For example, data can be mined to identify market
segments or consumer affinities.
Sequential patterns: Data is mined to anticipate behavior patterns and trends. For example,
an outdoor equipment retailer could predict the likelihood of a backpack being purchased
based on a consumer's purchase of sleeping bags and hiking shoes.
1) Extract, transform, and load transaction data onto the data warehouse system.
2) Store and manage the data in a multidimensional database system.
3) Provide data access to business analysts and information technology professionals.
4) Analyze the data by application software.
5) present the data in a useful format, such as a graph or table.
Psychological stress is becoming a threat to people’s health nowadays. With the rapid pace
of life, more and more people are feeling stressed. According to a worldwide survey reported by
Newbusiness in 20101, over half of the population have experienced an appreciable rise in stress
over the last two years. Though stress itself is non-clinical and common in our life, excessive and
chronic stress can be rather harmful to people’s physical and mental health. According to existing
research works, long-term stress has been found to be related to many diseases, e.g., clinical
depressions, insomnia etc.. Moreover, according to Chinese Center for Disease Control and
Prevention, suicide has become the top cause of death among Chinese youth, and excessive stress is
considered to be a major factor of suicide. All these reveal that the rapid increase of stress has
become a great challenge to human health and life quality.
2.LITERATURE SURVEY
Daily stress recognition from mobile phone data, weather conditions and individual traits
Research has proven that stress reduces quality of life and causes many diseases. For this
reason, several researchers devised stress detection systems based on physiological parameters.
However, these systems require that obtrusive sensors are continuously carried by the user. In our
project, we propose an alternative approach providing evidence that daily stress can be reliably
recognized based on behavioral metrics, derived from the user's mobile phone activity and from
additional indicators, such as the weather conditions (data pertaining to transitory properties of the
environment) and the personality traits (data concerning permanent dispositions of individuals). Our
multifactorial statistical model, which is person-independent, obtains the accuracy score of 72.28%
for a 2-class daily stress recognition problem. The model is efficient to implement for most of
multimedia applications due to highly reduced low-dimensional feature space (32d). Moreover, we
identify and discuss the indicators which have strong predictive power.
SYSTEM ANALYSIS
3.1 EXISTING SYSTEM:
Many studies on social media based emotion analysis are at the tweet level, using text-based
linguistic features and classic classification approaches. A system called MoodLens to
perform emotion analysis on the Chinese micro-blog platform Weibo, classifying the
emotion categories into four types, i.e., angry, disgusting, joyful, and sad.
A existing system studied the emotion propagation problem in social networks, and found
that anger has a stronger correlation among different users than joy, indicating that negative
emotions could spread more quickly and broadly in the network. As stress is mostly
considered as a negative emotion, this conclusion can help us in combining the social
influence of users for stress detection.
Traditional psychological stress detection is mainly based on face-to face interviews, self-
report questionnaires or wearable sensors. However, traditional methods are actually
reactive, which are usually labor-consuming, time-costing and hysteretic.
These works mainly leverage the textual contents in social networks. In reality, data in social
networks is usually composed of sequential and inter-connected items from diverse sources
and modalities, making it be actually cross-media data.
Though some user-level emotion detection studies have been done, the role that social
relationships plays in one’s psychological stress states, and how we can incorporate such
information into stress detection have not been examined yet.
3.2PROPOSED SYSTEM:
Inspired by psychological theories, we first define a set of attributes for stress detection from
tweet-level and user-level aspects respectively: 1) tweet-level attributes from content of
user’s single tweet, and 2) user-level attributes from user’s weekly tweets.
The tweet-level attributes are mainly composed of linguistic, visual, and social attention
(i.e., being liked, retweeted, or commented) attributes extracted from a single-tweet’s text,
image, and attention list. The user-level attributes however are composed of: (a) posting
behavior attributes as summarized from a user’s weekly tweet postings; and (b) social
interaction attributes extracted from a user’s social interactions with friends.
In particular, the social interaction attributes can further be broken into: (i) social
interaction content attributes extracted from the content of users’ social interactions with
friends; and (ii) social interaction structure attributes extracted from the structures of users’
social interactions with friends.
Experimental results show that by exploiting the users’ social interaction attributes, the
proposed model can improve the detection performance (F1-score) by 6-9% over that of the
state-of-art methods. This indicates that the proposed attributes can serve as good cues in
tackling the data sparsity and ambiguity problem. Moreover, the proposed model can also
efficiently combine tweet content and social interaction to enhance the stress detection
performance.
Beyond user’s tweeting contents, we analyze the correlation of users’ stress states and their
social interactions on the networks, and address the problem from the standpoints of: (1)
social interaction content, by investigating the content differences between stressed and
non-stressed users’ social interactions; and (2) social interaction structure, by investigating
the structure differences in terms of structural diversity, social influence, and strong/weak
tie.
We build several stressed-twitter-posting datasets by different ground-truth labeling methods
from several popular social media platforms and thoroughly evaluate our proposed method
on multiple aspects.
3.3HARDWARE REQUIREMENTS:
3.4SOFTWARE REQUIREMENTS:
Software Environment
Initially the language was called as “oak” but it was renamed as “Java” in 1995. The primary
motivation of language was the need for a platform-independent (i.e., architecture neutral) language
that could be used to create software to be embedded in various consumer electronic devices.
Features Of Java
Security
Portability
Object oriented
Robust
Portable
Interpreted
Multithreaded
Overall Description
Java programming uses to produce byte codes and executes them. The first box indicates that the
Java source code is located in a. Java file that is processed with a Java compiler called javac. The
Java compiler produces a file called a. class file, which contains the byte code. The. Class file is
then loaded across the network or loaded locally on your machine into the execution environment is
the Java virtual machine, which interprets and executes the byte code.
Java Architecture
Java architecture provides a portable, robust, high performing environment for development.
Java provides portability by compiling the byte codes for the Java Virtual Machine, which is then
interpreted on each platform by the run-time environment. Java is a dynamic system, able to load
code when needed from a machine in the same room or across the planet.
Compilation of code
When you compile the code, the Java compiler creates machine code (called byte code) for a
hypothetical machine called Java Virtual Machine (JVM). The JVM is supposed to execute the byte
Java
PC Compiler Interpreter
Java (PC)
Source
Code Byte code
………..
……….. Macintosh Java
Compiler Interpreter
(Platform (Macintosh)
……….. indepen
dent)
SPARC
………… Java
Compiler Interpreter
(Sparc)
code. The JVM is created for overcoming the issue of portability. The code is written and compiled
for one machine and interpreted on all machines. This machine is called Java Virtual Machine.
During run-time the Java interpreter tricks the byte code file into thinking that it is running on a Java
Virtual Machine. In reality this could be a Intel Pentium Windows 95 or Sun SARC station running
Solaris or Apple Macintosh running system and all could receive code from any computer through
Internet and run the Applets Simple
4.2 JAVASCRIPT
JavaScript supports the development of both client and server components of Web-based
applications. On the client side, it can be used to write programs that are executed by a Web browser
within the context of a JavaScript is a script-based programming language that was developed by
Netscape Communication Web page. On the server side, it can be used to write Web server
programs that can process information submitted by a Web browser and then updates the browser’s
display accordingly
Even though JavaScript supports both client and server Web programming, we prefer
JavaScript at Client side programming since most of the browsers supports it. JavaScript is almost
as easy to learn as HTML, and JavaScript statements can be included in HTML documents by
enclosing the statements between a pair of scripting tags
<SCRIPTS>..</SCRIPT>.
JavaScript statements
</SCRIPT>
JavaScript vs java
We can do much more with JavaScript, including creating entire application.
JavaScript and Java are entirely different languages. A few of the most glaring differences are:
Java applets are generally displayed in a box within the web document; JavaScript can affect
any part of the Web document itself.
While JavaScript is best suited to simple applications and adding interactive features to Web
pages; Java can be used for incredibly complex applications.
Advantages
JavaScript can be used for Sever-side and Client-side scripting.
It is more flexible than VBScript.
JavaScript is the default scripting languages at Client-side since all the browsers supports it.
HTML is not a programming language but it is an application of ISO Standard 8879, SGML
(Standard Generalized Markup Language), but specialized to hypertext and adapted to the Web. The
idea behind Hypertext is that instead of reading text in rigid linear structure, we can easily jump
from one point to another point. We can navigate through the information based on our interest and
preference. A markup language is simply a series of elements, each delimited with special
characters that define how text or other items enclosed within the elements should be displayed.
Hyperlinks are underlined or emphasized works that load to other documents or some portions of
the same document.
Advantages
A HTML document is small and hence easy to send over the net. It is small because it does
not include formatted information.
HTML is platform independent.
HTML tags are not case-sensitive.
What Is JDBC?
JDBC is a Java API for executing SQL statements. (As a point of interest, JDBC is a trademarked
name and is not an acronym; nevertheless, JDBC is often thought of as standing for Java Database
Connectivity. It consists of a set of classes and interfaces written in the Java programming language.
JDBC provides a standard API for tool/database developers and makes it possible to write database
applications using a pure Java API.
Using JDBC, it is easy to send SQL statements to virtually any relational database.
One can write a single program using the JDBC API, and the program will be able to send
SQL statements to the appropriate database. The combinations of Java and JDBC lets a
programmer write it once and run it anywhere.
JAVA
Application Client machine
JDBC
DBMS-proprietary protocol
Until now the middle tier has typically been written in languages such as C or C++,
which offer fast performance. However, with the introduction of optimizing compilers that
translate Java byte code into efficient machine-specific code, it is becoming practical to
implement the middle tier in Java. This is a big plus, making it possible to take advantage of
Java's robustness, multithreading, and security features. JDBC is important to allow database
access from a Java middle tier.
JDBC connectivity
The JDBC drivers that we are aware of at this time fit into one of four categories:
Java server Pages is a simple, yet powerful technology for creating and maintaining
dynamic-content web pages. Based on the Java programming language, Java Server Pages offers
proven portability, open standards, and a mature re-usable component model .The Java Server
Pages architecture enables the separation of content generation from content presentation. This
separation not eases maintenance headaches, it also allows web team members to focus on their
areas of expertise. Now, web page designer can concentrate on layout, and web application
designers on programming, with minimal concern about impacting each other’s work.
Components
It was mentioned earlier that the Java Server Pages architecture can include reusable
Java components. The architecture also allows for the embedding of a scripting language
directly into the Java Server Pages file. The components current supported include Java Beans,
and Servlets.
Processing
A Java Server Pages file is essentially an HTML document with JSP scripting or tags.
The Java Server Pages file has a JSP extension to the server as a Java Server Pages file. Before
the page is served, the Java Server Pages syntax is parsed and processed into a Servlet on the
server side. The Servlet that is generated outputs real content in straight HTML for responding
to the client.
1. The client sends a request to the web server for a JSP file by giving the name of the JSP
file within the form tag of a HTML page.
System Framework:
In this framework we propose a novel hybrid model - a factor graph model combined with
Convolution Neural Network to leverage tweet content and social interaction information for stress
detection. Experimental results show that the proposed model can improve the detection
performance by 6-9% in F1-score. By further analyzing the social interaction data, we also discover
several intriguing phenomena, i.e. the number of social structures of sparse connections (i.e. with no
delta connections) of stressed users is around 14% higher than that of non-stressed users, indicating
that the social structure of stressed users’ friends tend to be less connected and less complicated than
that of non-stressed users.
Social Interactions:
We analyze the correlation of users’ stress states and their social interactions on the networks, and
address the problem from the standpoints of: (1) social interaction content, by investigating the
content differences between stressed and non-stressed users’ social interactions; and (2) social
interaction structure, by investigating the structure differences in terms of structural diversity, social
influence, and strong/weak tie. Our investigation unveils some intriguing social phenomena.
Attributes categorization
We first define two sets of attributes to measure the differences of the stressed and non-stressed
users on social media platforms: 1) tweet-level attributes from a user’s single tweet; 2) user level
attributes summarized from a user’s weekly tweets.
Tweet-level Attributes
Tweet-level attributes describe the linguistic and visual content, as well as social attention factors
(being liked, commented, and retweeted) of a single tweet. We can classify words into different
categories, e.g. positive/negative emotion words, degree adverbs. Furthermore, we extract linguistic
attributes of emoticons, so we can map the keyword in square brackets to find the emoticons.
Twitter adopts Unicode as the representation for all emojis, which can be extracted directly.
User-Level Attributes
Compared to tweet-level attributes extracted from a single tweet, user-level attributes are extracted
from a list of user’s tweets in a specific sampling period. We use one week as the sampling period in
this project. On one hand, psychological stress often results from cumulative events or mental states.
On the other hand, users may express their chronic stress in a series of tweets rather than one.
Besides, the aforementioned social interaction patterns of users in a period of time also contain
useful information for stress detection. Moreover, as aforementioned, the information in tweets is
limited and sparse. We need to integrate more complementary information around tweets, e.g.,
users’ social interactions with friends.
Login
Admin U ser
Che ck
yes no
View All Users Exists
Create Account
Add Stressed words
Follow Friends
Analyze Overall
S tress State Tweet Posts
Like,Comment,Retweet
End
UML DIAGRAMS
The UML is a very important part of developing objects oriented software and the software
development process. The UML uses mostly graphical notations to express the design of software
projects.
GOALS:
The Primary goals in the design of the UML are as follows:
1. Provide users a ready-to-use, expressive visual modeling Language so that they can develop
and exchange meaningful models.
2. Provide extendibility and specialization mechanisms to extend the core concepts.
3. Be independent of particular programming languages and development process.
4. Provide a formal basis for understanding the modeling language.
5. Encourage the growth of OO tools market.
6. Support higher level development concepts such as collaborations, frameworks, patterns and
components.
7. Integrate best practices.
Create an Account
Login
View Users
Admin
User Analyse User stress state
View Friends
Follow Friends
Like,Comment,Retweet
CLASS DIAGRAM:
In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of
static structure diagram that describes the structure of a system by showing the system's classes,
their attributes, operations (or methods), and the relationships among the classes. It explains which
class contains information.
Admin User
Username
Username
Password
Password EmailID
Login
Register
Login
SEQUENCE DIAGRAM:
A sequence diagram in Unified Modeling Language (UML) is a kind of interaction diagram that
shows how processes operate with one another and in what order. It is a construct of a Message
Sequence Chart. Sequence diagrams are sometimes called event diagrams, event scenarios, and
timing diagrams.
DataBase
User Admin
Create an Account
View Users
Analyze Overall
Stress State
View Friends
Follow Friends
New Tweets
Like,Comment,Retweet
ACTIVITY DIAGRAM:
Activity diagrams are graphical representations of workflows of stepwise activities and actions with
support for choice, iteration and concurrency. In the Unified Modeling Language, activity diagrams
can be used to describe the business and operational step-by-step workflows of components in a
system. An activity diagram shows the overall flow of control.
Login
Admin User
Check
Yes
UpdateStatus
6.1 Introduction
In this phase the designs are translated into code. Computer programs are written using a
conventional programming language or an application generator. Programming tools like
Compilers, Interpreters, and Debuggers are used to generate the code. Different high level
programming languages like C, C++, Pascal, Java, .Net are used for coding. With respect to the type
of application, the right programming language is chosen.
State
<%@page import="java.sql.*" %>
<%@page import="SourceCode.DbConnection" %>
<%
response.sendRedirect("state1.jsp");
bol = false;
break;
} else {
bol = true;
}
}
if (bol == true) {
response.sendRedirect("state2.jsp");
}
%>
state1
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.Connection"%>
<%@page import="SourceCode.DbConnection"%>
<%
Statement st = con.createStatement();
try {
int up = st.executeUpdate("update tweet set stress ='Stressd Tweet' where msg = '" + block + "'");
if (up != 0) {
response.sendRedirect("home.jsp?msg=success");
} else {
response.sendRedirect("home.jsp?msg=Failed");
EX.printStackTrace();
%>
state 2
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.Connection"%>
<%@page import="SourceCode.DbConnection"%>
<%
Statement st = con.createStatement();
try {
int up = st.executeUpdate("update tweet set stress ='Normal Tweet' where msg = '" + block + "'");
if (up != 0) {
response.sendRedirect("home.jsp?msg=success");
} else {
response.sendRedirect("home.jsp?msg=Failed");
EX.printStackTrace();
%>
SYSTEM TESTING
The purpose of testing is to discover errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the functionality
of components, sub assemblies, assemblies and/or a finished product It is the process of exercising
software with the intent of ensuring that the Software system meets its requirements and user
expectations and does not fail in an unacceptable manner. There are various types of test. Each test
type addresses a specific testing requirement.
TYPES OF TESTS
Unit testing
Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. All decision branches and
internal code flow should be validated. It is the testing of individual software units of the application
.it is done after the completion of an individual unit before integration. This is a structural testing,
that relies on knowledge of its construction and is invasive. Unit tests perform basic tests at
component level and test a specific business process, application, and/or system configuration. Unit
tests ensure that each unique path of a business process performs accurately to the documented
specifications and contains clearly defined inputs and expected results.
Integration testing
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic outcome
of screens or fields. Integration tests demonstrate that although the components were individually
satisfaction, as shown by successfully unit testing, the combination of components is correct and
consistent. Integration testing is specifically aimed at exposing the problems that arise from the
combination of components.
Functional test
Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user manuals.
System Test
System testing ensures that the entire integrated software system meets requirements. It tests a
configuration to ensure known and predictable results. An example of system testing is the
configuration oriented system integration test. System testing is based on process descriptions and
flows, emphasizing pre-driven process links and integration points.
Test cases
Fig: Tweet
Conclusion
We presented a framework for detecting user's psychological stress states from user's weekly social
media data, leveraging tweet's content as well as user's social interactions. Employing real-world
social media data as the basis, we studied the correlation between user's psychological stress states
and their social interaction behaviors. To fully leverage both content and social interaction
information of user’s tweets, we proposed a hybrid model which combines the factor graph model
(FGM) with a convolutional neural network (CNN).
REFERNECES
[1] Andrey Bogomolov, Bruno Lepri, Michela Ferron, Fabio Pianesi, and Alex Pentland. Daily
stress recognition from mobile phone data, weather conditions and individual traits. In ACM
International Conference on Multimedia, pages 477–486, 2014.
[3] Xiaojun Chang, Yi Yang, Alexander G Hauptmann, Eric P Xing, and Yao-Liang Yu. Semantic
concept discovery for large-scale zero-shot event detection. In Proceedings of International Joint
Conference on Artificial Intelligence, pages 2234–2240, 2015.
[4] Wanxiang Che, Zhenghua Li, and Ting Liu. Ltp: A chinese language technology platform. In
Proceedings of International Conference on Computational Linguistics, pages 13–16, 2010.
[5] Chih chung Chang and Chih-Jen Lin. Libsvm: a library for support vector machines. ACM
TRANSACTIONS ON INTELLIGENT SYSTEMS AND TECHNOLOGY, 2(3):389–396, 2001.
[6] Dan C Ciresan, Ueli Meier, Jonathan Masci, Luca Maria Gambardella, and J¨urgen
Schmidhuber. Flexible, high performance convolutional neural networks for image classification. In
Proceedings of International Joint Conference on Artificial Intelligence, pages 1237–1242, 2011.
[7] Sheldon Cohen and Thomas A. W. Stress, social support, and the buffering hypothesis.
Psychological Bulletin, 98(2):310–357, 1985.
[8] Glen Coppersmith, Craig Harman, and Mark Dredze. Measuring post traumatic stress disorder in
twitter. In Proceedings of the International Conference on Weblogs and Social Media, pages 579–
582, 2014.
[9] Rui Fan, Jichang Zhao, Yan Chen, and Ke Xu. Anger is more influential than joy: Sentiment
correlation in weibo. PLoS ONE, 2014.
[10] Zhanpeng Fang, Xinyu Zhou, Jie Tang, Wei Shao, A.C.M. Fong, Longjun Sun, Ying Ding,
Ling Zhou, , and Jarder Luo. Modeling paying behavior in game social networks. In In Proceedings
of the Twenty-Third Conference on Information and Knowledge Management (CIKM’14), pages
411–420, 2014.