• No results found

Terms analytics service for CouchDB: a document-based NoSQL. Richard K. Lomotey* and Ralph Deters

N/A
N/A
Protected

Academic year: 2021

Share "Terms analytics service for CouchDB: a document-based NoSQL. Richard K. Lomotey* and Ralph Deters"

Copied!
14
0
0

Loading.... (view fulltext now)

Full text

(1)

Copyright © 2015 Inderscience Enterprises Ltd.

Terms analytics service for CouchDB:

a document-based NoSQL

Richard K. Lomotey* and Ralph Deters

Department of Computer Science, University of Saskatchewan, Saskatoon, Canada

Email: [email protected] Email: [email protected] *Corresponding author

Abstract: The reality that the scientific, industry and research communities have to deal with is the potential of ‘Big Data’. The high-dimensional data (in digitised format) at our disposal can create opportunities such as discovery of new knowledge, creation of new online communities, and improvement on product and services delivery. The challenge however is that there are only few research, architectural designs and tools that can aid data mining processes from NoSQL databases. By focusing on terms and topic mining, this work proposes a data analytics framework that enables knowledge discovery through information retrieval and filtering from document-based NoSQL (specifically, CouchDB). The tool is algorithmically built and tested based on two methodologies namely: the inference-based apriori and the Baum-Welch algorithm. Preliminary test results of the proposed tool are also discussed based on the accuracy of each proposed algorithm where the inference-based apriori model performs better.

Keywords: data mining; NoSQL; Bayesian rule; unstructured data; apriori; hidden Markov model; HMM; Baum-Welch algorithm; analytics-as-a-service; AaaS.

Reference to this paper should be made as follows: Lomotey, R.K. and Deters, R. (2015) ‘Terms analytics service for CouchDB: a document-based NoSQL’, Int. J. Big Data Intelligence, Vol. 2, No. 1, pp.23–36.

Biographical notes: Richard K. Lomotey is currently pursuing his PhD in Computer Science at the University of Saskatchewan, Canada, under the supervision of Prof. Ralph Deters. He has been actively researching topics relating to mobile cloud computing and steps towards faster mobile query and search in today’s vast data economy (Big Data).

Ralph Deters received his PhD in Computer Science (1998) from the Federal Armed Forces University (Munich). He is currently a Professor in the Department of Computer Science at the University of Saskatchewan (Canada). His research focuses on mobile cloud computing and data management in services eco-systems.

This paper is a revised and expanded version of a paper entitled ‘Data mining from NoSQL document-append style storage’ presented at Proc. of the 2014 IEEE International Conference on Web Services (ICWS 2014), Anchorage, Alaska, USA, 27 June to 2 July 2014.

1 Introduction

Today, there is significant amount of digital data available that when processed can create several opportunities. This era has been described as ‘Big Data’. In Zikopoulos et al. (2012) and Berman (2013), Big Data is explained within the concept of the 3V model. In this work, the model is extended to the 5V model which represents velocity, volume, variety, veracity, and value. velocity – the stream

of digital content is constantly changing from multiple data points, volume – large quantity of data, variety – the data is heterogeneous since it includes content in/for traditional databases, multimedia, documents, and complex records, veracity – the separation of irrelevant and noise from the data source, and value – the cost of the data. The concept is graphically illustrated in Figure 1.

The ‘variety’ property creates the need to adopt a new style of data storage which deviates from

(2)

traditional relational database management systems (RDBMS). The new style of storage is the NoSQL (http://nosql-database.org) database that can accommodate structured, semi-structured, and unstructured data. There are several types of NoSQL storages such as multimodal databases, graph databases, object databases, and so on. In this work, we shall focus on the document-style NoSQL storage. This style of storage supports semi-structured data and relies on the notion of keys that describe unique documents for retrieval. The concept of map/reduce can be employed to query the database rather than SQL statements and like tables in RDBMS, the document-based NoSQL relies on documents. In this work, we shall employ the CouchDB storage as a use case. Furthermore, this type of NoSQL can be interacted with through HTTP operations.

While enterprises found the NoSQL storage fairly easy for adoption, the challenge has to do with the data mining from such data stores. The concept of storing the data as JSON and/or XML means that tools for mining strictly structured data (e.g., from SQL) cannot be directly applied. Also, textual mining tools such as web crawlers, document readers, image analysers, etc., also have their limitations since the data is in pile of layered documents and not in a flat database. Thus, there is the need to develop efficient data mining tools that can be applicable in the domain of the document-based NoSQL.

In this paper, we discuss a terms analytics platform that is a typical software-as-a-service that can be employed for terms mining. The platform has a process flow that includes artefact specification, semantic definition, search algorithm application, tagging, filtering, and clustering. Two algorithms are designed following the inference-based apriori algorithm (which also has a Bayesian component) and the Baum-Welch algorithm which is an extension on the hidden Markov model (HMM). The preliminary

experiments show that the latter algorithm is more accurate in terms of the terms analytics.

The remaining sections of the work are structured as follows. Section 2 reviews some works on unstructured data mining and NoSQL storages, Section 3 describes our proposed terms mining/search tool from the architectural perspective, Section 4 details the flow design of the proposed tool, Section 5 describes the adapted methodologies for the unstructured data mining in our work, Section 6 reports the preliminary evaluation of the tool and the paper concludes in Section 7 with our findings and future work.

2 Background works

NoSQL data stores support structured, semi-structured, and unstructured data (Rupanagunta et al., 2012). Unstructured data is characterised as:

multiple data format: the data is represented in varying formats (documents, multimedia, e-mails, blogs, websites, textual contents, etc.)

no structure/schema: the data has no specific structure because there is no standardisation or constraints placed on content generation

multiple sources: the data is from diverse sources (e.g., social media, data providers such as Salesforce.com, mobile apps, sensors, etc.) • varying API types: multiple APIs are required to

aggregate data from the multiple sources; and the APIs are not standardised neither do they have common SLAs.

(3)

2.1 Document-based NoSQL7

Several NoSQL storages exist nowadays such as the document-based NoSQL that supports textual and file attachments (e.g., CouchDB), wide-column storages (e.g., Hadoop, HBase), graph-based storages (Neo4J, InfoGrid), and so on. While many of the ongoing works on Big Data and unstructured data mining have targeted Hadoop and its family line of storage, there are few works on the document storage front. As of the time of writing, we could not find any tool that is aimed at the document storage style. Our work will therefore explore this option where CouchDB will be our use case environment.

The storage allows data to be stored in a JSON format and relies on IDs of documents like keys in RDBMS. Figure 2 illustrates the representation of relational database being translated (on the right side) into a JSON format (on the right side) for document-style NoSQL such as CouchDB. Furthermore, we have provided Figure 3 which illustrates a typical CouchDB data storage and how it can be accessed via the browser.

The interaction with the storage follows the REST standard where the HTTP verbs are fully employed. The CRUD operation can be performed using the respective verbs such as POST, GET, PUT, and DELETE. Each of the dataset is stored in individual documents (identical to tables in RDBMS) and several documents can be stored in one database. Each document is uniquely identified by an identifier which can be used to access the document over a hyperlink. In order to query multiple documents, the MapReduce methodology has to be adopted.

While the underlying technology on which document-style database are built follows the web standard, performing data mining will take different dimensions. Web data mining is done using the web crawler which relies on the HTML tags to interpret data blocks (i.e., content) on a web page. The anchor tag and href attributes also aid the crawler to go to other interconnected pages. The document-style storage however does not have tags; rather, its text-based that follows the JSON standard as shown in Figure 3. Moreover, RDBMS specific data mining tools are not designed for textual mining and a storage facility such as CouchDB which allows file attachments complicates the issue. This creates the need to research on how to perform data mining and knowledge discovery from such storage. Thus, our major goal in this paper is to research and design a data analytics tool that targets the document-style NoSQL. However, to achieve this goal, we need to explore the second major aspect of the work, which is textual and unstructured data mining.

2.2 Terms mining

Without data mining, we cannot deduce any meaning out of the high-dimensional data at our disposal. As already posited, existing data mining techniques that are well-advanced have been designed to work either with schema-oriented databases which are structured (Kuonen, 2003) or web crawlers. To enhance the data mining process, researchers are exploring the best methodologies that can aid the unstructured data mining process, especially, within the context of textual data mining.

Figure 2 The representation of RDBMS (right side) in a document-oriented NoSQL (left side)

(4)

Table 1 Text-based data mining requirements and proposed techniques Information

extraction

Association

rules Topics Terms

Document clustering Document summarisation Re-usable dictionaries Goal Data retrieval,

KDD process Trend discovery in text, document or file Topic recommendation Establish associative relationships between terms Organise documents into sub-groups with closer identity Noise filtering in large documents For knowledge collaboration and sharing Data representation Long or short text, semantics and ontologies, keywords Keywords, long or short sentences Keywords,

lexical chaining Keywords

Data, documents Terms, topics, documents Words, sentences Natural language processing Feature

extraction Keyword extraction Lexical chaining Lemmas, parts-of-speech

Feature

extraction Lexical chaining Feature extraction Output Documents (structured or semi-structured) Visualisation, summary report

Topic linkages Visualisation, crawler depth

Visualisation Visualisation, summery report

Summary report Techniques Community data

mining, tagging, normalisation of data, tokenising, entity detection Ontologies, semantics, linguistics Publish/ subscribe, topics- associations-occurrences Linguistic preprocessing, term generation K-means clustering, hierarchical clustering Document structure analysis, document classification Annotations, tagging

Search space Document, files, database Document, files, database Document, files, databases Topics vector space Documents, databases Databases, sets of documents Databases, sets of documents Evaluation

metrics Similarity and relatedness of documents, sentences and keywords Similarity, mapping, cooccurrence of features, correlations Associations, similarity, sensitivity, specificity Frequency of terms, frequency variations Sensitivity, specificity, balanced iterative reducing and clustering (BIRCH) Transition and preceding matrix, audit trail Word extensibility Challenges and future directions Lack of research

on data pedigree Applies varying approaches to different data sources, e.g., relational, spatial, and transactional data stores Identification of topics of interest may be challenging Community based so cross-domain adoption is challenging Can be resource intensive therefore needs research on parallelisation Not much is available on data pedigree Challenges with dictionary adaptation to new words

Source: Lomotey and Deters (2014)

As a result, we have witnessed some methodologies such as: information retrieval (IR) algorithms based on templates (Hsu and Yih, 1997), association rules (Delgado et al., 2002; Zhao and Bhowmick, 2003), topic tracking and topic maps (Abramowicz et al., 2003/2004), term crawling (terms) (Janet and Reddy, 2011; Feldman et al., 1998), document clustering (Han et al., 2010), document summarisation (Dey and Haque, 2009), Helmholtz search principle (Balinsky et al., 2010), re-usable dictionaries (Godbole et al., 2010), and so on.

For brevity, Table 1 is provided that gives an overview of the area including unexplored areas. The importance of analytics is also highlighted.

Term crawling aims at indicating the relevance of information gathered in an unstructured document by

showing the interdependencies between the terms. The work by Feldman et al. (1998) extended on the knowledge discovery in databases (KDD) by shifting from topic tracking and word tagging to term identification in unstructured documents. The authors push for term normalisation based on lemmas with corresponding part-of-speech tags such as stock/N, market/N, annual/Adj, interest/N, and rate/N where N is a noun and Adj is an adjective. A proposal for term extraction module is put across which is primarily responsible for the labelling of extracted terms from a particular textual document. Overall, the term extraction module performs linguistic preprocessing, term generation, and term filtering. What is also important to highlight in the work of Feldman et al. (1998) is that, the authors provide a score test based on

(5)

relevance in the document using the following techniques: deviation-based approach – calculate the frequency of a term in the document based on the relative standard deviation; statistical significance approach – to test the significance of the relative frequency variation of a term; and IR approach – using the maximal term frequency – inverse document frequency (tf-idf) to assign a score for IR. The work further explores the option of building a taxonomy constructor based on terms. The use of taxonomy constructors facilitates the search for specified terms which have association rules in an optimal time rather than searching through an entire document.

2.3 AaaS and unstructured data mining

Previous researchers have identified analytics-as-a-service (AaaS) as an emerging area (IBM Research; Sun et al., 2012; Deepak et al., 2012). There are companies that are also developing AaaS-based infrastructures such as EMC (http://www.emc.com/collateral/white-papers/h11259-emc-accelerates-journey-big-data-ba-wp.pdf) and SAS (http://www.sas.com/offices/europe/uk/resources/brochure/a aas_research_brief.pdf). Furthermore, there are ongoing works on improving existing tools for unstructured data mining such as SPSS, R, SAS, Cluto, and WEKA.

Liu and Peng (2013) argue that unstructured data mining can be achieved through digital feature extraction. Their technique is tested in a university curriculum design scenario. The authors propose feature techniques based on

colour feature, texture feature, shape feature, and sport feature.

Ziegler et al. (2008) explored the area of unstructured data mining by focusing on textual customer feedback. The authors propose language models and treemap visualisation techniques to present meaningful information from the data debris. The data however is stored in an RDBMS system. But the authors explored textual mining approaches such as clustering and term weighting.

Other works that have contributed to the area of textual mining are:Ticom et al. (2007) – focusing on textual mining from labour data, and AUDR (Liu et al., 2011) which is designed as unstructured data repository for efficient data mining. There are other useful sources that we recommend for further reading such as Wu and Hong (2014), Esteves et al. (2014), Mdhaffar et al. (2014), Lomotey and Deters (2013b) and Zulkernine et al. (2013).

3 The generic architecture

The generic architectural design is illustrated in Figure 4. This captures the users – who are the primary healthcare data consumers, the NoSQL data storages, and the developed terms analytics. This work details the algorithmic design of the latter component but for clarity, a short description of the entire workings of the architecture is provided.

(6)

The users represent both the data collection and data consumer points. By data collection, we mean the point where data is collected from patients either through their visits and/or other forms of submissions. The data consumers are those that are the healthcare practitioners who are interested in the knowledge discovery in the data through unstructured data mining techniques. Our work is in collaboration with the data consumers since the hospital facility keeps collecting data. It is important to state that the medical domain has regulations on data collection, storage, analysis, disclosure, privacy and protection. Though the architecture highlights this fact, regulations are outside the scope of this paper.

The data is stored in NoSQL storages across several data centres so the sources of the data have to be specified in the initial configurations of the terms analytics service.

The developed terms analytics service is an application service so it can be hosted in an infrastructure as a service (IaaS) environment. Next, the internal flow of the terms analytics tool is described.

4 The flow design of the terms analytic tool The entire process flow of the analytics layer is illustrated in Figure 5.

The users start from Step 1 where they are presented with a dashboard view to interact with the system. The dashboard enables the user to enter the topics and terms to be mined (i.e., the search artefact). This layer is designed to be deployed on heterogeneous devices such as mobile devices, and desktop (including browser).

When the search term is specified from the input layer, the request is sent as to the entry point on the analytics layer which is designated as the request parser. Furthermore, the user has to specify the link to the data source (i.e., the NoSQL storage) in order to facilitate the request parser to guarantee that the search can be carried out. Without the specification of the link (which must be a URL over an HTTP protocol), the system will not perform the data extraction task. Once the initial requirements are met, the search artefact is sent to Step 2, which is the semantic engine. The initial task at this layer is artefact extraction definition. The importance of this component is to differentiate topics from terms, and to further determine the exact requirement of the user. The successful decoding of the search term activates the semantic engine where the analytics framework tries to understand the terms to be extracted.

(7)

Initially, we consider the artefact specified by the user as topics. This aids us to do the traditional IR task which focuses on extracting the exact artefacts specified by the user. This approach also suggests that when a user specifies an artefact, we look for the exact keyword. However, to perform intelligent terms analytics, there is the need to accommodate the concepts of synonyms, antonyms, parts of speech, and lemmatisation as proposed by Zhao and Bhowmick (2003). Thus, the topics are sent to a topic parser to check the meaning of the specified artefact.There are two layers that are designed to check the meanings of the artefacts, the Dictionary and the Thesaurus. The dictionary contains standard keywords, their meanings, and their antonyms. The thesaurus contains jargons that otherwise are not found in the standard dictionary.

This is important for situations where the analytics is done in certain technical domains such as the medical field where most of the keywords are not in the standard dictionary. The specific domain that is adopting the framework for the analytics task can update the thesaurus. This further makes the proposed tool agile for the adoption by any domain. After the topic parser reviews the artefact by looking through the thesaurus and dictionary, then the topics mapping task is enabled. The mapping tasks include the organisation of the specified artefact and possible synonyms as may be found in the semantic engine. The expected artefact and the newly found keywords from the dictionary and the thesaurus are categorised as terms formation. For instance, when searching for the artefact haemophilia, the terms formation can be formulated as:

{‘Hemophilia’: ‘Bleeding Disorder’} {‘Hemophilia’: ‘Blood Clotting’} {‘Hemophilia’: ‘Pseudohemophilia’} {‘Hemophilia’: ‘Hemogenia’}

The successful formation of the terms leads to the activation of Step 3, the search algorithm component. The algorithms we proposed are the inference-based apriori and the Baum-Welch that will be discussed in great depth in the next section. The search algorithm component is also linked to the main data source where the data is stored. Using the CouchDB framework for instance, the data source can be accessible over REST API. Primarily, the search algorithm interfaces the data source through the HTTP GET method. The data source which is document style stores the data following the JSON format. Also, the map/reduce feature is employed to query multiple documents within a single database. Each of the Ids is a specific document that contains JSON data. In our framework, the documents are extracted and written in a flat text file. This aids us to easily read through the entire storage repository regardless of the number of documents.

The extracted artefacts, Step 4, are then reviewed to determine the association between the terms. We apply association rules based on the similarities and diversity of the extracted terms. Then, we employ the filtering methodology to remove the pollutants (or noise) from the

data. In most instances, the extracted artefacts are bound to contain keywords that appear valuable but are not actually relevant to the term mining tasks (e.g., antonyms, or similar written words but mean different things). The next task is tagging, which is applied to the filtered data. Tagging is employed to determine the existing relationship between the filtered data and how they are connected to the user specified artefact. At this stage, the serialiser component checks the format of the categorised data for visual presentation. The data must be modelled in JSON format before it can be parsed to the visual display. Once the data clustering is done in JSON, the output is sent to Step 5 which is the visualisation layer as evidenced in Appendix 1. The user can then see the output of the result on the dashboard.

5 The search algorithms

5.1 Apriori algorithm

First, the apriori methodology (Lomotey and Deters, 2014) is proposed because we anticipate it fits well with our goal. The algorithm relies on the search history of the system users to filter the search result. From the specified terms to be extracted, we can establish the following base relationships:

K Dic

T Db

⊂ ⊂

To mean that the specified keyword (K) is a subset of the vocabularies in the dictionary/thesaurus (Dic), and the constructed terms (T) from the semantic engine is a subset of the dataset in the NoSQL (Db). In a situation where there are no vocabularies similar (i.e., absence of synonyms or antonyms) in the Dic, then K = T. Also, it is practical to get into situations where K is not found at all in the dictionary and we treat this case also as K = T. The characteristics of T can be defined as follows:

{ 1, 2, 3, 4, , }

T = t t t ttn

To mean that T can contain a list of several artefacts, t, that are related to the specified term (described earlier as topics) and in the least, T ={t1} to mean that the specified term has no related keywords. Thus, T = ∅is not supported because this is an indirect way of saying that there is nothing specified to be searched. The existence of T in the data source is assigned a probability of 1 and the non-existence of T in the data source is represented as 0.

The proposed system has a search log that keeps the record of the frequency of the keywords being searched. This is a disk storage that can grow in size so we use ranking based on the frequency of hits to prioritise which records to keep. When the storage is growing out of proportion, less frequently searched keywords (i.e., less prioritised keywords) are deleted.

Based on our goal regarding terms mining and organisation, we explore the efficiency of the apriori model. However, our apriori model is a unique algorithm that

(8)

combines two algorithms on association rule and Bayesian inference. First, the association rule is designed so that we can determine the presence of frequency of terms, T in the database Db. Since the apriori model is designed to naturally align with transactional databases, we considered every search within a document as a transaction as well as cross documents. Furthermore, we model every pile of document as a row, identical to RDBMS systems.

In the association rule, the proportion of documents (i.e., transactions) in the entire database that contain T, known as the support, and denoted as supp(T) can be defined simply as:

Number of documents containing ( )

Total number of documents T supp T =

The support methodology enables the proposed tool to crawl the entire Db (i.e., every level of append document) to determine the frequency of occurrences of T. Furthermore, there is the need to determine the probability that within the set of term T of keywords, t1, t2, …, tn, the occurrence of a keyword and other keywords truly exists. This is known as confidence and denoted conf(t1 ⇒t2), and it is relevant for the situations when T ≠{t1}. This is represented as:

( 1 2) ( 1 2) ( 1) supp t t conf t t supp t ∧ ⇒ =

In this case, the confidence is calculated within the term set T rather than the entire Db. The performance of the model is then measured as the ratio of the target response and the average response. This is represented as:

( 1 2) ( 1 2) ( 1) ( 2) supp t t perf t t supp t supp t ∧ ⇒ = ⋅

The perf() function focuses on the individual keywords that form the set T. However, the same function is what is employed to determine the success ratio of terms being extracted from the entire Db. This is due to the fact that the keyword extraction is happening at two stages; looking for the appropriate associations between the keywords in the semantic engine and the existence of the keywords in the entire document Db.

The association rule as of now solves one part of the problem, which is the issue of the determination of the frequency of occurrence of terms. Also, we have found the relationships between the keywords that comprise the set of terms. The set of terms are basically the expected keyword, and other artefacts such as synonyms and antonyms that are found in the dictionary and/or thesaurus. In order to facilitate a reliable search based on reasoning, we explored the option of the inference rule. This is to aid us perform the data mining based on historical searches that have been tagged as success hits. Thus, the Bayesian inference is adopted based on the probability formula:

(

) (

p

( )

n

)

( )

p p n n P T T P T P T T P T ⋅ =

where Tp is the previous terms that return some acceptable result and Tn is the existence of new keywords in T that can affect the previous state. This is known as new evidence which is not used when performing the prior T. The evidence of the inference rule is then estimated based on the formula:

[

]

( | ) ( | ) ( | ) p T p T p d ∅ ∝ =

∅ ∅ ∝ ∅

We are able to re-calculate the new conditional probability (a.k.a., posterior probability) based on this new evidence as shown in the formula:

( | ) ( | ) ( | , ) ( | ) ( | ) ( | ) p T p p T p T p p T ∅ ∅ ∝ ∅ ∝ = ∝ ∅ ∅ ∝ ∝

where ∅ is a vector parameter of the keywords t in the set of T, ∝ is the parameter of the prior distribution that determines expected future searches. This is aimed at predicting future searches that will contain the same T or variations to T.

The combination of the association rule and the inference methodology in the design of the apriori model enhanced the accuracy of the search as evidenced in the experiments section.

5.2 The Baum-Welch algorithm

With the nature of document-based NoSQL, we anticipate that the Baum-Welch algorithm can also be a good fit for terms extraction. This algorithm is an extension on the HMM. Previously, Scheffer et al. (2001) attempted to use the HMM to solve textual mining tasks. Furthermore, we found the tutorial presented by Mukherjee and Mitra (2005) particular useful to model the HMM algorithm in Lomotey and Deters (2013a).

Proof: Given a term A in a particular NoSQL document (where a document is identical to tables in RDBMS systems), the conditional probability that the term or its dependency keywords B exist(s) in other append documents (since a single NoSQL database has several documents that are appended) can be expressed as:

(

)

( )

, | , A B i j A B B j f a b f f b =

However, the condition of the existence of terms can be independent and random which follows that:

(

)

( )

( )

| ,

A B i j A i B j

f a b = f a ×f b

Considering a sequence of reproducible terms and their dependencies, let us have a sequence of random variables A0, A1, , An having values in a set S = s1, s2, , sn. Then

the sequence is Markov Chain if ∀n ≥ 1, and j0, j1, ,

(9)

(

)

(

)

0 0 1 1 1 1 ,..., n n n n n n n n P A j A j A j P A j A j − − − − = = = = = =

The next step is to define an observable random process (ORP) which defines a finite state space of available number of documents (N) in the NoSQL, N = n1, , nK,

such that the two states S and N can contain the same or different number of tuple arguments. The condition that there will be an outcome E from the NoSQL is then defined as: , 1, 1 ( )J K j j k Outcome e k= = = where ej(k) ≥ 0 and 1 ( ) 1. K j k= e k =

The third property is the conditional independence (CI). The CI assumes that the outcomes are conditionally independent for the document state sequence. For a sequence of states j0, j1, , jn, the probability of the

sequence o0, o1, , on can be expressed as:

(

0 0 0 0

)

0 ,..., ,..., , ( ) l n n n n n j l P B o B o A j A j E e l = = = = = =

We then define a joint probability based on the terms and states o0, o1, …, on and j0, j1, …, jn as:

(

)

(

)

(

)

0 0 0 0 0 0 0 0 1 0 1 , , , , , ; , , (0) , , | , , , , , , , (0) (0) l( ) n n n n n n n n n j j l l l l P B o B o A j A j T E P B B A A E P a A T e l pj j π π π = = = … = = … = = … … × … = ×

×

The total sum of all possible documents in the NoSQL results into:

(

)

0 0 1 0 0 1 1 1 , , ; , , (0) ... (0) (0) ( ) l l l n n n J J j j j j j j j l P B B T E e p e l π π − = = = … =

∑ ∑

At this point, the HMM model is exponential so we have to improve on the algorithm in order to make the model linear. This is achieved by splitting the above equation into forward/backward recursion. From the last equation above, we can re-write a new equation as:

(

0 1

)

1 , , , ; ( ) ( ) J N n n n j L P B B B λ α j β j = = … =

×

The forward variable α is defined formally as:

(

0 0 1 1

)

( ) , , ,

n j P B o B o Bn o An n j

α = = = … = =

Consequently, the backward variable is defined as:

(

1 1

)

( ) , ,

n j P Bn on BN o AN N j

β = + = + … = =

From the two variables, the recursion relations can be written as:

(

)

(

)

| 1 1 | 1 1 ( ) ( ) J n i j j n i J n i j j n i j p e o j p e o α α + = + = × × ⎡ ⎤ =⎢ × ⎥× ⎢ ⎥ ⎣ ⎦

and

(

1

)

1 | 1 ( ) ( ) J n i n n i j i j e o i p β + β + = =

× ×

Since the two recursive equations have a computational complexity of O(n2), the model in a given state i at a

specified time t given a sequence of emitted terms o and a model λ can be formalised as:

(

| ,

)

( ) ( ) i t i t P A i o t α λ β = =

It is important to state that, the Baum-Welch algorithm aims at finding the maximum HMM parameter (ʘ) if the hidden Markov chain is defined as:

( , , )A Bπ =

:

From the forward and backward algorithms, we can calculate the temporary variables such that:

(

)

1 ( ) ( ) | , ( ) ( ) i i i t N j j j t t P A i B t t α β α β = ϒ = = =

:

To mean that the probability of being in state i (where identifiable terms are detected) at time t given observed sequence B and the parameters ʘ. Then,

(

1

)

( ) , | ,

ij t t

e t =P A =i A+ = j B :

To mean that theprobability of being in state i and j at times t and t + 1 respectively given the observed sequence B and parameters ʘ.

The two propositions can now aid us to update the temporary variables by moving to an updated state. In this case, the probability that we will find a set of individual terms later in the NoSQL can be defined. The expected number of transitions to get to the next identifiableterm is calculated as: 1 * 1 1 1 ( ) ( ) T ij t ij T i t e t t α − = − = = ϒ

where the number of observed states in i ranges from t = 1 to t = T – 1.

While the algorithm at this stage means iterations can be done from state i to itself, we do not permit it in our case. The algorithm therefore follows that states are changed from i to a new state j recursively every time. This is to

(10)

avoid delays in a search and/or infinite search within a particular document.

6 Evaluation

We considered two separate training datasets on Hemophilia and Psychiatry. The analytics part is deployed on an Amazon EC2 instance with the following specifications: Processor: Intel Xeon, CPU E5410 at 2.33 GHz, 2.41 GHz, RAM: 1.70 GB, System 32-bit operating system. The dashboard view is deployed on a personal computer with the following specifications: Windows 7 System 32, 4.12 3.98 GHz, 16 GB RAM, 1 TB HDD. The size of the training dataset containing the hemophilia-related record is one terabyte and the psychiatry-related data is ten terabyte. The dataset is spread across multiple NoSQL databases that are hosted on separate EC2 instances so that there is not so much latency experienced during the testing. The dictionary and thesaurus are populated with almost 6,000 medical jargons specific to Psychiatry and Hemophilia.

In Tables 2 and 3, we report the results of the experiment. The results of the apriori are initially published and reproduced from Lomotey and Deters (2014). The

following are four base factors that are measured: true positive (TP) – refers to the extraction of expected terms (also referred to as success ratio), false positive (FP) – refers to the extraction of the desired terms plus unwanted results, true negative (TN) – is when the term is not found because it does not exist in the NoSQL database, and false negative (FN) – is when the term could not be found but it exists in the data source. Appendix 2 provides the formalisms. To explain how the base factors are determined further to the reader, let’s consider the scenario. From Figure A1 in Appendix 1, the search term is ‘hemophilia’.

When the proposed analytics framework searches through the NoSQL records for this specified term and returns an output, we evaluate the TP based on how many returned artefacts are related and/or likely to define ‘Hemophilia’. In a situation where the framework suggests a keyword as related to hemophilia but in reality that is not the case or that keyword is unwanted, then it becomes FP.

Furthermore, the true negative occurs when a specified term returns non-related searches or ignores them without having any effect on the search. FN however is all cases where the framework says ‘hemophilia’ cannot be defined, or ignored the related disease, or types.

Table 2 Terabyte JSON text on hemophilia-related records in CouchD

500K artefacts 1 Million artefacts 1.5 Million artefacts 2 Million artefacts Baum-Welch Apriori Baum-Welch Apriori Baum-Welch Apriori Baum-Welch Apriori

True positive 86.31% 93.14% 84.22% 93.00% 80.76% 92.67% 79.88% 92.03% False positive 16.09% 7.86% 24.56% 9.43% 36.87% 9.85% 36.83% 10.21% True negative 93.01% 99.21% 92.84% 99.23% 91.43% 99.12% 90.64% 99.32% False negative 8.65% 4.34% 6.33% 4.43% 9.81% 4.98% 12.32% 5.06% Precision 84.29% 92.22% 77.42% 90.79% 68.66% 90.39% 68.44% 90.01% Recall (sensitivity) 90.89% 95.55% 93.01% 95.45% 89.17% 94.90% 86.64% 94.79% Specificity 85.25% 92.66% 79.08% 91.32% 71.26% 90.96% 71.11% 90.68% Accuracy 87.88% 94.04% 85.15% 93.27% 78.67% 92.82% 77.63% 92.61% F1 score 87.46% 93.85% 84.50% 93.07% 77.58% 92.59% 76.47% 92.34%

Table 3 Ten terabyte JSON text on psychiatry-related records in CouchDB

500 K artefacts 1 Million artefacts 1.5 Million artefacts 2 Million artefacts Baum-Welch Apriori Baum-Welch Apriori Baum-Welch Apriori Baum-Welch Apriori

True positive 82.49% 91.87% 81.63% 92.06% 78.40% 90.33% 76.01% 90.14% False positive 21.84% 7.52% 27.78% 8.46% 33.22% 9.08% 37.11% 9.20% True negative 94.74% 99.66% 93.46% 99.01% 92.98% 98.89% 92.33% 98.99% False negative 7.66% 4.50% 14.81% 5.02% 15.99% 5.90% 18.86% 7.49% Precision 79.07% 92.43% 74.61% 91.58% 70.24% 90.87% 67.19% 90.74% Recall (sensitivity) 91.50% 95.33% 84.64% 94.83% 83.06% 93.87% 80.12% 92.33% Specificity 81.27% 92.98% 77.09% 92.13% 73.68% 91.59% 71.33% 91.50% Accuracy 85.73% 94.09% 80.43% 93.41% 77.69% 92.66% 75.05% 91.89% F1 score 84.83% 93.86% 79.31% 93.18% 76.11% 92.34% 73.09% 91.53%

(11)

The four base factors are extended to calculate the precision, recall, specificity, accuracy, and F1 score

(the formalisms are shown in Table A1 of Appendix 2). For every dataset, we analysed the extracted terms (artefacts) in groups of 500,000, 1 million, 1.5 million, and 2 million. The extraction is grouped so that we can further observe the behaviour of the model with increasing dataset and diversity.

The overall accuracy of the proposed apriori model is 93.11% while the Baum-Welch algorithm is 81.03%. The overall accuracy is calculated as the average of the accuracy indices (as shown in both Tables 2 and 3) for each of the algorithms. This is to report the general outlook of both algorithms. However, in order to understand this result, the various factors are observed critically. It is also important to state that we observed the same behaviour of the system across the two datasets. This means that the framework is not limited by the domain of the data. Rather, the observed characteristics are as a result of the outcome of the underlying techniques on which the terms analytics framework is built.

Firstly, the TP results are observed as graphed in Figure 6 for both datasets. We realised that the apriori methodology returned identical TP values (i.e., consistent TP) across the set of grouped artefacts (from 500K to 2M). The reason being that the prior knowledge that the algorithm relies on to determine the set of associated

terms is not dependent on the size of the dataset. The Baum-Welch algorithm however shows decreasing TP value as the number of artefacts increases. In the analysis, we realised this is due to the fact that the algorithm relies on a probability (state emission) to determine set of possible terms. Assuming an initial state is wrongly classified, the error transcends into all other subsequent states. While our initial assumption is that, the conditional independent property will solve this issue that is not the case.

Next, we looked at the accuracy ratio for both algorithms (Figure 7). This is to enable us look at the accuracy of both algorithms across the entire datasets. Again, the apriori methodology shows high accuracy ratio for every dataset but the Baum-Welch algorithm has significantly decreased accuracy index as the data increases. At this point, we can assume that the accuracy of the Baum-Welch algorithm is affected by the fact that it does not have stable TP results. However, accuracy is dependent on other factors including the false positive and false negative indices (Table 3). The accuracy of a system is enhanced when the level of falsehood is minimised. In this work, we shall define falsehood (or, false perception) as the sum of the false positive and false negative. Formally,

Falsehood=FN FP+

Figure 6 (a) TP plot for hemophilia(b) TP plot for psychiatry (see online version for colours)

(a) (b)

Figure 7 (a) Accuracy plot for hemophilia(b) Accuracy plot for psychiatry (see online version for colours)

(12)

Figure 8 (a) Falsehood index plot for hemophilia(b) Falsehood index plot for psychiatry (see online version for colours)

(a) (b)

So, to determine what actually account for the accuracy in both algorithms, we analysed the falsehood of each algorithm. This is shown in Figure 8. We realised that the false perception in the case of the Baum-Welch algorithm is significantly higher than in the case of the apriori. When the extracted artefacts are at 500K, the percentage increase in the level falsehood between the apriori and the Baum-Welch is 102.79%. As the TP value of the latter algorithm decreases with increasing datasets, the false perception also increases with increasing datasets. For instance, the percentage increase in falsehood between the apriori and Baum-Welch at 1M, 1.5M, and 2M extracted artefact points are 122.87%, 214.77%, and 221.87% respectively.

Clearly, the problem with the Baum-Welch algorithm is not just about ensuring that the TP value stabilises or increases, but also the false perception of terms (i.e., level of falsehood) must be decreased.

In the current deployed architecture, we use both algorithms even though decisions are made based on the apriori model.

7 Summary and conclusions

Big Data has several facets and can be viewed within the 5V model (i.e., variety, volume, velocity, value, veracity). When it comes to variety, the idea is that, most of the data seen today are from multiple sources, and they are structured, semi-structured, and unstructured. Reports suggest that 80% of today’s digital content is unstructured. This has propelled enterprises to adopt NoSQL systems to store the high-dimensional data.

The challenge however is that, NoSQL systems deviate from SQL and structured data stores at the query and schema levels, which mean that existing mining tools and even algorithms that focus on the structured data store need to be improved. This coupled with other factors (e.g., data volume) have created the need to explore modernised options on data analytics.

While analytics is a huge area, we focus on designing an analytics framework for terms mining in document-based

NoSQL. Our proposed system is designed as a software application service that can be deployed on a virtual IaaS layer. The data source only needs to be specified through a URL.

Algorithmically, the proposed framework runs on the apriori and the Baum-Welch methodologies. The framework is tested using two separate training datasets from the medical domain (on psychiatry and hemophilia). The results show that the apriori algorithm shows higher accuracy than the Baum-Welch algorithm. In summary, the work accomplishes the following:

• we designed terms analytics tool for the

document-based NoSQL system (e.g., CouchDB) • proposed inference-based apriori technique that has a

Bayesian component

• proved that the proposed apriori algorithm returns higher accuracy of extracted terms than the Baum-Welch algorithm

• we also observed that the Baum-Welch algorithm is not just having deceasing TP as the dataset increases, but the level of falsehood increases as the data increases. This latter point is a good observation for the research community to explore further to see whether there can be improvements. Furthermore, the future outlook of this work will focus on the term extraction duration for the proposed system.

Acknowledgements

Thanks to the reviewers and the entire editorial team.

References

Abramowicz, W., Kaczmarek, T. and Kowalkiewicz, M. (2003/2004) ‘Supporting topic map creation using data mining techniques’, Australasian Journal of Information Systems, Vol. 11, No. 1, pp.63–78.

(13)

Balinsky, A., Balinsky, H. and Simske, S. (2010) On the Helmholtz Principle for Data Mining, Hewlett-Packard Development Company, L.P.

Berman, J. (2013) Principles of Big Data Preparing, Sharing and Analyzing Complex Information, Paperback, 288 pp., Published: May 2013, Imprint: Morgan Kaufmann, ISBN: 978-0-12-404576-7.

Deepak, P., Deshpande, P.M. and Murthy, K. (2012) ‘Configurable and extensible multi-flows for providing analytics as a service on the cloud’, Annual SRII Global Conference (SRII), pp.1–10, 24–27 July, doi: 10.1109/SRII.2012.11.

Delgado, M., Martín-Bautista, M., Sánchez, D. and Vila, M. (2002) ‘Mining text data: special features and patterns’, Pattern Detection and Discovery, Lecture Notes in Computer Science, Vol. 2447, pp.175–186, doi: 10.1007/3-540-45728-3_11.

Dey, L. and Haque, S.K.M. (2009) ‘Studying the effects of noisy text on text mining applications’, in Proceedings of the Third Workshop on Analytics for Noisy Unstructured Text Data (AND ‘09), ACM, New York, NY, USA, pp.107–114. EMC, ‘EMC accelerates journey to Big Data with business

analytics-as-a-service’ [online]

http://www.emc.com/collateral/white-papers/h11259-emc-accelerates-journey-big-data-ba-wp.pdf.

Esteves, R.M., Hacker, T. and Rong, C. (2014) ‘A new approach for accurate distributed cluster analysis for Big Data: competitive K-means’, Int. J. Big Data Intelligence, Vol. 1, Nos. 1/2, pp.50–64.

Feldman, R., Fresko, M., Hirsh, H., Aumann, Y., Liphstat, O., Schler, Y. and Rajman, M. (1998) ‘Knowledge management: a text mining approach’, Proc. of the 2nd Int. Conf. on Practical Aspects of Knowledge Management (PAKM98), Basel, Switzerland, 29–30 October.

Godbole, S., Bhattacharya, I., Gupta, A. and Verma, A. (2010) ‘Building re-usable dictionary repositories for real-world text mining’, in Proceedings of the 19th ACM International Conference on Information and Knowledge Management (CIKM ‘10), ACM, New York, NY, USA, pp.1189–1198. Han, L., Suzek, T.O., Wang, Y. and Bryant, S.H. (2010) ‘The

text-mining based PubChem bioassay neighboring analysis’, BMC Bioinformatics, Vol. 11, No. 549, doi:10.1186/1471-2105-11-549 [online]

http://www.biomedcentral.com/1471-2105/11/549 (accessed 15 June 2014).

Hsu, J.Y. and Yih, W. (1997) Template-Based Information Mining from HTML Documents, American Association for Artificial Intelligence, July.

IBM Research, ‘Analytics-as-a-service platform’ [online] http://researcher.ibm.com/researcher/view_project.php?id=39 92.

Janet, B. and Reddy, A.V. (2011) ‘Cube index for unstructured text analysis and mining’, in Proceedings of the International Conference on Communication, Computing & Security (ICCCS ‘11), ACM, New York, NY, USA, pp.397–402. Kuonen, D. (2003) ‘Challenges in bioinformatics for statistical

data miners’, Bulletin of the Swiss Statistical Society, October, Vol. 46, pp.10–17.

Liu, Q. and Peng, Y. (2013) ‘A method of unstructured information process in computer teaching evaluation system based on data mining technology’, Communication Systems and Network Technologies (CSNT), 2013 International Conference on, pp.688–692, 6–8 April, doi: 10.1109/CSNT.2013.147.

Liu, X., Lang, B., Yu, W., Luo, J. and Huang, L. (2011) ‘AUDR: an advanced unstructured data repository’, Pervasive Computing and Applications (ICPCA), 6th International Conference on, pp.462–469, 26–28 October, doi: 10.1109/ICPCA.2011.6106548.

Lomotey, R.K. and Deters, R. (2013a) ‘Terms extraction from unstructured data silos’, Proc. of the 8th IEEE International Conference on System of Systems Engineering (SoSE), pp.19–24, 2–6 June, Maui, Hawaii, USA.

Lomotey, R.K. and Deters, R. (2013b) ‘RSenter: terms mining tool from unstructured data sources’, International Journal of Business Process Integration and Management (IJBPIM), Vol. 6, No. 4, pp.298–311.

Lomotey, R.K. and Deters, R. (2014) ‘Analytics-as-a-service framework for terms association mining in unstructured data’, International Journal of Business Process Integration and Management (IJBPIM), Vol. 7, No. 1, pp.49–61.

Mdhaffar, A., Halima, R.B., Jmaiel, M. and Freisleben, B. (2014) ‘D-CEP4CMA: a dynamic architecture for cloud performance monitoring and analysis via complex event processing’, Int. J. Big Data Intelligence, Vol. 1, Nos. 1/2, pp.89–102. Mukherjee, S. and Mitra, S.J. (2005) ‘Hidden Markov models,

grammars and biology: a tutorial’, Journal of Bioinformatics and Computational Biology, April, Vol. 3, No. 2, pp.491–526. NoSQL [online] http://nosql-database.org.

Rupanagunta, K., Zakkam, D. and Rao, H. (2012) ‘How to mine unstructured data’, Information Management [online] http://www.information-management.com/newsletters/data-mining-unstructured-big-data-youtube--10022781-1.html (accessed 29 June 2012).

SAS, ‘Analytics as a service: customer experiences’ [online] http://www.sas.com/offices/europe/uk/resources/brochure/aaa s_research_brief.pdf.

Scheffer, T., Decomain, C. and Wrobel, S. (2001) ‘Mining the web with active hidden Markov models’, Data Mining, ICDM 2001, Proceedings IEEE International Conference on, pp.645–646, doi: 10.1109/ICDM.2001.989591.

Sun, X., Gao, B., Fan, L. and An, W. (2012) ‘A cost-effective approach to delivering analytics as a service’, IEEE 19th International Conference on Web Services (ICWS 2012), pp.512–519, 24–29 June, doi: 10.1109/ICWS.2012.79. Ticom, A.A.M., de Souza, B. and de Lima, L.P. (2007) ‘Text

mining and expert systems applied in labor laws’, Intelligent Systems Design and Applications, ISDA, Seventh International Conference on, pp.788–792, 20–24 October, doi: 10.1109/ISDA.2007.32.

Wu, J. and Hong, B. (2014) ‘Multi-source streaming-based data accesses for MapReduce systems’, Int. J. Big Data Intelligence, Vol. 1, Nos. 1/2, pp.36–49.

Zhao, Q. and Bhowmick, S.S. (2003) Association Rule Mining: A Survey, Technical Report, CAIS, Nanyang Technological University, Singapore, No. 2003116.

Ziegler, C-N., Skubacz, M. and Viermetz, M. (2008) ‘Mining and exploring unstructured customer feedback data using language models and treemap visualizations’, Web Intelligence and Intelligent Agent Technology, WI-IAT ’08, IEEE/WIC/ACM International Conference on, Vol. 1, pp.932–937, 9–12 December, doi: 10.1109/WIIAT.2008.69.

(14)

Zikopoulos, P.C., Eaton, C., DeRoos, D., Deutsch, T. and Lapis, G. (2012) Understanding Big Data: Analytics for Enterprise Class Hadoop and Streaming Data, McGraw-Hill Companies [online]

https://www.ibm.com/developerworks/community/wikis/hom e?lang=en#!/wiki/Big%20Data%20University/page/FREE%2 0ebook%20-%20Understanding%20Big%20Data (accessed 15 June 2014).

Zulkernine, F., Martin, P., Ying, Z., Bauer, M., Gwadry-Sridhar, F. and Aboulnaga, A. (2013) ‘Towards cloud-based analytics-as-a-service (CLAaaS) for Big Data analytics in the cloud’, Big Data (BigData Congress), IEEE International Congress on, pp.62–69, June 27–July 2.

Appendix 1

Figure A1 Classifications of psychiatry-related issues using our analytics tool (see online version for colours)

Appendix 2

Formalisms of the extended base factors

Table A1 Quality factors

Precision TP TP FP+ Recall (sensitivity) TP TP FN+ Specificity TN TN FP+ Accuracy TP TN TP TN FP FN + + + + F1 score 2 Precision Recall Precision Recall ∗ ∗ +

References

Related documents

(a) Garnet porphyroclasts surrounded by a fine-grained matrix of Cpx + Amp (Area 3); (b) fractured garnet porphyroclast with fractures filled by a fine-grained matrix composed of Cpx

His research interests include: methods and tools for inventive design (scientific formalization and evolution of methods for inventive problem solving, modelling and analysis of

 The MBA program has achieved recognition since 2009 by CONACYT (National Council of Science and Technology) under the National Program for Quality Graduate

Branding — The Lead Sponsor and Institutional Investor-Only Summit Supporters will be explicitly branded as the main supporters of the two-day event and the

Barcode technology provides more of a legacy solution for product monitoring, and is an optical machine- readable representation of data that is physically attached to a product

In continuation with our development of suitable methods for the determination of metals, especially in natural samples 16-22 , this paper describes a selective

One work in this series Positive Memories encouraged the viewer to touch and read the phrases on the vellum.. The piece consisted of a small stainless steel table on which a

Regardless of whether the adult offender is sentenced to probation, parole, community corrections, jail, or Department of Corrections, the offender will be required to sign