SlideShare a Scribd company logo
1 of 110
Download to read offline
School of Engineering
Implementation of Google Prediction API in the small re-
tail businesses based in the United Kingdom
Ivalina Ivanova
STUDENT NUMBER: 3419984
A dissertation submitted in partial fulfilment of the require-
ments for the degree of
BSc(Hons) Computer Systems Management
London South Bank University
August 2016
DECLARATION
This dissertation is my original work and has not been submitted elsewhere in fulfilment of the
requirements for this or any other award. Any sentences or passages taken from my previous
work or other people's work have been explicitly acknowledged by explicit referencing to au-
thor, source, and page(s). Any non-original illustrations are also referenced. I understand that
failure to do this amounts to plagiarism and will be considered grounds for failure in this dis-
sertation and the degree as a whole.
Ivalina Ivanova: _____________________________
ABSTRACT
The purpose of the project is to deliver clear examples of how the retail businesses in the United
Kingdom could be more competitive and how they can improve product sales by using
predictive analyses.
The aim of this project is achieved by using Google spreadsheet with embedded Prediction API
models which represent wine features such as the origin of the wine, type of grapes, year of
production, brand and wine prices, and AppSheet platform to develop the application. By using
the AppSheet software, I can convert my Google spreadsheet into a mobile app and deliver
clear results of how much could cost a bottle of wine from a given dataset by using predictive
analysis. The cost related to the wine features could be based on purchases made in any retail
shop.
The finished web application combines Google spreadsheet, Prediction API trained models and
represents outcomes of wine prices. Also, the small retail businesses are allowed to obtain
information about the possible prices of different wine products. By providing the previous
history related to the wine purchases and their prices associated with the wine features such as
the origin of the wine, type of grapes, year of production and brand the sellers can predict how
much it will cost to produce a bottle of wine in the future.
The conclusion from this investigation discovered that the implementation of the Google
Prediction API models could improve the business continuity, increase business profit and
create a competitive environment for the small retail businesses in the United Kingdom.
ACKNOWLEDGEMENT
The completion of this document has been one of the most substantial academic challenges
throughout my entire course. Without the provision and the help of the following participants
this will be not conceivable.
I would like to express a sincere gratefulness to my supervisor, Paul Carden, who agreed to
undertake the role as my supervisor. His guidance and knowledge have encouraged me to de-
liver the best possible outcome of the research paper.
I would like to show gratitude the developers of Prediction API, Google, and AppSheet for
giving me access to a range of fantastic websites, including all the information that an individual
could ever need.
Last but not least, I would like to show gratitude to my family and friends who have encouraged
me entirely during this process.
iv
Contents
DECLARATION ........................................................................................................................i
ABSTRACT...............................................................................................................................ii
ACKNOWLEDGEMENT ........................................................................................................iii
Contents.....................................................................................................................................iv
List of Figures ............................................................................................................................ v
Chapter 1: Introduction .............................................................................................................. 1
1.1 Enquiry Overview ............................................................................................................ 1
1.2 Target Audience ............................................................................................................... 2
1.3 Aims and objectives ......................................................................................................... 3
1.4 Research questions ........................................................................................................... 4
1.5 Background of the subject matter..................................................................................... 4
1.6 Rationale of the study....................................................................................................... 6
1.7 Scope and Limitations...................................................................................................... 7
Chapter 2: Literature review ...................................................................................................... 8
2.1 Introduction ...................................................................................................................... 8
2.2 Conceptual Clarifications: Prediction API....................................................................... 9
2.3 Characteristics and values of using PREDICTION API within the business ................ 10
2.3.1 Ubiquity................................................................................................................... 17
Chapter 3: Technical Research................................................................................................. 17
3.1 Google Cloud Platform features and Prediction API models ........................................ 17
v
3.1.1 Comparison between Google Cloud Platform, Amazon Machine Learning, Azure
Machine Learning ............................................................................................................ 18
3.1.2 Prediction API models ............................................................................................ 21
3.2 Android and AppSheet Mobile Operating Systems ....................................................... 21
3.2.1 Android.................................................................................................................... 22
3.2.2 Use of Google Cloud console and Prediction models for the AppSheet application
.......................................................................................................................................... 23
3.2.3 AppSheet ................................................................................................................. 24
3.2.4 Comparison between AppSheet and Android developments of application........... 25
Chapter 4: Research Design and Methodology........................................................................ 28
4.1 Research Approaches ..................................................................................................... 28
4.2 Research Strategy........................................................................................................... 29
4.3 Exploratory and Explanatory Research Strategies......................................................... 29
4.4 CASE STUDY ............................................................................................................... 30
4.5 Data Collection Methods................................................................................................ 30
4.5.1 Primary and Secondary Data................................................................................... 30
4.5.2 Google Spreadsheet Dataset.................................................................................... 31
4.6 Strength of methodology................................................................................................ 32
4.7 Limitations of methodology........................................................................................... 32
4.8 Ethics Considerations..................................................................................................... 33
Chapter 5: Prediction API models embedded in Google Spreadsheets and Data Analysis (De-
velopment overview)................................................................................................................ 33
vi
5.1 Fetching Data ................................................................................................................. 33
5.2 Initial State ..................................................................................................................... 36
Chapter 6: Implementation of Prediction API models within Google Spreadsheet and testing
of the mobile application.......................................................................................................... 46
6.1 Google App Scripts ........................................................................................................ 46
6.2 AppSheet Application Development.............................................................................. 67
Chapter 7 Reflection and recommendations for future work................................................... 81
7.1 Introduction .................................................................................................................... 81
7.2 Evaluation of findings .................................................................................................... 82
7.3 Research data applicability to the aims and objectives of the project............................ 83
7.4 Recommendations .......................................................................................................... 85
7.4.1 Designing a Good Model ........................................................................................ 85
7.5 Conclusion...................................................................................................................... 86
7.6 Directions for further study............................................................................................ 87
7.7 Summary ........................................................................................................................ 87
References:............................................................................................................................... 88
Appendix A:............................................................................................................................. 95
Appendix B: My Basic Script .................................................................................................. 96
Appendix C: The Script associated with Google Spreadsheet................................................. 97
File 1: Prediction API code .................................................................................................. 97
File 2: Help Functions.......................................................................................................... 99
File 3: Methods for accessing values stored in the spreadsheet......................................... 101
vii
List of Figures
Figure 1: Machine Learning: How does it work?(www.salesforce.com, 2016) ....................... 8
Figure 2: Prediction process (Dorard, L., 2014) ..................................................................... 18
Figure 3: Native, HTML5, or Hybrid (Korf, M and Oksman, E., 2015) ............................... 22
Figure 4: Google Spreadsheet dataset used for the purpose of the project (docs.google.com,
2016)........................................................................................................................................ 24
Figure 5: Screenshot of the Google Spreadsheet development process (docs.google.com, 2016)
................................................................................................................................................. 26
Figure 6: Dataset, missing values from cell 20B to cell 27B required for predictions
(docs.google.com, 2016) ......................................................................................................... 27
Figure 7: Project development: Name selection process (cloud.google.com, 2016) .............. 28
Figure 8: First stage of the project development (cloud.google.com, 2016) .......................... 29
Figure 9: Google APIs selection options (cloud.google.com, 2016) ...................................... 29
Figure 10: Prediction API selection (cloud.google.com, 2016).............................................. 30
Figure 11: Enabling of Prediction API (cloud.google.com, 2016) ......................................... 30
Figure 12: “Try this API in APIs Explorer”: link (cloud.google.com, 2016)......................... 31
Figure 13: Prediction API training models (cloud.google.com, 2016) ................................... 31
Figure 14: Cloud Storage bucket formation (cloud.google.com, 2016).................................. 32
Figure 15: Uploading of the training dataset (cloud.google.com, 2016) ................................ 32
Figure 16: Execution process of prediction.trainedmodels.insert (cloud.google.com, 2016). 33
Figure 17: Prediction.trainedmodels.insert request and response (cloud.google.com, 2016). 34
Figure 18: Prediction.trainedmodels.get execution process (cloud.google.com, 2016) ......... 34
Figure 19: Prediction.trainedmodels.get request and response (cloud.google.com, 2016)..... 35
Figure 20: Prediction.trainedmodels.predict execution process (cloud.google.com, 2016) ... 35
Figure 21: Prediction.trainedmodels.predict request (cloud.google.com, 2016) .................... 36
viii
Figure 22: Prediction.trainedmodels.predict responses (cloud.google.com, 2016) ................ 36
Figure 23: Google App Scripts platform (script.google.com, 2016) ...................................... 37
Figure 24: Basic script used for the purpose of the project (script.google.com, 2016) .......... 38
Figure 25: Edit Project Name screenshot (script.google.com, 2016)...................................... 38
Figure 26: Execution of the main function (script.google.com, 2016) ................................... 39
Figure 27: Google Drive access request (script.google.com, 2016) ....................................... 39
Figure 28: Checking of the Console Logs (script.google.com, 2016) .................................... 40
Figure 29: Evidence of “my basic script” and “my test document” files uploaded in the Google
Drive (drive.google.com, 2016) .............................................................................................. 40
Figure 30: “my test document” content (docs.google.com, 2016).......................................... 41
Figure 31: Prediction Google Spreadsheet (docs.google.com, 2016)..................................... 42
Figure 32: Google App Script associated with the spreadsheet (docs.google.com, 2016) ..... 42
Figure 33: Google App Script associated with the spreadsheet (docs.google.com, 2016) ..... 43
Figure 34: Google App Script associated with the spreadsheet (docs.google.com, 2016) ..... 44
Figure 35: Google App Script associated with the spreadsheet (docs.google.com, 2016) ..... 45
Figure 36: Activation of Prediction API (docs.google.com, 2016) ........................................ 51
Figure 37: Activation of Prediction API in the Google Developers Console (console.develop-
ers.google.com, 2016) ............................................................................................................. 51
Figure 38: Enabling of Prediction API in the Google Developers Console (console.develop-
ers.google.com, 2016) ............................................................................................................. 52
Figure 39: Confirmation that Prediction API has been enabled in the Google Developers Con-
sole (console.developers.google.com, 2016) .......................................................................... 52
Figure 40: Excel dataset spreadsheet imported in the Google Spreadsheet (docs.google.com,
2016)........................................................................................................................................ 54
Figure 41: Selection of Excel dataset file called “spreadsheet.csv” (drive.google.com, 2016)55
ix
Figure 42: Importing: spreadsheet.csv (docs.google.com, 2016) ........................................... 56
Figure 43: Confirmation Script output: the dataset has been imported successfully
(docs.google.com, 2016) ......................................................................................................... 57
Figure 44: Final edit of the Google Spreadsheet before using Prediction API models
(docs.google.com, 2016) ......................................................................................................... 57
Figure 45: Authorization request for “Prediction” application (docs.google.com, 2016) ...... 58
Figure 46: Google Cloud Platform use of OAuth 2.0 for “Prediction” authentication and author-
ization (cloud.google.com, 2016)............................................................................................ 59
Figure 47: Request of the INSERT method to begin the training of the dataset
(docs.google.com, 2016) ......................................................................................................... 60
Figure 48: Confirmation of the INSERT method efficiency (docs.google.com, 2016).......... 60
Figure 49: “Get training status”: Confirmation of connection between Google Cloud Console
project and Google Spreadsheet (docs.google.com, 2016) ..................................................... 60
Figure 50: Results from the execution process of “predict instances” model (docs.google.com,
2016)........................................................................................................................................ 61
Figure 51: Formatting of the results (docs.google.com, 2016) ............................................... 62
Figure 52: First stage of the application development (appsheet.com, 2016)......................... 63
Figure 53: Name and Category selection process required for the new application
(appsheet.com, 2016) .............................................................................................................. 63
Figure 54: Selection of the Google Prediction Spreadsheet required for the application devel-
opment (appsheet.com, 2016) ................................................................................................. 64
Figure 55: Setting of the Prediction application (appsheet.com, 2016).................................. 65
Figure 56: Welcome to AppSheet (appsheet.com, 2016)........................................................ 65
Figure 57: AppSheet architecture (appsheet.com, 2016) ........................................................ 66
Figure 58: Build and deploy an app in three simple steps (appsheet.com, 2016)................... 66
x
Figure 59: Customization options for the application (appsheet.com, 2016) ......................... 67
Figure 60: Entire view of the completed "Prediction" application (appsheet.com, 2016)...... 67
Figure 61: Adding entries of users (appsheet.com, 2016)....................................................... 68
Figure 62: E-mail invitation for the “Prediction” app installation (gmail.com, 2016) ........... 68
Figure 63: Google Spreadsheet results gathered from prediction models linked with the Predic-
tion application (appsheet.com, 2016) .................................................................................... 69
Figure 64: Example of a wine product within the application (appsheet.com, 2016)............. 70
Figure 65: Adding a new data in the spreadsheet required for the evidence (appsheet.com, 2016)
................................................................................................................................................. 71
Figure 66: “Prediction” application before the execution of Prediction API models
(appsheet.com, 2016) .............................................................................................................. 71
Figure 67: “Prediction” application after the execution of Prediction API models
(appsheet.com, 2016) .............................................................................................................. 72
Figure 68: Formatting of the Columns Structure (appsheet.com, 2016)................................. 73
Figure 69: Final look of the Prediction web application (appsheet.com, 2016) ..................... 73
Figure 70: Anatomy of the Prediction mobile application (appsheet.com, 2016) .................. 74
1
Chapter 1: Introduction
1.1 ENQUIRY OVERVIEW
The persistence of this project is to investigate how the implementation of the Google Predic-
tion API will impact on the small retail businesses in the United Kingdom. The aim of this
enquires overview is to inform the readers what they could expect from the rest of the research
part of this project.
Chapter one of the documentation presents the basis of the study through a comprehensive in-
troduction. Also gives a bright idea to the reader about the aims of this project by providing
contextual information and justifications of the subject matter. Furthermore, the aims and ob-
jectives are related to the formation of the search.
The second chapter is concerned with the review of the relevant information required for the
implementation of the Google Prediction models. The aim of the section is to present a solid
hypothetical basis from which the remaining part of the project will be conducted.
The third chapter announces the technical review related to the project. It is separated into four
subchapters- Google Cloud Platform features and Prediction API models, Android platform,
Google spreadsheets and AppSheet business productivity solution. The technical research is
based on the application development which could be used to deliver a positive impact on the
small retail businesses, with a particular focus on the United Kingdom.
Chapter four is primarily focused on the research methodology implemented in this dissertation.
An important feature of this chapter is the justification of the selected research path. Further-
more, the carefully chosen research pattern, the data gathering methods, and the ethical issues
2
are considered in this chapter. The chapter introduces the process of storing the dataset used for
the predictions in the Google spreadsheet.
Chapter five presents the production and the examination of the gathered information. A deliv-
ery of a comprehensive account of the themes assembled from the relations between the dis-
coveries and the literature and also describes the usage of Prediction API within Google Cloud
Console.
Chapter six discover step-by-step the development of the mobile application and the testing of
the application and the dataset.
Chapter seven represents my personal involvement through the steps of writing this dissertation,
the evaluation of the thesis, and the future improvements of the different parts of the application.
The chapter aims to examine the results assimilated in the investigation according to the project
objectives stated at the beginning of the subject matter. Then, chapter seven provides practical
recommendations for the small retail businesses regarding the implementation of the Google
Prediction API.
1.2 TARGET AUDIENCE
The project will be beneficial to every person who want to gain experience with Prediction API
models and develop a web application by using Google spreadsheet and AppSheet solution,
used for representing real values of possible cost of products.
It is very impressive how both the Google spreadsheet with embedded Prediction APIs models
and AppSheet combined could create a better competitive advantage for the small retail
businesses by presenting possible real values of the products that could be provided to the
customers.
3
The project is targeting the small retail businesses in the United Kingdom that need to improve
business sales and meet the customer’s expectations. The use of Google Prediction APIs deliv-
ers a range of benefits such as better competitive advantage, low operational cost, sales growth,
customer satisfaction and business continuity. Taken into consideration by using Prediction API
models the small retail businesses could manage their activities more efficiently.
1.3 AIMS AND OBJECTIVES
The purpose of this dissertation is to discover the possible outcomes of implementing the
Google Prediction models into the small retail businesses based in the United Kingdom. This
project will analyse the results of developing application practices and applying it to the partic-
ular case to present the values to the business.
These research purposes are to accomplish the following objectives:
- To review current literature associated with the Google Prediction API and the ways of devel-
oping a predictive application.
- To classify the key benefits of implementing the Prediction API into the small retail busi-
nesses.
- To formulate some practical background on how the application could be used as a premedi-
tated tool to achieve business objectives.
1.4 RESEARCH QUESTIONS
In order to measure the influence of the Prediction API implementation, the following questions
must be answered in this research paper to attain the objectives stated above. The research
questions are as follows:
4
- What are the current predictive technologies?
- How can Google Prediction API be used to develop a decision-making application?
- What is the outcome of implementing the Google Prediction API into the small retail
businesses in the United Kingdom?
- How Predictive application could be used as a strategic tool to achieve business
objectives?
1.5 BACKGROUND OF THE SUBJECT MATTER
To involve the readers of this document into the issue, I will introduce what is a Machine Learn-
ing and the Prediction API with some fundamentals. Machine Learning is linked to the artificial
intelligence (AI) which means that the computers can learn without being programmed (Mar-
garet Rouse, 2016). Fundamentally, it is a process of gathering predictions based on some data
related to the problem (G, 2010).
By using our training data, Prediction API models can absorb it and predict numeric values or
select a class that defines a new piece of data. With these competencies, users can develop
applications and achieve tasks such as predicting what goods an individual might like,
classifying emails as spam or non-spam, evaluating whether feedbacks have a positive or a
negative sentiment, or predicting how much could cost a bottle of wine for a period.
According to the project aim which is developing an application and representing possible
prices of wine products, the data is correlated to the wine features such as the origin of the wine,
type of grapes, year of production and brand.
Machine Learning is based on examples, so I will provide examples of ML to explain the con-
cepts (Dorard, 2014). The rest of the research paper will emphasise the development of the
5
Prediction API in use. I will continue with the review of the Prediction API to show how it will
be implemented on an actual case. The following picture represents how Machine Learning
works, Fig. 1.
Figure 1: Machine Learning: How does it work? (Salesforce, 2016)
The development process of the application is related with Cloud Computing which provides
great opportunities to organizations to become more co-operative and mobile. The motives for
choosing this topic are based on accomplishing the following aims:
- Delivering clear evidence that the businesses could increase profit by implementing
Prediction API models;
- Providing clear evidence that the businesses will reduce business costs;
- Delivering clear evidence that the businesses will develop a competitive advantage;
For practical implementation of Google Prediction API, the companies need to use Google
Cloud Console and Google Cloud Storage where the information will be kept. The Cloud Stor-
6
age is automatically empowered on every Google Cloud project, and the documentation pub-
lished in the Google Cloud Platform represents all the steps of using predictive models (Google
Cloud Platform, 19 August 2016).
1.6 RATIONALE OF THE STUDY
Nowadays, computers are excellent at processing information. An example of that are the mil-
lions of messages sent to the Twitter servers, which have to figure out the trends of the topics
in real time (Dorard, 2014). The problem here is based on the lack of intelligence which means
that the servers must be precisely programmed with the list of basic commands to perform
efficiently. It is a huge challenge to do specific things that people do very simply, but for which
the computers are not able to figure out the exact procedure. An example of this is the recogni-
tion of the handwritten digits. For us is an easy task, but computers need to be programmed.
There are various methods to make computers do "intelligent" or "human-like" things (ibid.,
2014) and they are related to the Artificial Intelligence (AI). An example of this is playing chess.
The AI methods in chess programs work by probing possible categorizations of moves (player
one will make one move, then player two could make these moves, then player one could make
those moves, etc.). By assessing who has better precedence at the end of each of these possible
categorizations, the program will choose the winner.
Machine Learning (ML) combines some AI methods where intelligence is based on examples
(Brownlee, 2016). Let’s look at the hand-written digits; we can customize ML by giving sam-
ples of hand-written digits as scanned images, between 0 and 9. These examples will create our
"data". The idea is to deliver a new image of a hand-written number which has never been used
before and by comparison to the scanned images, the ML will provide a prediction based on the
7
most similar example to the new picture (Dorard, 2014). The process is very close to what we
would do, and the ML is about making machines replicate how individuals learn.
According to the aim of this project by using Prediction APIs, the businesses will be able to
predict how much could cost a bottle of wine based on examples of wine products and their
prices.


1.7 SCOPE AND LIMITATIONS
The feasibility of the project builds on the extent of the investigation and its progress. For this
purpose, has been chosen limited to the particular field of businesses headquartered in the
United Kingdom. The percentage of opening new markets increase with every single day and
the small retail shops are a promising marvel according to the growing of the customer’s de-
mand for goods.
The research project utilizes resources related to the businesses that have been already imple-
mented Prediction API models, including the development of an application, as well as other
websites and books. Examples of how Prediction API models could be applied to any business
are expressed in the literature review. They are based on the values from implementing the
Prediction API within the business.
Also, the range of the study is limited because of time and financial restrictions which constrain
the scope of this project. Therefore, to simplify the results, the dataset requires more examples
of wine products and contributors from different retail shops. Also, the information gathered
for this investigation will be restricted to what is available regarding subordinate resources from
various websites, books, and journals.
8
However, the conclusion from this study will play a significant role in understanding the busi-
ness influences in consumer’s life. In spite of the limitations according to this research project
the challenge is to create an application from which retail businesses can enhance their market-
ing communication, increase their profit and their competitive advantage in the United King-
dom.
Chapter 2: Literature review
2.1 INTRODUCTION
The literature review is a significant part of the dissertation which relates the project aims and
discoveries and also shows an in-depth grasp of the subject matter (Royal Literary Fund, 2016).
This chapter intends to review literature based on examples of already implemented Prediction
API models within the business and how individuals can build Machine Learning models. I will
investigate research which provides a clear understanding of how machine learning tools could
help for sufficient sentiment analysis.
The aim is to collect theoretical literature and develop a reliable investigation. The chapter is
written in a way where I am following the project objectives and use them as guidance.
Section 2.2 aim is to deliver a clear understanding of what the Prediction API definitional term
means. Section 2.3 provide the values of using Prediction API models and mobile applications
for the business needs.
9
2.2 CONCEPTUAL CLARIFICATIONS: PREDICTION API
By using Google Cloud Platform, I was able to understand the meaning of Prediction API. On
the question, “What is the Prediction API?” the following answer could be given: The Predic-
tion API performs in specific tasks. By providing a new item to the Prediction API models, we
can receive numeric value for that item based on comparable examples in the training data
(Google Cloud Platform, 2016). We can refer to the example mentioned in Chapter 1 for the
scanned hand-written images. Critically viewed there has been less information published about
the Prediction API as a term.
According to (Casalboni, 12 May 2015), Google Prediction API provides a RESTful interface
which means Representational Web Transfer. The principles are easy to follow:
- Connect to the server.
- Provide a VERB and a path to a URL.
- Request an answer.
The RESTful interface is used to build Machine Learning models for the purpose of this project.
REST could be explained as an interface that works like a website in a browser, and the resource
is exposed to a program via a URL (Zazueta, 09 October 2013). To be more specific, a well-
designed RESTful API will include additional links and the programme can follow them to
request the related information.
2.3 CHARACTERISTICS AND VALUES OF USING PREDICTION API WITHIN THE BUSINESS
There are parts of this literature review section, which could be originally found in my Research
and Professional Practice (BIF_5_RPP_1516) module project proposal.
10
For a better understanding of the benefits of Prediction API implementation, it is essential to
comprehend the features that allow small retail businesses to leverage Prediction API models
as a part of their business strategy. Several authors have documented the key features of Google
Prediction API (Dorard, 2014), (Brownlee, 2016) and (Siegel, 11 January 2016).
The aim of reviewing the literature based on Prediction APIs is to define the way of how to
develop an application presenting the cost of different wine products which will improve my
professional skills and capabilities.
There is a significant number of documentary grounded on developing of applications. Though
the investigation is focused on Prediction APIs they will be not revised in detail, only will be
mentioned if they are suitable.
In the analysis carried out according to machine learning, (Dorard, 2014) delivers the first guide
for Prediction APIs and describes the steps of how to custom applications and express individ-
ual machine learning problem according to business purposes. Furthermore, (Kumar, 05 August
2013) states that demographic variables can predict the purchase decisions of users. The author
describes how in Chennai city premium car owners predict buyer’s choice by using Prediction
API which is related to their age, education, lifestyle, sex…etc. The example provided by (ibid.,
2013) helps to understand how businesses can target groups, develop a marketing strategy and
predict customer’s intention.
In the review of “Bootstrapping Machine Learning” (Dorard, 2014) provides clear examples of
what exactly is Machine Learning, the tips for gaining experience with Google prediction
services and ways to build up prediction models.
The author represents the characteristics of Prediction API and delivers information of how to
exploit the value of the information in different types of businesses or applications.
11
Dorard, (2013) identifies how Machine Learning works and the limitations that a user may face
during the developing process. The benefits of following his guidance are as follows:
- Individuals can improve user’s experience within the apps, by observing customer’s
behaviour and then by using Prediction API models to figure out users’ needs and
desires.
- Individuals can understand the value of user data and analyse prospects or predict
possible goods revenue.
- People who are interested in business development will be able to differentiate their
business and create competitive advantage by using smart app features.
According to Mulholland & P. Mc Kevitt, (10 June 2015) the participation of users could raise
levels by the use of Prediction API and is conceivable by selecting the best content from a set
of media resources. The architecture named 360-MAMSelect is described by the authors and
apply sentiment examination for the endorsement of media assets. Mulholland & P. Mc Kevitt,
(ibid., 2015) evaluate two models for sentiment examination such as EmoSenticNet and Google
Prediction API related to the purpose of this project. There are cases of how Google Prediction
API models could be applied for business purposes.
Judgmentally viewed the assortment of materials related to the project aim is problematic. As
an investigator, I had to select some of the literature and ignore others. To be more specific, I
will reference Yuanzhuo Wang, (09 September 2015) that describes the game-theoretic method
as a tool that can predicts buying behaviours up to 70%. The material is investigated only for
personal awareness and is not appropriate for the aim of this project. The reason is that the game
theoretic method is related to the social websites, where the objective of the project is to con-
sider approaches, which are associated with the small retail businesses. The value of being
12
aware of the game theoretic method is the opportunity to relate the findings with the other out-
comes from the study.
Google corporation is acknowledged as a leader in developing advanced applications. “Google
Prediction API” is the example of this set which distributes pattern-matching capabilities
(Google Cloud Platform, 19 August 2016). With predictive models and user’s history of buying
products, developers can predict future products that a customer might like. Prediction API
models could help businesses to classify e-mails as spam or non-spam (Agrawal, 18 March
2013). Example: With gmail.com the e-mails are automatically categorised; eBay application
has the capability to estimate the effect of posted comments and define them as positive or
negative (Dorard, 2014). Following my objectives by using the predictive application the small
retail businesses will be able to presume how much could cost a bottle of wine at certain day
by using the information of the previous history of wine sales.
In the review of Machine Learning Casalboni, (12 May 2015) states that the most suitable way
of using machine learning algorithms is in “black box” mode. To develop the application, which
will be delivered to the small retail businesses in the United Kingdom, I need to be aware of the
possible outcomes from the algorithms and need to use adequate resources. The method is ac-
ceptable for offline testing because I will be able to appraise the correctness of predictions.
Furthermore, Prediction API is an excellent option and does not need any infrastructure.
The following authors Tian, T., Ae Chun, S., and Geller, G., (2011) declare that a prediction
model for web search hit counts by using word frequencies. The discoveries are based on the
use of Google Prediction API as a search engine. Tian Tian, (ibid., 2011) defines that users can
find accurate and relevant data, based on their search purposes within a few hits. Critically
viewed, trying to find useful links or research papers in google.com could result in hundreds or
even thousands of articles. The authors offer query rewriting methods for producing different
query strings. Tian, Tian (ibid., 2011) provide evaluation testing of the hit count prediction
13
model for the search engines such as Google and Bing. The method illustrated by the authors
is a clear example of how the implementation of Prediction API search engine could result in
better user experience while buying goods.
“Prediction of Consumer Purchase Decision using Demographic Variables: A Study concerning
Premium Car” is a journal provided by Kumar, S., (2013) appropriate for the aim of my
investigation because the author investigates different aspects of how Prediction API models
can be implemented efficiently. Small retail businesses are following certain rules to satisfy
their customers by providing products based on individuals needs and desires. In the review of
the document Kumar, S., (ibid., 2013) evaluates how organizations distinguish their goods
related to the lifestyle, age, education…etc. Also, the author provides information about how
premium vehicle holders in Chennai city use Prediction APIs and the ways of predicting the
consumer’s decision to buy an individual product. The example has been used to understand
the ways of targeting a group and developing a marketing strategy for prediction of customer’s
intention.
Furthermore, H. Onur Bodur, (22 March 2014) presents the topic “Will You Purchase
Environmentally Friendly Products? Using Prediction Requests to Increase Choice of
Sustainable Products” which is related to commitment-based interventions. According to H.
Onur Bodur, (ibid., 2014) the commitment-based paternalism is the most appropriate approach
for inspiring environmental behaviours. The example mentioned by the author delivers a clear
understanding of how Prediction Requests usage leads to an efficient mass communication
strategy and impact behaviour among a huge audience. To gather data for any investigation,
individuals must investigate materials from a significant number of websites, online published
documentation, and video tutorials, which is time-consuming and most of the time inaccurate.
H. Onur Bodur, (ibid., 2014) declares that by using his approach individuals will be able to
gather a lot of evidence and see the effectiveness of prediction requests method.
14
Following the aim of the project for the efficient development of the predictive application, I
had to implement a simple programming script. In the review of programming languages Barry,
P., (2010) provides examples of simple programming scripts required for the development of
Google Prediction API and also explains how most of APIs are build. Similarly, Dorard, (2014),
Cloud Academy, (2016), Agrawal, (18 March 2013), Brownlee, (2016) and Google Cloud
Platform, (2016) have also examined the ways of developing Prediction API models and their
implementation.
Another beneficial journal is “How to Use Google’s Prediction API to Dig into AdWords”
written by Brennan, M., (2015). The author states that machine learning can enhance the results
when the information is added and expand predictions based on the response of the participants.
Brennan, M., (ibid., 2015) introduces different API learning algorithms and the ways of how
the data can be analysed.
Through the research process, I had the chance to participate in a blog where Casalboni, A.,
(2015) offers guidance which delivers a better understanding of using the predictive application
via the RESTful interface and also I had the opportunity to get experienced with the software
available on the Google Cloud Platform.
The Cloud Academy, (2016) delivers excellent sources of information, because of training
courses, provides video tutorials and documentation necessary for beginners who are ready to
get involved in the process of development applications.
Again Brennan, (27 May 2015) identifies different approaches of the Google API keys for
success and also delivers material of what are APIs and how they work. According to the
purpose of this project, I was able to relate the strategies to the dissertation aims and objectives.
15
Also, Ohri, (30 July 2012) evaluates cases that have been already implemented Prediction API
and describes the Purchase Prediction model as a tool which increases customer’s satisfaction
by efficient use of it. The examples are:
The giant tech companies such as Google, Yahoo, and Microsoft use Machine Learning widely
to achieve tasks that involve intelligence on a huge scale. They provide personalized content to
each visitor to their web pages by predicting what could engage each of the users. Facebook
gives examples of data that we could be interested. To be more specific this could be different
articles or people that we might know, also after selecting a photo, the app scans the image for
faces, and we can tag the person whose face appears on the picture.
One of the video tutorials provided by Doraisamy, (30 October 2014) is based on how Google
Prediction APIs help businesses to deliver better customer service. The author associates user’s
intelligence and software as a service (SaaS) which are quite related. Doraisamy, (ibid., 2014)
delivers information of how Google APIs understand user’s intention by typing into the browser
a few keywords. On the other hand, QVSource, (25 September 2013) provides a guidance of
how to create a training data and implement Google Prediction models by using QlikView and
QVSource. It is a great option for getting experienced with prediction models if you are not
quite experienced. By using QlikView and QVSource individuals can create a sentiment
prediction model on the Google Prediction Connector. Examples are:
- Email classification
- Spam Detection
- Language Detection
The author provides examples of how the training data should look like and the steps of
uploading the dataset. By using a user’s past viewing habits, developers can analyse user’s
feedbacks and determine if they have a positive or negative impact. Critically viewed the
16
examples provided by Doraisamy, (30 October 2014) and QVSource, (25 September 2013) are
not going to be used for the purpose of this project. They require an investment for the efficient
use of the sources, but the information will help me to understand the concepts of implementing
Prediction API within the business.
2.3.1 Ubiquity
The aptitude of individuals to obtain data from any location whenever they want and also to
perform transactions refers to ubiquity (Clarke, I., 2001). According to the project, mobile
phones are an excellent example of universality which is the reason to decide to develop a
mobile application that could deliver easy access to the information gathered from predictions.
With the cell phones, individuals can reach any application by connecting to the internet
(Richard T. Watson, September 2002). Small retail businesses can implement mobile device
capability to be universal while offering goods that are related to the customer expectations.
Chapter 3: Technical Research
3.1 GOOGLE CLOUD PLATFORM FEATURES AND PREDICTION API MODELS
3.1.1 Comparison between Google Cloud Platform, Amazon Machine Learning,
Azure Machine Learning
To provide the reasons for choosing Google Prediction API models in Google Cloud Platform,
I had to explain the difference between Amazon Machine Learning, Azure Machine Learning,
and Google Cloud Platform.
17
Amazon ML and Azure ML are relative newcomers in the cloud-based market while Google
Cloud Platform has been released in 2011 and offers more stable and secure way to get experi-
enced with Machine Learning models (Robust, 14 April 2015).
The industry of the Machine Learning continues to grow, and numerous tools have been devel-
oped to provide access to advanced learning algorithms with a minimal effort. The approach
“feed in data, get an answer back” it’s a great option for businesses to implement Machine
Learning solutions (Almeida, 12 May 2015). The reason for choosing Machine Learning ap-
proach is that the tools are built by some of the best experts in the ML field.
The services that have been investigated in this research paper are Amazon Machine Learning
service, Microsoft Machine Learning Studio, and Google Machine Learning solution. I am fo-
cusing on the service functionalities, and I will cover the uploading of the data. To be able to
perform the tests, I had to use the services’ consoles. The summary below delivers the aspects
of data sourcing and what should be considered when individuals are choosing a service:
- Data sources.
- Formats
- The maximum size of the data types.
Amazon Machine Learning:
- Data sources: The text file needs to be uploaded into S3; AWS RDS; AWS Redshift;
AWS S3 table.
- Data formats: CSV file; S3 or Redshift database.
- Dataset maximum size 100GB.
- Data types: Boolean; categorical; numeric; string.
18
- AWS supports the major dataset for batch training.
Microsoft Azure Machine Learning
- Data sources: The file needs to be uploaded in Azure Storage. It could be SQL database;
web URL; Hadoop HiveQL.
- Data formats: CSV and txt files; Hive/ SQL tables; OData values; zip; RData.
- Dataset maximum size 10GB.
- Data types: Boolean; categorical; date time; numeric; string; timespan.
- Microsoft Azure has the broadest variation of data sources and formats.
Google Cloud Platform
- Data sources: The text file needs to be uploaded into Google Storage; Google
spreadsheets; HTTPS requests; API update calls.
- Data formats: txt file; spreadsheets; JSON.
- Dataset maximum size: text file should be maximum 2.5GB; HTTP request is maximum
2MB.
- Data types: Numeric; String.
I need to mention that both AWS and MS Azure can read data from tables uploaded in their
storage services. From my point of view, the MS Azure provides flexibility for the data sourcing
and data processing, but Google provides the key feature in ML applications. As I have men-
tioned before individuals, get access to incremental training and also allows the use of virtually
19
infinite data. Finally, Amazon ML data processing capabilities are in between the other two;
there are some functionalities, but not too many.
According to the project aim, the models could be trained on uploaded text files with all types
of services, but the reason to choose Prediction API within Google is that the platform supports
update calls, which means by adding more information I could send more requests to the same
training model. Also, Google Cloud Platform offers a free trial version which has been used for
the purpose of this project. I had to sign up by using my Google account which allows me to
use the models and get maximum 100 predictions per day for the period of six months. Critically
viewed the internet connection is crucial for the efficient use of the models. The data is kept in
the Google cloud storage, and there are no restrictions on the amount of the data uploaded
within the project.
3.1.2 Prediction API models
The Machine Learning algorithm consist the following two algorithms: a training algorithm and
a prediction algorithm.
• The training algorithm involves learning a model from examples (data). The training algo-
rithm is also known as learning algorithm and takes a set of input-output models, or training
dataset, and generates a model by examining this dataset (Dorard, 2014).
• A prediction algorithm uses the training model and a new input and delivers an output value.
To be more specific, we make a prediction of an output based on a given input (data) against a
model, Fig. 2.
20
Figure 2: Prediction process (Dorard, L., 2014)
3.2 ANDROID AND APPSHEET MOBILE OPERATING SYSTEMS
Nowadays the mobile applications are increasing their complex capabilities which lead to the
variability of platforms and operating systems accessibility. All of us are using a variety of
mobile software such as internet browsers, games, videos which make us linked to the phones.
The reason is the design of the application if it meets our requirements we will install the app.
The assortment of features, processing speed, user interface, and the existing applications
depend on the operational system of the given device (Studio, 2016).
3.2.1 Android
“Android is an open source software stack that includes the operating system, the middleware,
the main applications and a range of API libraries used for developing applications to determine
the design of the mobile handset” Meier, R., (2009) and also provisions ordinary hardware cell
phones. According to Meier, R., (ibid., 2009) Android provides free mobile software fulfilment
for the developers and handset builders. To be more specific, the Android was developed by
Google in 2005 and is maintained by the Open Handset Alliance which involves more than 30
21
firms together with hardware constructors, software developers and mobile carriers who work
organized and deliver software satisfaction.
“Android incorporates a Linux kernel that is taking care of the primary services such as the
memory and power management process, security and the network. The kernel also provides
an abstraction layer between the hardware and the stack remains”, Ahmad and Khan (2013).
To develop applications users, need to use Java programming language, but the requests are
executed by the usage of Dalvik VM which ensures efficiency. According to Parida, A., (2013)
the Dalvik virtual machine is built to transform the classes of Java language into a bytecode
interpretation-machine code commands.
Wagoner, A., (2016) claims that the original version of Google Play was Google’s Android
applications market, where individuals could download diverse Android applications
appropriate for any devices.
The most vital problem concerning the Android devices is disintegration. Some Android
operational systems that possess user requirements are not well-suited with other versions of
Android OS. In this situation, an Android device can be executed on previous types of Android
OS, but cannot update information while running on the newest ones which are a problem when
developers need to design an Android application. The inventers need to be more cautious
during the development procedure and certify the capability with the previous versions of the
operational system, dissimilar sizes of the screen, input gestures, etc. (Vassallo, E., 2014).
According to the aim of this project and the decision of using Google services, I have to mention
that Google made changes to avoid problems with the fragmentation (ibid., 2014). Google Play
turn out to be more important than the operation system necessities when developing an
application. The Google Play store is used for copying the main services that are essential to
execute applications on an Android device. The important Android features and the application
22
fundamentals are taken from the operating system to the Google Play store to guarantee that the
requests could be executed with the new features and applied in all types of devices (ibid.,
2014).
3.2.2 Use of Google Cloud console and Prediction models for the AppSheet appli-
cation
To develop a mobile application on an AppSheet platform is used Google Cloud Console that
permits a smooth execution and customization of the predictive models with the application.
Prediction API is kept in Google Cloud platform and permits users to experience several models
of a certain area by training the dataset uploaded to the website (Console, 2016). For the
connection, API key is essential; it is free, and it can be used by many people (Google Cloud
Platform, 2016). It is regularly updated and worldwide supported. The benefit is that Google is
responsible for the maintenance of it. The application development will be explained in Chapter
5 and Chapter 6.
3.2.3 AppSheet
AppSheet is a platform which does not require coding skills and competencies and the platform
could be used by everyone for free. It is a business productivity solution which provides a con-
tent display, note-taking, different forms and workflow for business scenarios (Play, 2016).
Users can develop applications by converting Google spreadsheets into mobile apps. With the
AppSheet everyone can create and deploy mobile solutions for any business based on the data
uploaded in the Google Sheets (Sphon, 25 January 2016).
The reason for choosing AppSheet for the development my application is because does not
require any coding skills, it is an easy solution to develop applications, and there are no hidden
23
costs. To be more precise for the aim of this project, the AppSheet will use the data from my
Google spreadsheet and display the outcomes generated from prediction models in an interac-
tive way through the AppSheet mobile app.
3.2.3.1 Google Spreadsheets
I have mentioned that for the purpose of this project is going to be used a Google spreadsheet
which is a web-based application that delivers options to modify spreadsheets, to create new
ones, to update old information and share the data online (Rouse, 2016).
The programme is Ajax-based and is well-matched with CSV files which represent comma-
separated values and Microsoft Excel. Google’s product delivers features which are typical for
spreadsheets. Examples are the aptitude to add columns, delete columns and manage rows. One
of the facts is that a beta version of Google Spreadsheets was offered to Google subscribers in
June 2006 which offer lightweight (ibid., 2016). The dataset related to the spreadsheet used for
the application development will be provided in Chapter 4.
3.2.4 Comparison between AppSheet and Android developments of application
3.2.4.1 AppSheet applications
The AppSheet application enables numerous, geographically isolated operators to cooperate in
real-time and chat over a built-in instant messaging program while working on a spreadsheet.
Individuals can upload spreadsheets straight from their computers. AppSheet is a good solution
for more than a few scenarios, such as:
- Working with remote teams where the uploaded Spreadsheets in Google Drive are
connected with the remote users via the AppSheet App. The remote users can access the
24
data in simplified ways and add, edit or delete information to complete the workflow
(Play, 2016).
- Project Management: People over the world manage their projects over Google Sheets.
To be more specific, project managers use AppSheet to display and share data by a
mobile device with other team players and stakeholders. Through the settings, the data
could be centralized in a core spreadsheet and displayed only for a particular audience
(ibid., 2016).
According to the purpose of the project the AppSheet offers a solution for Customer Engage-
ment where small retail businesses in the United Kingdom can keep track of business pipeline
on a Google Sheet. Another benefit is that the data could be accessed through the AppSheet for
an enhanced and streamlined view (Rouse, 2016). Examples are building catalogues using im-
age galleries (wine samples and prices) to keep the customers updated with recent offers or
sending emails to contracts recorded in the spreadsheet.
3.2.4.2 Android Applications
Nowadays, the mobile applications have a significant influence on the everyday life. While
developing the application, few factors need to be considered such as device functionality,
security, offline capability. To investigate which is the most appropriate type of the application
for my project, I had to mention the following types of applications – native, web and hybrid
one (Saccomani, P., 2012).
The developers who are using a particular platform such as Android must develop a Native
application due to the usage of all available device features. As we know, the applications could
be reached via device icons and downloaded from an Android app store called Google Play. To
be more specific, the native applications have a range of touch features such as double taps, UI
25
gestures, fast API graphics, which are highly essential for playing games and producing
interactive reports.
Native applications require highly relevant programming background which makes them more
complicated compared to the AppSheet applications because they necessitate highly relevant
programming skills. According to Korf, M., Oksman, E., (2015), the application is active
immediately, performs fast and possesses a consistent look.
Mobile web applications could be explained as a collection of web pages, which are executed
within a mobile browser. The programming languages that could be used are HTML5,
JavaScript, and CSS. The process of building cross-platform mobile applications entitles
HTML5 programming language which allows the bug to be fixed easily together with the
operation of adding features and positioned to the final users. In comparison, AppSheet
applications do not require any coding skills and competencies.
The grouping between native and web application form the third category of applications named
hybrid. To be more specific, the HTML application is placed in a native container, for example,
Adobe PhoneGap. The benefit of using Hybrid applications relates to the application usage on
dissimilar platforms with no further development effort and cost (ibid., 2015), Fig. 3.
26
Figure 3: Native, HTML5, or Hybrid (Korf, M, and Oksman, E., 2015)
It seems that both development platforms deliver some welfares and disadvantages. Based on
the application interface appearance, hybrid applications require HTML5 and CSS3 to provide
additional adaptive and lively content. However, the native applications contain tools used for
the design creation of the native interface together with user collaboration involvement that is
not accessible for hybrid applications.
To summarise for the purpose of the project, AppSheet application development solution is
used instead of Android development environment. It is free of charge to develop mobile ap-
plications by using AppSheet development technology because it delivers tools and options that
reduce the development time. Also, the AppSheet applications could be executed on any mobile
platform (iPhone, Android, Windows) and it does not require coding.
27
Chapter 4: Research Design and Methodology
4.1 RESEARCH APPROACHES
According to the purpose of the project, two approaches can be differentiated: deductive and
inductive. The deductive approach could be explained as the developing of a concept and hy-
pothesis observed and measured to approve the idea (Alan Bryman, 2008). Also, Altinay and
Paraskevas (2008) emphasize that a deductive method is used to clarify the connection that
occurs among the variables under observation. Furthermore, Swanson and Holton (2005) states
that deductive method involves time-consuming and requires a good understanding of the topic
under the investigation.
However, in an inductive approach (Alan Bryman, 2008) states that is necessary to avoid spe-
cific observations and choose wider overviews and concepts. According to Creswell (2000), a
few practical criteria’s can support the result concerning the proper research utilization of the
approaches. Furthermore, it is designated that selecting a topic which is relatively new and there
is a lack of literature related to it, is better to apply an inductive approach for generating infor-
mation which could be analyzed for the possible themes. Thus, concerning that the project is
focused on Prediction API models which are relatively new, and there is a lack of extensive
literature, I had to build up the application based on existing theory to the mobile applications
in developing companies.
To summarize the use of the above research approaches, I will relate the research questions
with the inductive and deductive approach.
- What are the current predictive technologies? Objective one: The investigation is
conducted in inductive approach where has been collected a relevant data to the project
aim.
28
- How can Google Prediction API be used to develop a decision-making application?
Objective one: The information is gathered by applying the inductive approach. I have
made several observations, and then the information from the literature review has been
used to deliver a more general set of propositions.
- What is the outcome of implementing the Google Prediction API into the small retail
businesses in the United Kingdom? The second objective is related to this question and
has been examined by applying deductive approach. I have decided to move from a
more general level to the specific one. I have investigated how other individuals are
using Prediction API and how they applied the models to the particular case. This has
been conceivable by using the documentation published in the Google Cloud Platform
(Google Cloud Platform, 2016).
- How Predictive application could be utilized as a strategic tool to achieve business
objectives? The third objective has been examined by using the deductive approach.
Where the review of documentary published by (Gaur, 20 April 16), (Green, 10 May
2011), (Irani, 29 March 2016), (Mombrea, 29 September 2011) and (Pathak, 15
December 2015) deliver the necessary key steps of using predictive applications.
4.2 RESEARCH STRATEGY
According to Saunders (2009), there are different research strategies which could be used to-
gether.
29
4.3 EXPLORATORY AND EXPLANATORY RESEARCH STRATEGIES
For the purpose of this project have been used an exploratory and explanatory research strate-
gies which exclude the descriptive research approach for the following reason.
The descriptive investigation intention is “to portray an accurate profile of the person, events,
and situations” (Robson, 2002), and it does not appear to be the suitable method of choice for
this project. According to Saunders (2009) the explanatory research “establishes causal rela-
tionships between variables”. A causal research characterizes the affiliation between variables
such as predicting the impact of value on sales (Coldwell and Herbst, 2004) and is more appro-
priate to the experimental form and the purpose of this project (Hakim, 2000).
The exploratory research strategy is used to clarify unclear problems and depends on qualitative
methods to expand the understanding of the research problem (Hair, 2011). In fact, the purpose
of the dissertation relies on facts and figures, which forms the project aim.
4.4 CASE STUDY
For the achievement of the project objectives, the research has been conducted by implementing
a case study strategy. To be more specific by following this approach I will be able to conduct
an in-depth investigation of a particular present-day subject which in my case is Prediction API
implementation within the business. The reason for implementing a case study method is to be
aware of the social context of the subject matter which is essential to understand the observable
facts (Alan Bryman, 2008). According to Yin (2009), the case study strategy is the most suitable
way to represent a unique topic. Following the aim of this project which is to developing an
application by using Prediction API models are considered that case study strategy is the most
suitable way for the achievement of the project objectives. The additional reasons for this choice
are clarified in section 4.5.
30
4.5 DATA COLLECTION METHODS
4.5.1 Primary and Secondary Data
Secondary sources are the data that has been already gathered and is readily accessible from
other sources (Saunders, 2009). With regards to the secondary data used in this project, there is
a lack of wide-ranging literature according to the Prediction API implementation in the United
Kingdom which impacts the ability to determine any assumptions on the research objectives.
Primary sources are the data collected by the researcher for the purpose of the dissertation (ibid.,
2009). Critically viewed collection of primary data requires a lot of time and user’s participa-
tion, this is the reason of using secondary data mainly for the project. The secondary research
offers the most suitable approach to exposure the research objectives which delivers already
proven investigation methods.
4.5.2 Google Spreadsheet Dataset
The spreadsheet dataset used for the application development is shown in Fig. 4.
Figure 4: Google Spreadsheet dataset used for the purpose of the project (docs.google.com, 2016)
31
The purpose of using Google spreadsheet within AppSheet is to represent pricing optimization.
To be more specific, the following information will deliver a clear view of what about is the
spreadsheet. The spreadsheet is orientated to the small retail shops based in the United King-
dom.
- Description: The spreadsheet includes information about new wine products within an
existing category of wine products that have been sold, and the aim is to predict how
small retail businesses should price the new bottle of wines.
- Question asked: "What should be the price of the new bottles of wine.
- The type of the Machine Learning problem is Regression. The regression is a statistical
method for assessing the relationships between variables.
- Input: Wine products.
- Features: Information about each of the wine products such as region, rating, the type
of grapes, year of production, brand and sales price.
- Output: Price.
- Data collection: The small retail businesses needs to log the amount every time a prod-
uct of the same category has been sold.
- How predictions are used: Small retail businesses need to set the price of each wine
product to the value provided by the predictive model. As we know the prices are likely
to change over time and the benefit of using Google Prediction models is that the data
could frequently be updated with new information.
32
4.6 STRENGTH OF METHODOLOGY
The key advantage of the methodology is the evidence of overall findings of the Prediction
application development and implementation which have been achieved by using the induc-
tive and deductive approaches. The essential part of this project is to understand the impact of
implementing Prediction application on small retail businesses in the United Kingdom where
the deductive approach allows me to deliver outcomes which are straight to the point.
4.7 LIMITATIONS OF METHODOLOGY
However, regardless of the advantages deliberated above the methodology also has several dis-
advantages. According to (Jordan, 2016), the main problem of the inductive method is related
to the project observations. Jordan (ibid., 2016) states that few observations are not enough for
valid conclusions. The investigation process needs to be continued for sufficient results. Also,
this methodology has a tendency to be more problematic regarding investigating the develop-
ment process of Prediction application. An additional disadvantage of this investigation is re-
lated to the process of application development. As an inexperienced investigator, this may
negatively influence the project design.
4.8 ETHICS CONSIDERATIONS
According to (Blumberg, 2005), the ethics are related to the moral principles that administer a
user’s behavior and relationships with others. Ethics are linked with the collection of the pri-
mary data regarding the rights of the contributors. The purpose of the ethics consideration is to
ensure that contributors are not going to be harmed or suffer from adverse consequences during
the research process (ibid., 2005). Also, the ethics such as privacy and liability of the researcher
33
are considered. Thus, to avoid any ethical issues, the primary goals of the subject matter were
clearly clarified, and the information used for this project is entirely based on secondary re-
sources.
Chapter 5: Prediction API models embedded in Google Spreadsheets
and Data Analysis (Development overview)
5.1 FETCHING DATA
- Google Spreadsheets
By using Microsoft Excel, Open Office Calc or Google Spreadsheets, we can save our dataset
as a CSV file. There is a tutorial by (Dorard, 2014) which explains how to set up the google
spreadsheet and use Google Prediction API models. Another example of how to upload and
create dataset file could be found in Google Cloud Documentation (Google Cloud Platform,
2016).
In the tutorial provided by (Sphon, 25 January 2016) are exposed the steps of using Google
spreadsheet within an app. To create the Google spreadsheet for the purpose of this project, I
had to use docs.google.com and click on new>>create a sheet, Fig. 5.
34
Figure 5: Screenshot of the Google Spreadsheet development process (docs.google.com, 2016)
It looks like an excel document but how we use it? The spreadsheet view is a set of data which
have the same structure as a spreadsheet program (Dorard, 2014). Each component of the da-
taset is an item that is stored in a row, and each column characterises a feature or attribute of
that item. The columns deliver information about the items and their description. The benefit
of using Prediction APIs is that we can predict the values of missing features or attributes. In
our case, the missing values are shown in the following figure from cell 20B to cell 27B which
needs to be predicted by using the prediction models, Fig. 6.
35
Figure 6: Dataset, missing values from cell 20B to cell 27B required for predictions (docs.google.com, 2016)
The wine features explained in Chapter 4 represent information about each of the wine products
such as region, rating, the type of grapes, year of production, brand and sales price.
Within Machine Learning we can pick only one attribute on at a time to make predictions
(Brownlee, 2016). To be more specific our first column in the spreadsheet has been chosen on
which to make predictions and is our Prices outcome. If there is a gap in other columns, I need
to develop a different model for each column. The cost of the feature or attribute that I want to
predict becomes the output of the machine learning issue, and the other features are the input
components (Dorard, 2014). Each feature characterises a piece of data that has an effect on the
outputs which will be predicted. The type of grape, year of production, wine brand are features
that have a significant impact on the price of a specific bottle of wine.
Prediction API models can be used to predict missing values of the data. Here I had to insert
outputs which are going to be wine prices and inputs are the wine features. The reason for
36
choosing wine product examples is to predict numerical outputs which will be continuous and
real-valued.
According to (ibid., 2014) prediction of real-valued numbers is called regression. The data used
for the purpose of the project is based on regression and predicts wine sale prices. The input is
some wine attributes shown in the spreadsheet. During the development process of the web
application and using of the Prediction API models, I had to create a Google account, to be able
to access the embedded models and the Google storage from anywhere at any time.
According to the aim of the project for the developing of the application, I am using Google
spreadsheet and Prediction API models. In comparison, Google Cloud Console provides easy
access to predictive models but requires Android Studio installation to develop the application
for the business use.
5.2 INITIAL STATE
Google Cloud Platform guides the users with information about how Prediction API models
could be used (Google Cloud Platform, 19 August 2016). In the Quickstart documentation is
explained step-by-step how to create a project within the Google Cloud Console and how to
upload the training dataset to produce real-time values or obtain results.
The Initial State of the project is related to this guidance since it uses examples of how to use
Google Cloud Platform and its services. The information provided in the documentation helps
of non-experienced developers to get a clear view of what results could be generated by using
Prediction API models. The document also explains different scenarios of predictions such as
language detection, email classifications, and purchase predictions.
37
The alteration between the Initial State guidance and the work obtainable in this project is that
the dissertation is mainly concerned with the making of predictions and presenting real-time
values related to the small retail businesses in the United Kingdom, and also the information
used for those predictions is based on previous purchase history. According to the purpose of
the research, the small retail businesses founded in the United Kingdom will be able to predict
the possible cost of the wine products.
To use Prediction API, I had to create a project in the Google Cloud Console and enable the
billing for the project. Google Cloud Platform offers a free trial version for the first six months
which allow individuals to get experienced with Cloud services and train their models without
any charges (Google Cloud Platform, 19 August 2016). The steps are as follows:
- Go to the Projects page.
- Click on CREATE PROJECT, choose a name and click CREATE, Fig. 7.
Figure 7: Project development: Name selection process (cloud.google.com, 2016)
I have received the following, by selecting WINE as a name of my project, Fig. 8:
38
Figure 8: First stage of the project development (cloud.google.com, 2016)
- On the right site of the top corner I had to enable the Prediction API and Google Cloud
Storage APIs for the project by clicking on Enable and manage APIs, Fig. 9.
Figure 9: Google APIs selection options (cloud.google.com, 2016)
39
- The next step is to click on Google Cloud APIs and choose Prediction API, Fig. 10.
Figure 10: Prediction API selection (cloud.google.com, 2016)
- To enable Prediction API, I had to press the button ENABLE, Fig. 11.
Figure 11: Enabling of Prediction API (cloud.google.com, 2016)
40
- Because I will use the APIs Explorer, there is no need to go to the Credentials page
afterward. At the bottom, individuals can choose TRY THIS API IN APIs EXPLORER
which is my decision, Fig. 12.
Figure 12: “Try this API in APIs Explorer”: link (cloud.google.com, 2016)
Figure 13: Prediction API training models (cloud.google.com, 2016)
41
- From here I can choose the training model required for the purpose of my project, Fig.
13.
To be more specific, the model that will be used is prediction.trainedmodels.insert to
(or “intending to”) training my dataset, but before that, I have to enable the Google
Cloud Storage and upload my training data.
- In the Google Cloud Platform, I had to click on the Create a Cloud Storage bucket and
choose a name, then click on Create, Fig. 14.
Figure 14: Cloud Storage bucket formation (cloud.google.com, 2016)
The name of my bucket is purwine which could be seen in the following picture, Fig.
15. The training dataset has been uploaded by selecting UPLOAD FILES.
42
Figure 15: Uploading of the training dataset (cloud.google.com, 2016)
The following information is essential to use prediction.trained.model.
- To train the model, I had to call the method and provide the ID of my project which
could be found on the Home Page or Google Cloud Console and also to provide the
location of my training data (Cloud Platform Console Help, 2016). The project number
is automatically generated once the project is created and is used only within the
console. The project ID cannot be changed after the project is created. Project details:
- Project ID: wine-1357
- Project number: 233110773272
- Purwine/purchase.txt
By entering the requested information into the empty fields, I was able to use prediction.trained-
models.insert which is associated with the dataset uploaded in Google Cloud Storage, Fig. 16.
43
Figure 16: Execution process of prediction.trainedmodels.insert (cloud.google.com, 2016)
After executing the file, I have received the following message that my request has been re-
ceived, and the response provides information, which there are no errors, Fig. 17.
Figure 17: Prediction.trainedmodels.insert request and response (cloud.google.com, 2016)
44
The next step is to execute the prediction.trainedmodels.get and use the training data, Fig. 18.
The system requires the project ID before execution.
Figure 18: Prediction.trainedmodels.get execution process (cloud.google.com, 2016)
Once the details are provided and execution is done, I have received a message that the request
has been sent successfully and in the response does not appear any errors, Fig. 19.
Figure 19: Prediction.trainedmodels.get request and response (cloud.google.com, 2016)
45
The final step is to execute the prediction.trainedmodels.predict to receive the final results,
Fig. 20.
Figure 20: Prediction.trainedmodels.predict execution process (cloud.google.com, 2016)
Figure 21: Prediction.trainedmodels.predict request (cloud.google.com, 2016)
The final results are as follows, Fig. 22.
46
Figure 22: Prediction.trainedmodels.predict responses (cloud.google.com, 2016)
Because the results from the models embedded in the Google Cloud Console are not clear, I
had to use the google spreadsheet mentioned above. The entire process is explained in the fol-
lowing chapter.
Chapter 6: Implementation of Prediction API models within Google
Spreadsheet and testing of the mobile application
6.1 GOOGLE APP SCRIPTS
Google App Scripts is a silver platform to write and run scripts on Google’s infrastructure. This
scripts can access your data on Google services, they can read and write data, and they can also
make you easily soft with the Google Prediction APIs. We need, to begin with very basic script
that access’s my data on Google documents. And then I need to integrate Google app scripts
47
with a google spreadsheet to make use of Google Prediction API and predict the missing values
of the spreadsheet. Let’s get started first we go to script.google.com, Fig. 23.
Figure 23: Google App Scripts platform (script.google.com, 2016)
By selecting Start Scripting, I will create my project. Then I need to enter my basic script, Fig.
24.
Figure 24: Basic script used for the purpose of the project (script.google.com, 2016)
48
The script creates a document using the documentsapp API, and the name of the document is
my test document. Then we go through the loop and in each situation we do two things: we add
a paragraph that is called heading plus the number of iteration and we set (DocumentApp,Par-
agraphHeading,HEADING) to be a HEADING of level 2. Then we add a simple paragraph
called paragraph and the number of iteration. Save as “my basic script”, Fig. 25.
Figure 25: Edit Project Name screenshot (script.google.com, 2016)
Once is saved we can run the main function, Fig. 26.
Figure 26: Execution of the main function (script.google.com, 2016)
49
And then we need to give permission to access the google drive content, Fig. 27.
Figure 27: Google Drive access request (script.google.com, 2016)
And finish with pressing Allow.
I need to check the console logs, Fig. 28 and make sure that everything runs without any errors.
50
Figure 28: Checking of the Console Logs (script.google.com, 2016)
In Google Drive, I can see my basic script that has been created, Fig. 29.
Figure 29: Evidence of “my basic script” and “my test document” files uploaded in the Google Drive (drive.google.com, 2016)
By clicking on my test document, I can see that replies as expected, Fig. 30.
51
Figure 30: “my test document” content (docs.google.com, 2016)
The next step is to create spreadsheet document with my training data. The scripts associated
with the spreadsheet are developed by (Dorard, 2014). By using his digital package, I was able
to understand the meaning of Prediction API and the process of developing Google spread-
sheets, Fig. 31.
52
Figure 31: Prediction Google Spreadsheet (docs.google.com, 2016)
The name of my document is Prediction. Once the document is created, I had to enable Predic-
tion API. For this, we go to Tools click on script editor, and this opens the google app script
associated with this spreadsheet, Fig. 32, Fig. 33, Fig. 34, Fig. 35.
Figure 32: Google App Script associated with the spreadsheet (docs.google.com, 2016)
53
Figure 33: Google App Script associated with the spreadsheet (docs.google.com, 2016)
Figure 34: Google App Script associated with the spreadsheet (docs.google.com, 2016)
54
Figure 35: Google App Script associated with the spreadsheet (docs.google.com, 2016)
The code above is associated with the spreadsheet used for the purpose of this project. There
are three files where the first contain the actual code specific to the Prediction API. The second
file contains the help functions, and the third file contains methods that access the values stored
in the spreadsheet and reads them or face them in.
For the purpose of this project I had to activate the Prediction API, this could be done be se-
lecting RESOURCES and click on advanced Google services, Fig. 36.
55
Figure 36: Activation of Prediction API (docs.google.com, 2016)
It looks like the Prediction API is on, but we need to activate it in Google Developers Console
as well, which has been already explained in Chapter 5, Fig. 37.
Figure 37: Activation of Prediction API in the Google Developers Console (console.developers.google.com, 2016)
56
We need to select Prediction API to enable it, Fig. 38.
Figure 38: Enabling of Prediction API in the Google Developers Console (console.developers.google.com, 2016)
Click on enable, Fig. 39.
Figure 39: Confirmation that Prediction API has been enabled in the Google Developers Console (con-sole.develop-
ers.google.com, 2016)
From the above picture, we can clearly see that Prediction API has been enabled successfully.
57
Let’s look at the code and what exactly does. The insert method is used to train the model, and
it calls the Prediction API.
var insert_reply = Prediction.Trainedmodels.insert(resource, project_number);
The row above calls the trainedmodels.insert method. So the data that it uses is training_in-
stances and the training instances are placed in:
var training_instances = [];
for (var i = 0; i < instances.length; ++i) {
var output = instances[i][0];
var csv_instance = instances[i].slice(1);
training_instances.push({'output': output, 'csvInstance': csv_instance});
Also gets output values and csv_instance values, so csv_instance are the feature values and for
that it took var output = instances[i][0]; where the values was defined in var instances = selec-
tion.getValues();, which is the selection set in the spreadsheet. The following rows represent
the prediction method:
function predict() {
try {
clearOutput();
var sheet = SpreadsheetApp.getActiveSheet();
var selection = sheet.getActiveSelection();
var instances = selection.getValues();
58
var project_number = getProjectNumber();
var model_name = getModelName();
for (var i = 0; i < instances.length; ++i) {
var result = predictSingleRow(project_number, model_name, instances[i]);
selection.getCell(i + 1, 1).setValue(result);
}
} catch(e) {
Browser.msgBox('ERROR:' + e, Browser.Buttons.OK);
}
}
The prediction method is used to fill the missing values, and the magic is happening in the
following rows.
predictSingleRow(project_number, model_name, instances[i]);
selection.getCell(i + 1, 1).setValue(result);
After that, I am using prediction.trainedmodels.predict method which uses the feature values
defined in input_instance.
var prediction_out = Prediction.Trainedmodels.predict(
resource, project_number, model_name);
displayOutput(prediction_out);
Here the instances are again selection of cells selection.getValues();
59
To be more specific let’s look at the google spreadsheet dataset. Before using the spreadsheet,
I had to fill the project information which was developed in Google Cloud Console with the ID
number 233110773272. For the model name, we can put any name which in my case is pur-
chase, and the next step is to import the data designed for the purpose of my project.
To insert data, I have to import the excel file which contains the information. The Excel file
contains information about wine products and their prices, Fig. 40.
Figure 40: Excel dataset spreadsheet imported in the Google Spreadsheet (docs.google.com, 2016)
60
The process is as follows: By accessing the uploaded documents in my google drive, I need to
select from File Menu-Import and then the file, Fig. 41.
Figure 41: Selection of Excel dataset file called “spreadsheet.CSV” (drive.google.com, 2016)
Click on Replace data starting at selected cell and then Import, Fig. 42.
61
Figure 42: Importing: spreadsheet.csv (docs.google.com, 2016)
The following picture clearly represents that our data has been successfully imported, Fig. 43.
62
Figure 43: Confirmation Script output: the dataset has been imported successfully (docs.google.com, 2016)
To predict some outputs, I need to delete some of the prices for the wines, Fig. 44.
Figure 44: Final edit of the Google Spreadsheet before using Prediction API models (docs.google.com, 2016)
63
The next step is to select the data with the prices to train the model.
Click on Prediction menu which is custom defined and use the prediction functions. Click on
the training model from selection and authorize, Fig. 45, Fig 46.
Figure 45: Authorization request for “Prediction” application (docs.google.com, 2016)
Figure 46: Google Cloud Platform use of OAuth 2.0 for “Prediction” authentication and authorization (cloud.google.com,
2016)
64
Click on allow and I have received the following confirmation dialog which represents that the
first stage of the prediction process is completed. Training model from selection is associated
with the INSERT method, Fig. 47:
Figure 47: Request of the INSERT method to begin the training of the dataset (docs.google.com, 2016)
By selecting OK, I have received the output of the API request as follows, Fig. 48:
Figure 48: Confirmation of the INSERT method efficiency (docs.google.com, 2016)
Let’s check the status of the model, from the toolbar select Prediction and then” Get training
status.” The following picture represents information that the connection between the project
and my Google Spreadsheet is running without errors, Fig. 49.
65
Figure 49: “Get training status”: Confirmation of connection between Google Cloud Console project and Google Spreadsheet
(docs.google.com, 2016)
The last step is to select the dataset with the missing values that need to be predicted. For the
purpose, I had to select from Prediction menu>>predict instances, Fig. 50.
Figure 50: Results from the execution process of “predict instances” model (docs.google.com, 2016)
66
The missing values are filled with new data which needs to be formatted for better understand-
ing. From the Format menu, I can improve the data which has been predicted, Fig. 51.
Figure 51: Formatting of the results (docs.google.com, 2016)
The last step is to publish the file to the web. From the file menu, I had to select File>>publish
to the web and click ok.
Now we are going to www.appsheet.com website to create our app. We have to sign up with
our Google account and use Google drive to (or “intending to”) use our spreadsheet. The pro-
cess is explained below.
67
6.2 APPSHEET APPLICATION DEVELOPMENT
The aim is to develop an application that works with Google spreadsheet which has been ex-
amined in Chapter 4 and Chapter 6.
By following the instructions published in www.appsheet.com, I have created a new app and
select the most suitable category for the purpose of the project, Fig. 52, Fig 53.
Figure 52: First stage of the application development (appsheet.com, 2016)
68
Figure 53: Name and Category selection process required for the new application (appsheet.com, 2016)
I have chosen Prediction as a name for my App and after selected my own data, Fig. 54.
69
Figure 54: Selection of the Google Prediction Spreadsheet required for the application development (appsheet.com, 2016)
I need to select my spreadsheet and it’s going to build an app, Fig. 55.
Figure 55: Setting of the Prediction application (appsheet.com, 2016)
70
The AppSheet is a fantastic solution because provides information about the entire process and
engage users into the meaning of each development step, Fig. 56, Fig. 57, Fig. 58, Fig. 59.
Figure 56: Welcome to AppSheet (appsheet.com, 2016)
Figure 57: AppSheet architecture (appsheet.com, 2016)
71
Figure 58: Build and deploy an app in three simple steps (appsheet.com, 2016)
Figure 59: Customization options for the application (appsheet.com, 2016)
Once the application is build, I was able to see the entire view, Fig. 60.
72
Figure 60: Entire view of the completed "Prediction" application (appsheet.com, 2016)
By selecting the Users menu from the left side of the window, I was allowed to add an entry of
users, Fig. 61.
Figure 61: Adding entries of users (appsheet.com, 2016)
I have added the emails of the participants of this project, and they can do entries.
73
When the decision is made about which users are allowed to use the new customized app, they
will receive the following message, Fig. 62:
Figure 62: E-mail invitation for the “Prediction” app installation (gmail.com, 2016)
The steps a quite easy to follow and creating an app with appsheet.com is free. I had to email
the link to my personal email to try the application. Users can run the link in their web browser
which means that it is not essentially to have a mobile phone. The following picture represents
the results gathered from prediction models in completed web application, Fig. 63.
74
Figure 63: Google Spreadsheet results gathered from prediction models linked with the Prediction application (appsheet.com,
2016)
By clicking on one of the wine products we can edit the data, Fig. 64. For example: Changing
the features of wine products in the application will update the data associated with the Google
Spreadsheet because they are synchronized and also will allow business owners to train the new
dataset and gather predictions for possible prices of the newly added information.
75
Figure 64: Example of a wine product within the application (appsheet.com, 2016)
By selecting the edit button, users can change the data. According to the purpose of the project,
the owners of the small retail businesses can add more wine samples of products. To change
existing information such as wine products, wine rating, the origin of the wine, wine prices and
also to train the new data and generate predictions by using Prediction API models. According
to the example, sometimes we need to update our data, I had to try to add new information to
my spreadsheet and see if the changes are updated within the application to confirm the state-
ment above. So I am going to change some of the data and see if there is any difference in my
application. I have added some new prices according to the wine features, Fig. 65.
76
Figure 65: Adding a new data in the spreadsheet required for the evidence (appsheet.com, 2016)
Once we sync the data in our app, the new information appears immediately, Fig. 66, Fig. 67.
Figure 66: “Prediction” application before the execution of Prediction API models (appsheet.com, 2016)
77
Figure 67: “Prediction” application after the execution of Prediction API models (appsheet.com, 2016)
The above picture is the evidence that my app runs without errors and also predictions updates
are shown immediately after prediction models are trained again.
Once the application is developed, I had to improve the entire look of the information presented
within the application such as format the columns represented in the Prediction application. The
following picture delivers the current look of my application, but different options could be
implemented to create the better appearance of the app such as adding pictures of the wine
products, adding more users…etc., Fig 68.
78
Figure 68: Formatting of the Columns Structure (appsheet.com, 2016)
By running the app in the web browser, I have received the following result: Fig 69.
Figure 69: Final look of the Prediction web application (appsheet.com, 2016)
79
The following picture represents the Anatomy of the Prediction mobile app, Fig 70.
Figure 70: Anatomy of the Prediction mobile application (appsheet.com, 2016)
Chapter 7 Reflection and recommendations for future work
7.1 INTRODUCTION
The aim of the following section is to formulate accurate and practical recommendations con-
cerning small retail businesses in the United Kingdom. Also, this could be applied towards
modifying strategies with the aim of expanding business development through mobile and web
Prediction API applications.
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF
Project 10.07.16 FINAL EDIT PDF

More Related Content

Viewers also liked

Sistemas presentacion (1)
Sistemas presentacion (1)Sistemas presentacion (1)
Sistemas presentacion (1)laura medina
 
PwC Global Financial Sanctions
PwC Global Financial SanctionsPwC Global Financial Sanctions
PwC Global Financial SanctionsKevin Kirst
 
Praktické zkušenosti s Affiliate
Praktické zkušenosti s AffiliatePraktické zkušenosti s Affiliate
Praktické zkušenosti s AffiliatePetr Jurca
 
Просторове планування для громад: схеми планування, зонування, інфраструктурн...
Просторове планування для громад: схеми планування, зонування, інфраструктурн...Просторове планування для громад: схеми планування, зонування, інфраструктурн...
Просторове планування для громад: схеми планування, зонування, інфраструктурн...CSIUKRAINE
 
مراقبتهای قبل و بعد از عملیات
مراقبتهای قبل و بعد از عملیاتمراقبتهای قبل و بعد از عملیات
مراقبتهای قبل و بعد از عملیاتShaker ssamim
 
Javier crhe
Javier crheJavier crhe
Javier crhejavicrhe
 
Відкриття проекту
Відкриття проектуВідкриття проекту
Відкриття проектуCSIUKRAINE
 
Об’єднані територіальні громади – локомотив успіху!? Анатолій Ткачук, директо...
Об’єднані територіальні громади – локомотив успіху!? Анатолій Ткачук, директо...Об’єднані територіальні громади – локомотив успіху!? Анатолій Ткачук, директо...
Об’єднані територіальні громади – локомотив успіху!? Анатолій Ткачук, директо...CSIUKRAINE
 
Recomendaciones para evitar la contaminación en el país
Recomendaciones para evitar la contaminación en el paísRecomendaciones para evitar la contaminación en el país
Recomendaciones para evitar la contaminación en el paísAle Escobar
 

Viewers also liked (13)

Bogota1
Bogota1Bogota1
Bogota1
 
Sistemas presentacion (1)
Sistemas presentacion (1)Sistemas presentacion (1)
Sistemas presentacion (1)
 
PwC Global Financial Sanctions
PwC Global Financial SanctionsPwC Global Financial Sanctions
PwC Global Financial Sanctions
 
Ofimatica
OfimaticaOfimatica
Ofimatica
 
Question 3
Question 3 Question 3
Question 3
 
Dvt 2015
Dvt 2015Dvt 2015
Dvt 2015
 
Praktické zkušenosti s Affiliate
Praktické zkušenosti s AffiliatePraktické zkušenosti s Affiliate
Praktické zkušenosti s Affiliate
 
Просторове планування для громад: схеми планування, зонування, інфраструктурн...
Просторове планування для громад: схеми планування, зонування, інфраструктурн...Просторове планування для громад: схеми планування, зонування, інфраструктурн...
Просторове планування для громад: схеми планування, зонування, інфраструктурн...
 
مراقبتهای قبل و بعد از عملیات
مراقبتهای قبل و بعد از عملیاتمراقبتهای قبل و بعد از عملیات
مراقبتهای قبل و بعد از عملیات
 
Javier crhe
Javier crheJavier crhe
Javier crhe
 
Відкриття проекту
Відкриття проектуВідкриття проекту
Відкриття проекту
 
Об’єднані територіальні громади – локомотив успіху!? Анатолій Ткачук, директо...
Об’єднані територіальні громади – локомотив успіху!? Анатолій Ткачук, директо...Об’єднані територіальні громади – локомотив успіху!? Анатолій Ткачук, директо...
Об’єднані територіальні громади – локомотив успіху!? Анатолій Ткачук, директо...
 
Recomendaciones para evitar la contaminación en el país
Recomendaciones para evitar la contaminación en el paísRecomendaciones para evitar la contaminación en el país
Recomendaciones para evitar la contaminación en el país
 

Similar to Project 10.07.16 FINAL EDIT PDF

Enterprise Ontology and Semantics
Enterprise Ontology and SemanticsEnterprise Ontology and Semantics
Enterprise Ontology and Semanticscurioz
 
Undergraduate Dissertation
Undergraduate DissertationUndergraduate Dissertation
Undergraduate DissertationPatrick Cole
 
Chang_Lu.pdf
Chang_Lu.pdfChang_Lu.pdf
Chang_Lu.pdfAbdetaImi
 
MA Business and Management Dissertation
MA Business and Management DissertationMA Business and Management Dissertation
MA Business and Management DissertationJames Macdonald
 
Business Plan for a Company Assignment Sample
Business Plan for a Company Assignment SampleBusiness Plan for a Company Assignment Sample
Business Plan for a Company Assignment SampleGlobal Assignment Help
 
Online shopping-project-documentation-template
Online shopping-project-documentation-templateOnline shopping-project-documentation-template
Online shopping-project-documentation-templateLaibaMalik17
 
Dissertation final (caa14May2016)
Dissertation final (caa14May2016)   Dissertation final (caa14May2016)
Dissertation final (caa14May2016) Alvin Sim
 
Adopting Electronic Commerce as a platform to sell products and services in t...
Adopting Electronic Commerce as a platform to sell products and services in t...Adopting Electronic Commerce as a platform to sell products and services in t...
Adopting Electronic Commerce as a platform to sell products and services in t...Anil Nair
 
Opening a Restaurant Plan Dissertation Sample
Opening a Restaurant Plan Dissertation SampleOpening a Restaurant Plan Dissertation Sample
Opening a Restaurant Plan Dissertation Sampledissertationprime
 
The relation between six sigma barriers and aerospace tier 1 suppliers
The relation between six sigma barriers and aerospace tier 1 suppliersThe relation between six sigma barriers and aerospace tier 1 suppliers
The relation between six sigma barriers and aerospace tier 1 suppliersShadi Saffour
 
Measuring Effectiveness of Fevicol Advertisements
Measuring Effectiveness of Fevicol AdvertisementsMeasuring Effectiveness of Fevicol Advertisements
Measuring Effectiveness of Fevicol AdvertisementsImran Sayed
 
MSc Dissertation: Restaurant e-menu software on iPad
MSc Dissertation: Restaurant e-menu software on iPadMSc Dissertation: Restaurant e-menu software on iPad
MSc Dissertation: Restaurant e-menu software on iPadTraitet Thepbandansuk
 
Effect of customer data analytics on delivery of customer experience in comme...
Effect of customer data analytics on delivery of customer experience in comme...Effect of customer data analytics on delivery of customer experience in comme...
Effect of customer data analytics on delivery of customer experience in comme...ShivkantSingh7
 
Nine Easy Steps for a Quick Customer Experience Tune-up
Nine Easy Steps for a Quick Customer Experience Tune-upNine Easy Steps for a Quick Customer Experience Tune-up
Nine Easy Steps for a Quick Customer Experience Tune-upSAP Asia Pacific
 
ADI SHANTANU - 2010B4PS685P
ADI SHANTANU - 2010B4PS685PADI SHANTANU - 2010B4PS685P
ADI SHANTANU - 2010B4PS685PAdi Shantanu
 
Web-Project-Management-Best-Practice-Guidelines
Web-Project-Management-Best-Practice-GuidelinesWeb-Project-Management-Best-Practice-Guidelines
Web-Project-Management-Best-Practice-GuidelinesVu Nam Hung
 

Similar to Project 10.07.16 FINAL EDIT PDF (20)

Enterprise Ontology and Semantics
Enterprise Ontology and SemanticsEnterprise Ontology and Semantics
Enterprise Ontology and Semantics
 
Undergraduate Dissertation
Undergraduate DissertationUndergraduate Dissertation
Undergraduate Dissertation
 
gcsampson2001
gcsampson2001gcsampson2001
gcsampson2001
 
Chang_Lu.pdf
Chang_Lu.pdfChang_Lu.pdf
Chang_Lu.pdf
 
MA Business and Management Dissertation
MA Business and Management DissertationMA Business and Management Dissertation
MA Business and Management Dissertation
 
Business Plan for a Company Assignment Sample
Business Plan for a Company Assignment SampleBusiness Plan for a Company Assignment Sample
Business Plan for a Company Assignment Sample
 
Online shopping-project-documentation-template
Online shopping-project-documentation-templateOnline shopping-project-documentation-template
Online shopping-project-documentation-template
 
Dissertation final (caa14May2016)
Dissertation final (caa14May2016)   Dissertation final (caa14May2016)
Dissertation final (caa14May2016)
 
Internet marketing plan
Internet marketing planInternet marketing plan
Internet marketing plan
 
Adopting Electronic Commerce as a platform to sell products and services in t...
Adopting Electronic Commerce as a platform to sell products and services in t...Adopting Electronic Commerce as a platform to sell products and services in t...
Adopting Electronic Commerce as a platform to sell products and services in t...
 
Group assignment
Group assignmentGroup assignment
Group assignment
 
Opening a Restaurant Plan Dissertation Sample
Opening a Restaurant Plan Dissertation SampleOpening a Restaurant Plan Dissertation Sample
Opening a Restaurant Plan Dissertation Sample
 
The relation between six sigma barriers and aerospace tier 1 suppliers
The relation between six sigma barriers and aerospace tier 1 suppliersThe relation between six sigma barriers and aerospace tier 1 suppliers
The relation between six sigma barriers and aerospace tier 1 suppliers
 
Business Plan Assignment Sample
Business Plan Assignment SampleBusiness Plan Assignment Sample
Business Plan Assignment Sample
 
Measuring Effectiveness of Fevicol Advertisements
Measuring Effectiveness of Fevicol AdvertisementsMeasuring Effectiveness of Fevicol Advertisements
Measuring Effectiveness of Fevicol Advertisements
 
MSc Dissertation: Restaurant e-menu software on iPad
MSc Dissertation: Restaurant e-menu software on iPadMSc Dissertation: Restaurant e-menu software on iPad
MSc Dissertation: Restaurant e-menu software on iPad
 
Effect of customer data analytics on delivery of customer experience in comme...
Effect of customer data analytics on delivery of customer experience in comme...Effect of customer data analytics on delivery of customer experience in comme...
Effect of customer data analytics on delivery of customer experience in comme...
 
Nine Easy Steps for a Quick Customer Experience Tune-up
Nine Easy Steps for a Quick Customer Experience Tune-upNine Easy Steps for a Quick Customer Experience Tune-up
Nine Easy Steps for a Quick Customer Experience Tune-up
 
ADI SHANTANU - 2010B4PS685P
ADI SHANTANU - 2010B4PS685PADI SHANTANU - 2010B4PS685P
ADI SHANTANU - 2010B4PS685P
 
Web-Project-Management-Best-Practice-Guidelines
Web-Project-Management-Best-Practice-GuidelinesWeb-Project-Management-Best-Practice-Guidelines
Web-Project-Management-Best-Practice-Guidelines
 

Project 10.07.16 FINAL EDIT PDF

  • 1. School of Engineering Implementation of Google Prediction API in the small re- tail businesses based in the United Kingdom Ivalina Ivanova STUDENT NUMBER: 3419984 A dissertation submitted in partial fulfilment of the require- ments for the degree of BSc(Hons) Computer Systems Management London South Bank University August 2016
  • 2. DECLARATION This dissertation is my original work and has not been submitted elsewhere in fulfilment of the requirements for this or any other award. Any sentences or passages taken from my previous work or other people's work have been explicitly acknowledged by explicit referencing to au- thor, source, and page(s). Any non-original illustrations are also referenced. I understand that failure to do this amounts to plagiarism and will be considered grounds for failure in this dis- sertation and the degree as a whole. Ivalina Ivanova: _____________________________
  • 3. ABSTRACT The purpose of the project is to deliver clear examples of how the retail businesses in the United Kingdom could be more competitive and how they can improve product sales by using predictive analyses. The aim of this project is achieved by using Google spreadsheet with embedded Prediction API models which represent wine features such as the origin of the wine, type of grapes, year of production, brand and wine prices, and AppSheet platform to develop the application. By using the AppSheet software, I can convert my Google spreadsheet into a mobile app and deliver clear results of how much could cost a bottle of wine from a given dataset by using predictive analysis. The cost related to the wine features could be based on purchases made in any retail shop. The finished web application combines Google spreadsheet, Prediction API trained models and represents outcomes of wine prices. Also, the small retail businesses are allowed to obtain information about the possible prices of different wine products. By providing the previous history related to the wine purchases and their prices associated with the wine features such as the origin of the wine, type of grapes, year of production and brand the sellers can predict how much it will cost to produce a bottle of wine in the future. The conclusion from this investigation discovered that the implementation of the Google Prediction API models could improve the business continuity, increase business profit and create a competitive environment for the small retail businesses in the United Kingdom.
  • 4. ACKNOWLEDGEMENT The completion of this document has been one of the most substantial academic challenges throughout my entire course. Without the provision and the help of the following participants this will be not conceivable. I would like to express a sincere gratefulness to my supervisor, Paul Carden, who agreed to undertake the role as my supervisor. His guidance and knowledge have encouraged me to de- liver the best possible outcome of the research paper. I would like to show gratitude the developers of Prediction API, Google, and AppSheet for giving me access to a range of fantastic websites, including all the information that an individual could ever need. Last but not least, I would like to show gratitude to my family and friends who have encouraged me entirely during this process.
  • 5. iv Contents DECLARATION ........................................................................................................................i ABSTRACT...............................................................................................................................ii ACKNOWLEDGEMENT ........................................................................................................iii Contents.....................................................................................................................................iv List of Figures ............................................................................................................................ v Chapter 1: Introduction .............................................................................................................. 1 1.1 Enquiry Overview ............................................................................................................ 1 1.2 Target Audience ............................................................................................................... 2 1.3 Aims and objectives ......................................................................................................... 3 1.4 Research questions ........................................................................................................... 4 1.5 Background of the subject matter..................................................................................... 4 1.6 Rationale of the study....................................................................................................... 6 1.7 Scope and Limitations...................................................................................................... 7 Chapter 2: Literature review ...................................................................................................... 8 2.1 Introduction ...................................................................................................................... 8 2.2 Conceptual Clarifications: Prediction API....................................................................... 9 2.3 Characteristics and values of using PREDICTION API within the business ................ 10 2.3.1 Ubiquity................................................................................................................... 17 Chapter 3: Technical Research................................................................................................. 17 3.1 Google Cloud Platform features and Prediction API models ........................................ 17
  • 6. v 3.1.1 Comparison between Google Cloud Platform, Amazon Machine Learning, Azure Machine Learning ............................................................................................................ 18 3.1.2 Prediction API models ............................................................................................ 21 3.2 Android and AppSheet Mobile Operating Systems ....................................................... 21 3.2.1 Android.................................................................................................................... 22 3.2.2 Use of Google Cloud console and Prediction models for the AppSheet application .......................................................................................................................................... 23 3.2.3 AppSheet ................................................................................................................. 24 3.2.4 Comparison between AppSheet and Android developments of application........... 25 Chapter 4: Research Design and Methodology........................................................................ 28 4.1 Research Approaches ..................................................................................................... 28 4.2 Research Strategy........................................................................................................... 29 4.3 Exploratory and Explanatory Research Strategies......................................................... 29 4.4 CASE STUDY ............................................................................................................... 30 4.5 Data Collection Methods................................................................................................ 30 4.5.1 Primary and Secondary Data................................................................................... 30 4.5.2 Google Spreadsheet Dataset.................................................................................... 31 4.6 Strength of methodology................................................................................................ 32 4.7 Limitations of methodology........................................................................................... 32 4.8 Ethics Considerations..................................................................................................... 33 Chapter 5: Prediction API models embedded in Google Spreadsheets and Data Analysis (De- velopment overview)................................................................................................................ 33
  • 7. vi 5.1 Fetching Data ................................................................................................................. 33 5.2 Initial State ..................................................................................................................... 36 Chapter 6: Implementation of Prediction API models within Google Spreadsheet and testing of the mobile application.......................................................................................................... 46 6.1 Google App Scripts ........................................................................................................ 46 6.2 AppSheet Application Development.............................................................................. 67 Chapter 7 Reflection and recommendations for future work................................................... 81 7.1 Introduction .................................................................................................................... 81 7.2 Evaluation of findings .................................................................................................... 82 7.3 Research data applicability to the aims and objectives of the project............................ 83 7.4 Recommendations .......................................................................................................... 85 7.4.1 Designing a Good Model ........................................................................................ 85 7.5 Conclusion...................................................................................................................... 86 7.6 Directions for further study............................................................................................ 87 7.7 Summary ........................................................................................................................ 87 References:............................................................................................................................... 88 Appendix A:............................................................................................................................. 95 Appendix B: My Basic Script .................................................................................................. 96 Appendix C: The Script associated with Google Spreadsheet................................................. 97 File 1: Prediction API code .................................................................................................. 97 File 2: Help Functions.......................................................................................................... 99 File 3: Methods for accessing values stored in the spreadsheet......................................... 101
  • 8. vii List of Figures Figure 1: Machine Learning: How does it work?(www.salesforce.com, 2016) ....................... 8 Figure 2: Prediction process (Dorard, L., 2014) ..................................................................... 18 Figure 3: Native, HTML5, or Hybrid (Korf, M and Oksman, E., 2015) ............................... 22 Figure 4: Google Spreadsheet dataset used for the purpose of the project (docs.google.com, 2016)........................................................................................................................................ 24 Figure 5: Screenshot of the Google Spreadsheet development process (docs.google.com, 2016) ................................................................................................................................................. 26 Figure 6: Dataset, missing values from cell 20B to cell 27B required for predictions (docs.google.com, 2016) ......................................................................................................... 27 Figure 7: Project development: Name selection process (cloud.google.com, 2016) .............. 28 Figure 8: First stage of the project development (cloud.google.com, 2016) .......................... 29 Figure 9: Google APIs selection options (cloud.google.com, 2016) ...................................... 29 Figure 10: Prediction API selection (cloud.google.com, 2016).............................................. 30 Figure 11: Enabling of Prediction API (cloud.google.com, 2016) ......................................... 30 Figure 12: “Try this API in APIs Explorer”: link (cloud.google.com, 2016)......................... 31 Figure 13: Prediction API training models (cloud.google.com, 2016) ................................... 31 Figure 14: Cloud Storage bucket formation (cloud.google.com, 2016).................................. 32 Figure 15: Uploading of the training dataset (cloud.google.com, 2016) ................................ 32 Figure 16: Execution process of prediction.trainedmodels.insert (cloud.google.com, 2016). 33 Figure 17: Prediction.trainedmodels.insert request and response (cloud.google.com, 2016). 34 Figure 18: Prediction.trainedmodels.get execution process (cloud.google.com, 2016) ......... 34 Figure 19: Prediction.trainedmodels.get request and response (cloud.google.com, 2016)..... 35 Figure 20: Prediction.trainedmodels.predict execution process (cloud.google.com, 2016) ... 35 Figure 21: Prediction.trainedmodels.predict request (cloud.google.com, 2016) .................... 36
  • 9. viii Figure 22: Prediction.trainedmodels.predict responses (cloud.google.com, 2016) ................ 36 Figure 23: Google App Scripts platform (script.google.com, 2016) ...................................... 37 Figure 24: Basic script used for the purpose of the project (script.google.com, 2016) .......... 38 Figure 25: Edit Project Name screenshot (script.google.com, 2016)...................................... 38 Figure 26: Execution of the main function (script.google.com, 2016) ................................... 39 Figure 27: Google Drive access request (script.google.com, 2016) ....................................... 39 Figure 28: Checking of the Console Logs (script.google.com, 2016) .................................... 40 Figure 29: Evidence of “my basic script” and “my test document” files uploaded in the Google Drive (drive.google.com, 2016) .............................................................................................. 40 Figure 30: “my test document” content (docs.google.com, 2016).......................................... 41 Figure 31: Prediction Google Spreadsheet (docs.google.com, 2016)..................................... 42 Figure 32: Google App Script associated with the spreadsheet (docs.google.com, 2016) ..... 42 Figure 33: Google App Script associated with the spreadsheet (docs.google.com, 2016) ..... 43 Figure 34: Google App Script associated with the spreadsheet (docs.google.com, 2016) ..... 44 Figure 35: Google App Script associated with the spreadsheet (docs.google.com, 2016) ..... 45 Figure 36: Activation of Prediction API (docs.google.com, 2016) ........................................ 51 Figure 37: Activation of Prediction API in the Google Developers Console (console.develop- ers.google.com, 2016) ............................................................................................................. 51 Figure 38: Enabling of Prediction API in the Google Developers Console (console.develop- ers.google.com, 2016) ............................................................................................................. 52 Figure 39: Confirmation that Prediction API has been enabled in the Google Developers Con- sole (console.developers.google.com, 2016) .......................................................................... 52 Figure 40: Excel dataset spreadsheet imported in the Google Spreadsheet (docs.google.com, 2016)........................................................................................................................................ 54 Figure 41: Selection of Excel dataset file called “spreadsheet.csv” (drive.google.com, 2016)55
  • 10. ix Figure 42: Importing: spreadsheet.csv (docs.google.com, 2016) ........................................... 56 Figure 43: Confirmation Script output: the dataset has been imported successfully (docs.google.com, 2016) ......................................................................................................... 57 Figure 44: Final edit of the Google Spreadsheet before using Prediction API models (docs.google.com, 2016) ......................................................................................................... 57 Figure 45: Authorization request for “Prediction” application (docs.google.com, 2016) ...... 58 Figure 46: Google Cloud Platform use of OAuth 2.0 for “Prediction” authentication and author- ization (cloud.google.com, 2016)............................................................................................ 59 Figure 47: Request of the INSERT method to begin the training of the dataset (docs.google.com, 2016) ......................................................................................................... 60 Figure 48: Confirmation of the INSERT method efficiency (docs.google.com, 2016).......... 60 Figure 49: “Get training status”: Confirmation of connection between Google Cloud Console project and Google Spreadsheet (docs.google.com, 2016) ..................................................... 60 Figure 50: Results from the execution process of “predict instances” model (docs.google.com, 2016)........................................................................................................................................ 61 Figure 51: Formatting of the results (docs.google.com, 2016) ............................................... 62 Figure 52: First stage of the application development (appsheet.com, 2016)......................... 63 Figure 53: Name and Category selection process required for the new application (appsheet.com, 2016) .............................................................................................................. 63 Figure 54: Selection of the Google Prediction Spreadsheet required for the application devel- opment (appsheet.com, 2016) ................................................................................................. 64 Figure 55: Setting of the Prediction application (appsheet.com, 2016).................................. 65 Figure 56: Welcome to AppSheet (appsheet.com, 2016)........................................................ 65 Figure 57: AppSheet architecture (appsheet.com, 2016) ........................................................ 66 Figure 58: Build and deploy an app in three simple steps (appsheet.com, 2016)................... 66
  • 11. x Figure 59: Customization options for the application (appsheet.com, 2016) ......................... 67 Figure 60: Entire view of the completed "Prediction" application (appsheet.com, 2016)...... 67 Figure 61: Adding entries of users (appsheet.com, 2016)....................................................... 68 Figure 62: E-mail invitation for the “Prediction” app installation (gmail.com, 2016) ........... 68 Figure 63: Google Spreadsheet results gathered from prediction models linked with the Predic- tion application (appsheet.com, 2016) .................................................................................... 69 Figure 64: Example of a wine product within the application (appsheet.com, 2016)............. 70 Figure 65: Adding a new data in the spreadsheet required for the evidence (appsheet.com, 2016) ................................................................................................................................................. 71 Figure 66: “Prediction” application before the execution of Prediction API models (appsheet.com, 2016) .............................................................................................................. 71 Figure 67: “Prediction” application after the execution of Prediction API models (appsheet.com, 2016) .............................................................................................................. 72 Figure 68: Formatting of the Columns Structure (appsheet.com, 2016)................................. 73 Figure 69: Final look of the Prediction web application (appsheet.com, 2016) ..................... 73 Figure 70: Anatomy of the Prediction mobile application (appsheet.com, 2016) .................. 74
  • 12. 1 Chapter 1: Introduction 1.1 ENQUIRY OVERVIEW The persistence of this project is to investigate how the implementation of the Google Predic- tion API will impact on the small retail businesses in the United Kingdom. The aim of this enquires overview is to inform the readers what they could expect from the rest of the research part of this project. Chapter one of the documentation presents the basis of the study through a comprehensive in- troduction. Also gives a bright idea to the reader about the aims of this project by providing contextual information and justifications of the subject matter. Furthermore, the aims and ob- jectives are related to the formation of the search. The second chapter is concerned with the review of the relevant information required for the implementation of the Google Prediction models. The aim of the section is to present a solid hypothetical basis from which the remaining part of the project will be conducted. The third chapter announces the technical review related to the project. It is separated into four subchapters- Google Cloud Platform features and Prediction API models, Android platform, Google spreadsheets and AppSheet business productivity solution. The technical research is based on the application development which could be used to deliver a positive impact on the small retail businesses, with a particular focus on the United Kingdom. Chapter four is primarily focused on the research methodology implemented in this dissertation. An important feature of this chapter is the justification of the selected research path. Further- more, the carefully chosen research pattern, the data gathering methods, and the ethical issues
  • 13. 2 are considered in this chapter. The chapter introduces the process of storing the dataset used for the predictions in the Google spreadsheet. Chapter five presents the production and the examination of the gathered information. A deliv- ery of a comprehensive account of the themes assembled from the relations between the dis- coveries and the literature and also describes the usage of Prediction API within Google Cloud Console. Chapter six discover step-by-step the development of the mobile application and the testing of the application and the dataset. Chapter seven represents my personal involvement through the steps of writing this dissertation, the evaluation of the thesis, and the future improvements of the different parts of the application. The chapter aims to examine the results assimilated in the investigation according to the project objectives stated at the beginning of the subject matter. Then, chapter seven provides practical recommendations for the small retail businesses regarding the implementation of the Google Prediction API. 1.2 TARGET AUDIENCE The project will be beneficial to every person who want to gain experience with Prediction API models and develop a web application by using Google spreadsheet and AppSheet solution, used for representing real values of possible cost of products. It is very impressive how both the Google spreadsheet with embedded Prediction APIs models and AppSheet combined could create a better competitive advantage for the small retail businesses by presenting possible real values of the products that could be provided to the customers.
  • 14. 3 The project is targeting the small retail businesses in the United Kingdom that need to improve business sales and meet the customer’s expectations. The use of Google Prediction APIs deliv- ers a range of benefits such as better competitive advantage, low operational cost, sales growth, customer satisfaction and business continuity. Taken into consideration by using Prediction API models the small retail businesses could manage their activities more efficiently. 1.3 AIMS AND OBJECTIVES The purpose of this dissertation is to discover the possible outcomes of implementing the Google Prediction models into the small retail businesses based in the United Kingdom. This project will analyse the results of developing application practices and applying it to the partic- ular case to present the values to the business. These research purposes are to accomplish the following objectives: - To review current literature associated with the Google Prediction API and the ways of devel- oping a predictive application. - To classify the key benefits of implementing the Prediction API into the small retail busi- nesses. - To formulate some practical background on how the application could be used as a premedi- tated tool to achieve business objectives. 1.4 RESEARCH QUESTIONS In order to measure the influence of the Prediction API implementation, the following questions must be answered in this research paper to attain the objectives stated above. The research questions are as follows:
  • 15. 4 - What are the current predictive technologies? - How can Google Prediction API be used to develop a decision-making application? - What is the outcome of implementing the Google Prediction API into the small retail businesses in the United Kingdom? - How Predictive application could be used as a strategic tool to achieve business objectives? 1.5 BACKGROUND OF THE SUBJECT MATTER To involve the readers of this document into the issue, I will introduce what is a Machine Learn- ing and the Prediction API with some fundamentals. Machine Learning is linked to the artificial intelligence (AI) which means that the computers can learn without being programmed (Mar- garet Rouse, 2016). Fundamentally, it is a process of gathering predictions based on some data related to the problem (G, 2010). By using our training data, Prediction API models can absorb it and predict numeric values or select a class that defines a new piece of data. With these competencies, users can develop applications and achieve tasks such as predicting what goods an individual might like, classifying emails as spam or non-spam, evaluating whether feedbacks have a positive or a negative sentiment, or predicting how much could cost a bottle of wine for a period. According to the project aim which is developing an application and representing possible prices of wine products, the data is correlated to the wine features such as the origin of the wine, type of grapes, year of production and brand. Machine Learning is based on examples, so I will provide examples of ML to explain the con- cepts (Dorard, 2014). The rest of the research paper will emphasise the development of the
  • 16. 5 Prediction API in use. I will continue with the review of the Prediction API to show how it will be implemented on an actual case. The following picture represents how Machine Learning works, Fig. 1. Figure 1: Machine Learning: How does it work? (Salesforce, 2016) The development process of the application is related with Cloud Computing which provides great opportunities to organizations to become more co-operative and mobile. The motives for choosing this topic are based on accomplishing the following aims: - Delivering clear evidence that the businesses could increase profit by implementing Prediction API models; - Providing clear evidence that the businesses will reduce business costs; - Delivering clear evidence that the businesses will develop a competitive advantage; For practical implementation of Google Prediction API, the companies need to use Google Cloud Console and Google Cloud Storage where the information will be kept. The Cloud Stor-
  • 17. 6 age is automatically empowered on every Google Cloud project, and the documentation pub- lished in the Google Cloud Platform represents all the steps of using predictive models (Google Cloud Platform, 19 August 2016). 1.6 RATIONALE OF THE STUDY Nowadays, computers are excellent at processing information. An example of that are the mil- lions of messages sent to the Twitter servers, which have to figure out the trends of the topics in real time (Dorard, 2014). The problem here is based on the lack of intelligence which means that the servers must be precisely programmed with the list of basic commands to perform efficiently. It is a huge challenge to do specific things that people do very simply, but for which the computers are not able to figure out the exact procedure. An example of this is the recogni- tion of the handwritten digits. For us is an easy task, but computers need to be programmed. There are various methods to make computers do "intelligent" or "human-like" things (ibid., 2014) and they are related to the Artificial Intelligence (AI). An example of this is playing chess. The AI methods in chess programs work by probing possible categorizations of moves (player one will make one move, then player two could make these moves, then player one could make those moves, etc.). By assessing who has better precedence at the end of each of these possible categorizations, the program will choose the winner. Machine Learning (ML) combines some AI methods where intelligence is based on examples (Brownlee, 2016). Let’s look at the hand-written digits; we can customize ML by giving sam- ples of hand-written digits as scanned images, between 0 and 9. These examples will create our "data". The idea is to deliver a new image of a hand-written number which has never been used before and by comparison to the scanned images, the ML will provide a prediction based on the
  • 18. 7 most similar example to the new picture (Dorard, 2014). The process is very close to what we would do, and the ML is about making machines replicate how individuals learn. According to the aim of this project by using Prediction APIs, the businesses will be able to predict how much could cost a bottle of wine based on examples of wine products and their prices. 
 1.7 SCOPE AND LIMITATIONS The feasibility of the project builds on the extent of the investigation and its progress. For this purpose, has been chosen limited to the particular field of businesses headquartered in the United Kingdom. The percentage of opening new markets increase with every single day and the small retail shops are a promising marvel according to the growing of the customer’s de- mand for goods. The research project utilizes resources related to the businesses that have been already imple- mented Prediction API models, including the development of an application, as well as other websites and books. Examples of how Prediction API models could be applied to any business are expressed in the literature review. They are based on the values from implementing the Prediction API within the business. Also, the range of the study is limited because of time and financial restrictions which constrain the scope of this project. Therefore, to simplify the results, the dataset requires more examples of wine products and contributors from different retail shops. Also, the information gathered for this investigation will be restricted to what is available regarding subordinate resources from various websites, books, and journals.
  • 19. 8 However, the conclusion from this study will play a significant role in understanding the busi- ness influences in consumer’s life. In spite of the limitations according to this research project the challenge is to create an application from which retail businesses can enhance their market- ing communication, increase their profit and their competitive advantage in the United King- dom. Chapter 2: Literature review 2.1 INTRODUCTION The literature review is a significant part of the dissertation which relates the project aims and discoveries and also shows an in-depth grasp of the subject matter (Royal Literary Fund, 2016). This chapter intends to review literature based on examples of already implemented Prediction API models within the business and how individuals can build Machine Learning models. I will investigate research which provides a clear understanding of how machine learning tools could help for sufficient sentiment analysis. The aim is to collect theoretical literature and develop a reliable investigation. The chapter is written in a way where I am following the project objectives and use them as guidance. Section 2.2 aim is to deliver a clear understanding of what the Prediction API definitional term means. Section 2.3 provide the values of using Prediction API models and mobile applications for the business needs.
  • 20. 9 2.2 CONCEPTUAL CLARIFICATIONS: PREDICTION API By using Google Cloud Platform, I was able to understand the meaning of Prediction API. On the question, “What is the Prediction API?” the following answer could be given: The Predic- tion API performs in specific tasks. By providing a new item to the Prediction API models, we can receive numeric value for that item based on comparable examples in the training data (Google Cloud Platform, 2016). We can refer to the example mentioned in Chapter 1 for the scanned hand-written images. Critically viewed there has been less information published about the Prediction API as a term. According to (Casalboni, 12 May 2015), Google Prediction API provides a RESTful interface which means Representational Web Transfer. The principles are easy to follow: - Connect to the server. - Provide a VERB and a path to a URL. - Request an answer. The RESTful interface is used to build Machine Learning models for the purpose of this project. REST could be explained as an interface that works like a website in a browser, and the resource is exposed to a program via a URL (Zazueta, 09 October 2013). To be more specific, a well- designed RESTful API will include additional links and the programme can follow them to request the related information. 2.3 CHARACTERISTICS AND VALUES OF USING PREDICTION API WITHIN THE BUSINESS There are parts of this literature review section, which could be originally found in my Research and Professional Practice (BIF_5_RPP_1516) module project proposal.
  • 21. 10 For a better understanding of the benefits of Prediction API implementation, it is essential to comprehend the features that allow small retail businesses to leverage Prediction API models as a part of their business strategy. Several authors have documented the key features of Google Prediction API (Dorard, 2014), (Brownlee, 2016) and (Siegel, 11 January 2016). The aim of reviewing the literature based on Prediction APIs is to define the way of how to develop an application presenting the cost of different wine products which will improve my professional skills and capabilities. There is a significant number of documentary grounded on developing of applications. Though the investigation is focused on Prediction APIs they will be not revised in detail, only will be mentioned if they are suitable. In the analysis carried out according to machine learning, (Dorard, 2014) delivers the first guide for Prediction APIs and describes the steps of how to custom applications and express individ- ual machine learning problem according to business purposes. Furthermore, (Kumar, 05 August 2013) states that demographic variables can predict the purchase decisions of users. The author describes how in Chennai city premium car owners predict buyer’s choice by using Prediction API which is related to their age, education, lifestyle, sex…etc. The example provided by (ibid., 2013) helps to understand how businesses can target groups, develop a marketing strategy and predict customer’s intention. In the review of “Bootstrapping Machine Learning” (Dorard, 2014) provides clear examples of what exactly is Machine Learning, the tips for gaining experience with Google prediction services and ways to build up prediction models. The author represents the characteristics of Prediction API and delivers information of how to exploit the value of the information in different types of businesses or applications.
  • 22. 11 Dorard, (2013) identifies how Machine Learning works and the limitations that a user may face during the developing process. The benefits of following his guidance are as follows: - Individuals can improve user’s experience within the apps, by observing customer’s behaviour and then by using Prediction API models to figure out users’ needs and desires. - Individuals can understand the value of user data and analyse prospects or predict possible goods revenue. - People who are interested in business development will be able to differentiate their business and create competitive advantage by using smart app features. According to Mulholland & P. Mc Kevitt, (10 June 2015) the participation of users could raise levels by the use of Prediction API and is conceivable by selecting the best content from a set of media resources. The architecture named 360-MAMSelect is described by the authors and apply sentiment examination for the endorsement of media assets. Mulholland & P. Mc Kevitt, (ibid., 2015) evaluate two models for sentiment examination such as EmoSenticNet and Google Prediction API related to the purpose of this project. There are cases of how Google Prediction API models could be applied for business purposes. Judgmentally viewed the assortment of materials related to the project aim is problematic. As an investigator, I had to select some of the literature and ignore others. To be more specific, I will reference Yuanzhuo Wang, (09 September 2015) that describes the game-theoretic method as a tool that can predicts buying behaviours up to 70%. The material is investigated only for personal awareness and is not appropriate for the aim of this project. The reason is that the game theoretic method is related to the social websites, where the objective of the project is to con- sider approaches, which are associated with the small retail businesses. The value of being
  • 23. 12 aware of the game theoretic method is the opportunity to relate the findings with the other out- comes from the study. Google corporation is acknowledged as a leader in developing advanced applications. “Google Prediction API” is the example of this set which distributes pattern-matching capabilities (Google Cloud Platform, 19 August 2016). With predictive models and user’s history of buying products, developers can predict future products that a customer might like. Prediction API models could help businesses to classify e-mails as spam or non-spam (Agrawal, 18 March 2013). Example: With gmail.com the e-mails are automatically categorised; eBay application has the capability to estimate the effect of posted comments and define them as positive or negative (Dorard, 2014). Following my objectives by using the predictive application the small retail businesses will be able to presume how much could cost a bottle of wine at certain day by using the information of the previous history of wine sales. In the review of Machine Learning Casalboni, (12 May 2015) states that the most suitable way of using machine learning algorithms is in “black box” mode. To develop the application, which will be delivered to the small retail businesses in the United Kingdom, I need to be aware of the possible outcomes from the algorithms and need to use adequate resources. The method is ac- ceptable for offline testing because I will be able to appraise the correctness of predictions. Furthermore, Prediction API is an excellent option and does not need any infrastructure. The following authors Tian, T., Ae Chun, S., and Geller, G., (2011) declare that a prediction model for web search hit counts by using word frequencies. The discoveries are based on the use of Google Prediction API as a search engine. Tian Tian, (ibid., 2011) defines that users can find accurate and relevant data, based on their search purposes within a few hits. Critically viewed, trying to find useful links or research papers in google.com could result in hundreds or even thousands of articles. The authors offer query rewriting methods for producing different query strings. Tian, Tian (ibid., 2011) provide evaluation testing of the hit count prediction
  • 24. 13 model for the search engines such as Google and Bing. The method illustrated by the authors is a clear example of how the implementation of Prediction API search engine could result in better user experience while buying goods. “Prediction of Consumer Purchase Decision using Demographic Variables: A Study concerning Premium Car” is a journal provided by Kumar, S., (2013) appropriate for the aim of my investigation because the author investigates different aspects of how Prediction API models can be implemented efficiently. Small retail businesses are following certain rules to satisfy their customers by providing products based on individuals needs and desires. In the review of the document Kumar, S., (ibid., 2013) evaluates how organizations distinguish their goods related to the lifestyle, age, education…etc. Also, the author provides information about how premium vehicle holders in Chennai city use Prediction APIs and the ways of predicting the consumer’s decision to buy an individual product. The example has been used to understand the ways of targeting a group and developing a marketing strategy for prediction of customer’s intention. Furthermore, H. Onur Bodur, (22 March 2014) presents the topic “Will You Purchase Environmentally Friendly Products? Using Prediction Requests to Increase Choice of Sustainable Products” which is related to commitment-based interventions. According to H. Onur Bodur, (ibid., 2014) the commitment-based paternalism is the most appropriate approach for inspiring environmental behaviours. The example mentioned by the author delivers a clear understanding of how Prediction Requests usage leads to an efficient mass communication strategy and impact behaviour among a huge audience. To gather data for any investigation, individuals must investigate materials from a significant number of websites, online published documentation, and video tutorials, which is time-consuming and most of the time inaccurate. H. Onur Bodur, (ibid., 2014) declares that by using his approach individuals will be able to gather a lot of evidence and see the effectiveness of prediction requests method.
  • 25. 14 Following the aim of the project for the efficient development of the predictive application, I had to implement a simple programming script. In the review of programming languages Barry, P., (2010) provides examples of simple programming scripts required for the development of Google Prediction API and also explains how most of APIs are build. Similarly, Dorard, (2014), Cloud Academy, (2016), Agrawal, (18 March 2013), Brownlee, (2016) and Google Cloud Platform, (2016) have also examined the ways of developing Prediction API models and their implementation. Another beneficial journal is “How to Use Google’s Prediction API to Dig into AdWords” written by Brennan, M., (2015). The author states that machine learning can enhance the results when the information is added and expand predictions based on the response of the participants. Brennan, M., (ibid., 2015) introduces different API learning algorithms and the ways of how the data can be analysed. Through the research process, I had the chance to participate in a blog where Casalboni, A., (2015) offers guidance which delivers a better understanding of using the predictive application via the RESTful interface and also I had the opportunity to get experienced with the software available on the Google Cloud Platform. The Cloud Academy, (2016) delivers excellent sources of information, because of training courses, provides video tutorials and documentation necessary for beginners who are ready to get involved in the process of development applications. Again Brennan, (27 May 2015) identifies different approaches of the Google API keys for success and also delivers material of what are APIs and how they work. According to the purpose of this project, I was able to relate the strategies to the dissertation aims and objectives.
  • 26. 15 Also, Ohri, (30 July 2012) evaluates cases that have been already implemented Prediction API and describes the Purchase Prediction model as a tool which increases customer’s satisfaction by efficient use of it. The examples are: The giant tech companies such as Google, Yahoo, and Microsoft use Machine Learning widely to achieve tasks that involve intelligence on a huge scale. They provide personalized content to each visitor to their web pages by predicting what could engage each of the users. Facebook gives examples of data that we could be interested. To be more specific this could be different articles or people that we might know, also after selecting a photo, the app scans the image for faces, and we can tag the person whose face appears on the picture. One of the video tutorials provided by Doraisamy, (30 October 2014) is based on how Google Prediction APIs help businesses to deliver better customer service. The author associates user’s intelligence and software as a service (SaaS) which are quite related. Doraisamy, (ibid., 2014) delivers information of how Google APIs understand user’s intention by typing into the browser a few keywords. On the other hand, QVSource, (25 September 2013) provides a guidance of how to create a training data and implement Google Prediction models by using QlikView and QVSource. It is a great option for getting experienced with prediction models if you are not quite experienced. By using QlikView and QVSource individuals can create a sentiment prediction model on the Google Prediction Connector. Examples are: - Email classification - Spam Detection - Language Detection The author provides examples of how the training data should look like and the steps of uploading the dataset. By using a user’s past viewing habits, developers can analyse user’s feedbacks and determine if they have a positive or negative impact. Critically viewed the
  • 27. 16 examples provided by Doraisamy, (30 October 2014) and QVSource, (25 September 2013) are not going to be used for the purpose of this project. They require an investment for the efficient use of the sources, but the information will help me to understand the concepts of implementing Prediction API within the business. 2.3.1 Ubiquity The aptitude of individuals to obtain data from any location whenever they want and also to perform transactions refers to ubiquity (Clarke, I., 2001). According to the project, mobile phones are an excellent example of universality which is the reason to decide to develop a mobile application that could deliver easy access to the information gathered from predictions. With the cell phones, individuals can reach any application by connecting to the internet (Richard T. Watson, September 2002). Small retail businesses can implement mobile device capability to be universal while offering goods that are related to the customer expectations. Chapter 3: Technical Research 3.1 GOOGLE CLOUD PLATFORM FEATURES AND PREDICTION API MODELS 3.1.1 Comparison between Google Cloud Platform, Amazon Machine Learning, Azure Machine Learning To provide the reasons for choosing Google Prediction API models in Google Cloud Platform, I had to explain the difference between Amazon Machine Learning, Azure Machine Learning, and Google Cloud Platform.
  • 28. 17 Amazon ML and Azure ML are relative newcomers in the cloud-based market while Google Cloud Platform has been released in 2011 and offers more stable and secure way to get experi- enced with Machine Learning models (Robust, 14 April 2015). The industry of the Machine Learning continues to grow, and numerous tools have been devel- oped to provide access to advanced learning algorithms with a minimal effort. The approach “feed in data, get an answer back” it’s a great option for businesses to implement Machine Learning solutions (Almeida, 12 May 2015). The reason for choosing Machine Learning ap- proach is that the tools are built by some of the best experts in the ML field. The services that have been investigated in this research paper are Amazon Machine Learning service, Microsoft Machine Learning Studio, and Google Machine Learning solution. I am fo- cusing on the service functionalities, and I will cover the uploading of the data. To be able to perform the tests, I had to use the services’ consoles. The summary below delivers the aspects of data sourcing and what should be considered when individuals are choosing a service: - Data sources. - Formats - The maximum size of the data types. Amazon Machine Learning: - Data sources: The text file needs to be uploaded into S3; AWS RDS; AWS Redshift; AWS S3 table. - Data formats: CSV file; S3 or Redshift database. - Dataset maximum size 100GB. - Data types: Boolean; categorical; numeric; string.
  • 29. 18 - AWS supports the major dataset for batch training. Microsoft Azure Machine Learning - Data sources: The file needs to be uploaded in Azure Storage. It could be SQL database; web URL; Hadoop HiveQL. - Data formats: CSV and txt files; Hive/ SQL tables; OData values; zip; RData. - Dataset maximum size 10GB. - Data types: Boolean; categorical; date time; numeric; string; timespan. - Microsoft Azure has the broadest variation of data sources and formats. Google Cloud Platform - Data sources: The text file needs to be uploaded into Google Storage; Google spreadsheets; HTTPS requests; API update calls. - Data formats: txt file; spreadsheets; JSON. - Dataset maximum size: text file should be maximum 2.5GB; HTTP request is maximum 2MB. - Data types: Numeric; String. I need to mention that both AWS and MS Azure can read data from tables uploaded in their storage services. From my point of view, the MS Azure provides flexibility for the data sourcing and data processing, but Google provides the key feature in ML applications. As I have men- tioned before individuals, get access to incremental training and also allows the use of virtually
  • 30. 19 infinite data. Finally, Amazon ML data processing capabilities are in between the other two; there are some functionalities, but not too many. According to the project aim, the models could be trained on uploaded text files with all types of services, but the reason to choose Prediction API within Google is that the platform supports update calls, which means by adding more information I could send more requests to the same training model. Also, Google Cloud Platform offers a free trial version which has been used for the purpose of this project. I had to sign up by using my Google account which allows me to use the models and get maximum 100 predictions per day for the period of six months. Critically viewed the internet connection is crucial for the efficient use of the models. The data is kept in the Google cloud storage, and there are no restrictions on the amount of the data uploaded within the project. 3.1.2 Prediction API models The Machine Learning algorithm consist the following two algorithms: a training algorithm and a prediction algorithm. • The training algorithm involves learning a model from examples (data). The training algo- rithm is also known as learning algorithm and takes a set of input-output models, or training dataset, and generates a model by examining this dataset (Dorard, 2014). • A prediction algorithm uses the training model and a new input and delivers an output value. To be more specific, we make a prediction of an output based on a given input (data) against a model, Fig. 2.
  • 31. 20 Figure 2: Prediction process (Dorard, L., 2014) 3.2 ANDROID AND APPSHEET MOBILE OPERATING SYSTEMS Nowadays the mobile applications are increasing their complex capabilities which lead to the variability of platforms and operating systems accessibility. All of us are using a variety of mobile software such as internet browsers, games, videos which make us linked to the phones. The reason is the design of the application if it meets our requirements we will install the app. The assortment of features, processing speed, user interface, and the existing applications depend on the operational system of the given device (Studio, 2016). 3.2.1 Android “Android is an open source software stack that includes the operating system, the middleware, the main applications and a range of API libraries used for developing applications to determine the design of the mobile handset” Meier, R., (2009) and also provisions ordinary hardware cell phones. According to Meier, R., (ibid., 2009) Android provides free mobile software fulfilment for the developers and handset builders. To be more specific, the Android was developed by Google in 2005 and is maintained by the Open Handset Alliance which involves more than 30
  • 32. 21 firms together with hardware constructors, software developers and mobile carriers who work organized and deliver software satisfaction. “Android incorporates a Linux kernel that is taking care of the primary services such as the memory and power management process, security and the network. The kernel also provides an abstraction layer between the hardware and the stack remains”, Ahmad and Khan (2013). To develop applications users, need to use Java programming language, but the requests are executed by the usage of Dalvik VM which ensures efficiency. According to Parida, A., (2013) the Dalvik virtual machine is built to transform the classes of Java language into a bytecode interpretation-machine code commands. Wagoner, A., (2016) claims that the original version of Google Play was Google’s Android applications market, where individuals could download diverse Android applications appropriate for any devices. The most vital problem concerning the Android devices is disintegration. Some Android operational systems that possess user requirements are not well-suited with other versions of Android OS. In this situation, an Android device can be executed on previous types of Android OS, but cannot update information while running on the newest ones which are a problem when developers need to design an Android application. The inventers need to be more cautious during the development procedure and certify the capability with the previous versions of the operational system, dissimilar sizes of the screen, input gestures, etc. (Vassallo, E., 2014). According to the aim of this project and the decision of using Google services, I have to mention that Google made changes to avoid problems with the fragmentation (ibid., 2014). Google Play turn out to be more important than the operation system necessities when developing an application. The Google Play store is used for copying the main services that are essential to execute applications on an Android device. The important Android features and the application
  • 33. 22 fundamentals are taken from the operating system to the Google Play store to guarantee that the requests could be executed with the new features and applied in all types of devices (ibid., 2014). 3.2.2 Use of Google Cloud console and Prediction models for the AppSheet appli- cation To develop a mobile application on an AppSheet platform is used Google Cloud Console that permits a smooth execution and customization of the predictive models with the application. Prediction API is kept in Google Cloud platform and permits users to experience several models of a certain area by training the dataset uploaded to the website (Console, 2016). For the connection, API key is essential; it is free, and it can be used by many people (Google Cloud Platform, 2016). It is regularly updated and worldwide supported. The benefit is that Google is responsible for the maintenance of it. The application development will be explained in Chapter 5 and Chapter 6. 3.2.3 AppSheet AppSheet is a platform which does not require coding skills and competencies and the platform could be used by everyone for free. It is a business productivity solution which provides a con- tent display, note-taking, different forms and workflow for business scenarios (Play, 2016). Users can develop applications by converting Google spreadsheets into mobile apps. With the AppSheet everyone can create and deploy mobile solutions for any business based on the data uploaded in the Google Sheets (Sphon, 25 January 2016). The reason for choosing AppSheet for the development my application is because does not require any coding skills, it is an easy solution to develop applications, and there are no hidden
  • 34. 23 costs. To be more precise for the aim of this project, the AppSheet will use the data from my Google spreadsheet and display the outcomes generated from prediction models in an interac- tive way through the AppSheet mobile app. 3.2.3.1 Google Spreadsheets I have mentioned that for the purpose of this project is going to be used a Google spreadsheet which is a web-based application that delivers options to modify spreadsheets, to create new ones, to update old information and share the data online (Rouse, 2016). The programme is Ajax-based and is well-matched with CSV files which represent comma- separated values and Microsoft Excel. Google’s product delivers features which are typical for spreadsheets. Examples are the aptitude to add columns, delete columns and manage rows. One of the facts is that a beta version of Google Spreadsheets was offered to Google subscribers in June 2006 which offer lightweight (ibid., 2016). The dataset related to the spreadsheet used for the application development will be provided in Chapter 4. 3.2.4 Comparison between AppSheet and Android developments of application 3.2.4.1 AppSheet applications The AppSheet application enables numerous, geographically isolated operators to cooperate in real-time and chat over a built-in instant messaging program while working on a spreadsheet. Individuals can upload spreadsheets straight from their computers. AppSheet is a good solution for more than a few scenarios, such as: - Working with remote teams where the uploaded Spreadsheets in Google Drive are connected with the remote users via the AppSheet App. The remote users can access the
  • 35. 24 data in simplified ways and add, edit or delete information to complete the workflow (Play, 2016). - Project Management: People over the world manage their projects over Google Sheets. To be more specific, project managers use AppSheet to display and share data by a mobile device with other team players and stakeholders. Through the settings, the data could be centralized in a core spreadsheet and displayed only for a particular audience (ibid., 2016). According to the purpose of the project the AppSheet offers a solution for Customer Engage- ment where small retail businesses in the United Kingdom can keep track of business pipeline on a Google Sheet. Another benefit is that the data could be accessed through the AppSheet for an enhanced and streamlined view (Rouse, 2016). Examples are building catalogues using im- age galleries (wine samples and prices) to keep the customers updated with recent offers or sending emails to contracts recorded in the spreadsheet. 3.2.4.2 Android Applications Nowadays, the mobile applications have a significant influence on the everyday life. While developing the application, few factors need to be considered such as device functionality, security, offline capability. To investigate which is the most appropriate type of the application for my project, I had to mention the following types of applications – native, web and hybrid one (Saccomani, P., 2012). The developers who are using a particular platform such as Android must develop a Native application due to the usage of all available device features. As we know, the applications could be reached via device icons and downloaded from an Android app store called Google Play. To be more specific, the native applications have a range of touch features such as double taps, UI
  • 36. 25 gestures, fast API graphics, which are highly essential for playing games and producing interactive reports. Native applications require highly relevant programming background which makes them more complicated compared to the AppSheet applications because they necessitate highly relevant programming skills. According to Korf, M., Oksman, E., (2015), the application is active immediately, performs fast and possesses a consistent look. Mobile web applications could be explained as a collection of web pages, which are executed within a mobile browser. The programming languages that could be used are HTML5, JavaScript, and CSS. The process of building cross-platform mobile applications entitles HTML5 programming language which allows the bug to be fixed easily together with the operation of adding features and positioned to the final users. In comparison, AppSheet applications do not require any coding skills and competencies. The grouping between native and web application form the third category of applications named hybrid. To be more specific, the HTML application is placed in a native container, for example, Adobe PhoneGap. The benefit of using Hybrid applications relates to the application usage on dissimilar platforms with no further development effort and cost (ibid., 2015), Fig. 3.
  • 37. 26 Figure 3: Native, HTML5, or Hybrid (Korf, M, and Oksman, E., 2015) It seems that both development platforms deliver some welfares and disadvantages. Based on the application interface appearance, hybrid applications require HTML5 and CSS3 to provide additional adaptive and lively content. However, the native applications contain tools used for the design creation of the native interface together with user collaboration involvement that is not accessible for hybrid applications. To summarise for the purpose of the project, AppSheet application development solution is used instead of Android development environment. It is free of charge to develop mobile ap- plications by using AppSheet development technology because it delivers tools and options that reduce the development time. Also, the AppSheet applications could be executed on any mobile platform (iPhone, Android, Windows) and it does not require coding.
  • 38. 27 Chapter 4: Research Design and Methodology 4.1 RESEARCH APPROACHES According to the purpose of the project, two approaches can be differentiated: deductive and inductive. The deductive approach could be explained as the developing of a concept and hy- pothesis observed and measured to approve the idea (Alan Bryman, 2008). Also, Altinay and Paraskevas (2008) emphasize that a deductive method is used to clarify the connection that occurs among the variables under observation. Furthermore, Swanson and Holton (2005) states that deductive method involves time-consuming and requires a good understanding of the topic under the investigation. However, in an inductive approach (Alan Bryman, 2008) states that is necessary to avoid spe- cific observations and choose wider overviews and concepts. According to Creswell (2000), a few practical criteria’s can support the result concerning the proper research utilization of the approaches. Furthermore, it is designated that selecting a topic which is relatively new and there is a lack of literature related to it, is better to apply an inductive approach for generating infor- mation which could be analyzed for the possible themes. Thus, concerning that the project is focused on Prediction API models which are relatively new, and there is a lack of extensive literature, I had to build up the application based on existing theory to the mobile applications in developing companies. To summarize the use of the above research approaches, I will relate the research questions with the inductive and deductive approach. - What are the current predictive technologies? Objective one: The investigation is conducted in inductive approach where has been collected a relevant data to the project aim.
  • 39. 28 - How can Google Prediction API be used to develop a decision-making application? Objective one: The information is gathered by applying the inductive approach. I have made several observations, and then the information from the literature review has been used to deliver a more general set of propositions. - What is the outcome of implementing the Google Prediction API into the small retail businesses in the United Kingdom? The second objective is related to this question and has been examined by applying deductive approach. I have decided to move from a more general level to the specific one. I have investigated how other individuals are using Prediction API and how they applied the models to the particular case. This has been conceivable by using the documentation published in the Google Cloud Platform (Google Cloud Platform, 2016). - How Predictive application could be utilized as a strategic tool to achieve business objectives? The third objective has been examined by using the deductive approach. Where the review of documentary published by (Gaur, 20 April 16), (Green, 10 May 2011), (Irani, 29 March 2016), (Mombrea, 29 September 2011) and (Pathak, 15 December 2015) deliver the necessary key steps of using predictive applications. 4.2 RESEARCH STRATEGY According to Saunders (2009), there are different research strategies which could be used to- gether.
  • 40. 29 4.3 EXPLORATORY AND EXPLANATORY RESEARCH STRATEGIES For the purpose of this project have been used an exploratory and explanatory research strate- gies which exclude the descriptive research approach for the following reason. The descriptive investigation intention is “to portray an accurate profile of the person, events, and situations” (Robson, 2002), and it does not appear to be the suitable method of choice for this project. According to Saunders (2009) the explanatory research “establishes causal rela- tionships between variables”. A causal research characterizes the affiliation between variables such as predicting the impact of value on sales (Coldwell and Herbst, 2004) and is more appro- priate to the experimental form and the purpose of this project (Hakim, 2000). The exploratory research strategy is used to clarify unclear problems and depends on qualitative methods to expand the understanding of the research problem (Hair, 2011). In fact, the purpose of the dissertation relies on facts and figures, which forms the project aim. 4.4 CASE STUDY For the achievement of the project objectives, the research has been conducted by implementing a case study strategy. To be more specific by following this approach I will be able to conduct an in-depth investigation of a particular present-day subject which in my case is Prediction API implementation within the business. The reason for implementing a case study method is to be aware of the social context of the subject matter which is essential to understand the observable facts (Alan Bryman, 2008). According to Yin (2009), the case study strategy is the most suitable way to represent a unique topic. Following the aim of this project which is to developing an application by using Prediction API models are considered that case study strategy is the most suitable way for the achievement of the project objectives. The additional reasons for this choice are clarified in section 4.5.
  • 41. 30 4.5 DATA COLLECTION METHODS 4.5.1 Primary and Secondary Data Secondary sources are the data that has been already gathered and is readily accessible from other sources (Saunders, 2009). With regards to the secondary data used in this project, there is a lack of wide-ranging literature according to the Prediction API implementation in the United Kingdom which impacts the ability to determine any assumptions on the research objectives. Primary sources are the data collected by the researcher for the purpose of the dissertation (ibid., 2009). Critically viewed collection of primary data requires a lot of time and user’s participa- tion, this is the reason of using secondary data mainly for the project. The secondary research offers the most suitable approach to exposure the research objectives which delivers already proven investigation methods. 4.5.2 Google Spreadsheet Dataset The spreadsheet dataset used for the application development is shown in Fig. 4. Figure 4: Google Spreadsheet dataset used for the purpose of the project (docs.google.com, 2016)
  • 42. 31 The purpose of using Google spreadsheet within AppSheet is to represent pricing optimization. To be more specific, the following information will deliver a clear view of what about is the spreadsheet. The spreadsheet is orientated to the small retail shops based in the United King- dom. - Description: The spreadsheet includes information about new wine products within an existing category of wine products that have been sold, and the aim is to predict how small retail businesses should price the new bottle of wines. - Question asked: "What should be the price of the new bottles of wine. - The type of the Machine Learning problem is Regression. The regression is a statistical method for assessing the relationships between variables. - Input: Wine products. - Features: Information about each of the wine products such as region, rating, the type of grapes, year of production, brand and sales price. - Output: Price. - Data collection: The small retail businesses needs to log the amount every time a prod- uct of the same category has been sold. - How predictions are used: Small retail businesses need to set the price of each wine product to the value provided by the predictive model. As we know the prices are likely to change over time and the benefit of using Google Prediction models is that the data could frequently be updated with new information.
  • 43. 32 4.6 STRENGTH OF METHODOLOGY The key advantage of the methodology is the evidence of overall findings of the Prediction application development and implementation which have been achieved by using the induc- tive and deductive approaches. The essential part of this project is to understand the impact of implementing Prediction application on small retail businesses in the United Kingdom where the deductive approach allows me to deliver outcomes which are straight to the point. 4.7 LIMITATIONS OF METHODOLOGY However, regardless of the advantages deliberated above the methodology also has several dis- advantages. According to (Jordan, 2016), the main problem of the inductive method is related to the project observations. Jordan (ibid., 2016) states that few observations are not enough for valid conclusions. The investigation process needs to be continued for sufficient results. Also, this methodology has a tendency to be more problematic regarding investigating the develop- ment process of Prediction application. An additional disadvantage of this investigation is re- lated to the process of application development. As an inexperienced investigator, this may negatively influence the project design. 4.8 ETHICS CONSIDERATIONS According to (Blumberg, 2005), the ethics are related to the moral principles that administer a user’s behavior and relationships with others. Ethics are linked with the collection of the pri- mary data regarding the rights of the contributors. The purpose of the ethics consideration is to ensure that contributors are not going to be harmed or suffer from adverse consequences during the research process (ibid., 2005). Also, the ethics such as privacy and liability of the researcher
  • 44. 33 are considered. Thus, to avoid any ethical issues, the primary goals of the subject matter were clearly clarified, and the information used for this project is entirely based on secondary re- sources. Chapter 5: Prediction API models embedded in Google Spreadsheets and Data Analysis (Development overview) 5.1 FETCHING DATA - Google Spreadsheets By using Microsoft Excel, Open Office Calc or Google Spreadsheets, we can save our dataset as a CSV file. There is a tutorial by (Dorard, 2014) which explains how to set up the google spreadsheet and use Google Prediction API models. Another example of how to upload and create dataset file could be found in Google Cloud Documentation (Google Cloud Platform, 2016). In the tutorial provided by (Sphon, 25 January 2016) are exposed the steps of using Google spreadsheet within an app. To create the Google spreadsheet for the purpose of this project, I had to use docs.google.com and click on new>>create a sheet, Fig. 5.
  • 45. 34 Figure 5: Screenshot of the Google Spreadsheet development process (docs.google.com, 2016) It looks like an excel document but how we use it? The spreadsheet view is a set of data which have the same structure as a spreadsheet program (Dorard, 2014). Each component of the da- taset is an item that is stored in a row, and each column characterises a feature or attribute of that item. The columns deliver information about the items and their description. The benefit of using Prediction APIs is that we can predict the values of missing features or attributes. In our case, the missing values are shown in the following figure from cell 20B to cell 27B which needs to be predicted by using the prediction models, Fig. 6.
  • 46. 35 Figure 6: Dataset, missing values from cell 20B to cell 27B required for predictions (docs.google.com, 2016) The wine features explained in Chapter 4 represent information about each of the wine products such as region, rating, the type of grapes, year of production, brand and sales price. Within Machine Learning we can pick only one attribute on at a time to make predictions (Brownlee, 2016). To be more specific our first column in the spreadsheet has been chosen on which to make predictions and is our Prices outcome. If there is a gap in other columns, I need to develop a different model for each column. The cost of the feature or attribute that I want to predict becomes the output of the machine learning issue, and the other features are the input components (Dorard, 2014). Each feature characterises a piece of data that has an effect on the outputs which will be predicted. The type of grape, year of production, wine brand are features that have a significant impact on the price of a specific bottle of wine. Prediction API models can be used to predict missing values of the data. Here I had to insert outputs which are going to be wine prices and inputs are the wine features. The reason for
  • 47. 36 choosing wine product examples is to predict numerical outputs which will be continuous and real-valued. According to (ibid., 2014) prediction of real-valued numbers is called regression. The data used for the purpose of the project is based on regression and predicts wine sale prices. The input is some wine attributes shown in the spreadsheet. During the development process of the web application and using of the Prediction API models, I had to create a Google account, to be able to access the embedded models and the Google storage from anywhere at any time. According to the aim of the project for the developing of the application, I am using Google spreadsheet and Prediction API models. In comparison, Google Cloud Console provides easy access to predictive models but requires Android Studio installation to develop the application for the business use. 5.2 INITIAL STATE Google Cloud Platform guides the users with information about how Prediction API models could be used (Google Cloud Platform, 19 August 2016). In the Quickstart documentation is explained step-by-step how to create a project within the Google Cloud Console and how to upload the training dataset to produce real-time values or obtain results. The Initial State of the project is related to this guidance since it uses examples of how to use Google Cloud Platform and its services. The information provided in the documentation helps of non-experienced developers to get a clear view of what results could be generated by using Prediction API models. The document also explains different scenarios of predictions such as language detection, email classifications, and purchase predictions.
  • 48. 37 The alteration between the Initial State guidance and the work obtainable in this project is that the dissertation is mainly concerned with the making of predictions and presenting real-time values related to the small retail businesses in the United Kingdom, and also the information used for those predictions is based on previous purchase history. According to the purpose of the research, the small retail businesses founded in the United Kingdom will be able to predict the possible cost of the wine products. To use Prediction API, I had to create a project in the Google Cloud Console and enable the billing for the project. Google Cloud Platform offers a free trial version for the first six months which allow individuals to get experienced with Cloud services and train their models without any charges (Google Cloud Platform, 19 August 2016). The steps are as follows: - Go to the Projects page. - Click on CREATE PROJECT, choose a name and click CREATE, Fig. 7. Figure 7: Project development: Name selection process (cloud.google.com, 2016) I have received the following, by selecting WINE as a name of my project, Fig. 8:
  • 49. 38 Figure 8: First stage of the project development (cloud.google.com, 2016) - On the right site of the top corner I had to enable the Prediction API and Google Cloud Storage APIs for the project by clicking on Enable and manage APIs, Fig. 9. Figure 9: Google APIs selection options (cloud.google.com, 2016)
  • 50. 39 - The next step is to click on Google Cloud APIs and choose Prediction API, Fig. 10. Figure 10: Prediction API selection (cloud.google.com, 2016) - To enable Prediction API, I had to press the button ENABLE, Fig. 11. Figure 11: Enabling of Prediction API (cloud.google.com, 2016)
  • 51. 40 - Because I will use the APIs Explorer, there is no need to go to the Credentials page afterward. At the bottom, individuals can choose TRY THIS API IN APIs EXPLORER which is my decision, Fig. 12. Figure 12: “Try this API in APIs Explorer”: link (cloud.google.com, 2016) Figure 13: Prediction API training models (cloud.google.com, 2016)
  • 52. 41 - From here I can choose the training model required for the purpose of my project, Fig. 13. To be more specific, the model that will be used is prediction.trainedmodels.insert to (or “intending to”) training my dataset, but before that, I have to enable the Google Cloud Storage and upload my training data. - In the Google Cloud Platform, I had to click on the Create a Cloud Storage bucket and choose a name, then click on Create, Fig. 14. Figure 14: Cloud Storage bucket formation (cloud.google.com, 2016) The name of my bucket is purwine which could be seen in the following picture, Fig. 15. The training dataset has been uploaded by selecting UPLOAD FILES.
  • 53. 42 Figure 15: Uploading of the training dataset (cloud.google.com, 2016) The following information is essential to use prediction.trained.model. - To train the model, I had to call the method and provide the ID of my project which could be found on the Home Page or Google Cloud Console and also to provide the location of my training data (Cloud Platform Console Help, 2016). The project number is automatically generated once the project is created and is used only within the console. The project ID cannot be changed after the project is created. Project details: - Project ID: wine-1357 - Project number: 233110773272 - Purwine/purchase.txt By entering the requested information into the empty fields, I was able to use prediction.trained- models.insert which is associated with the dataset uploaded in Google Cloud Storage, Fig. 16.
  • 54. 43 Figure 16: Execution process of prediction.trainedmodels.insert (cloud.google.com, 2016) After executing the file, I have received the following message that my request has been re- ceived, and the response provides information, which there are no errors, Fig. 17. Figure 17: Prediction.trainedmodels.insert request and response (cloud.google.com, 2016)
  • 55. 44 The next step is to execute the prediction.trainedmodels.get and use the training data, Fig. 18. The system requires the project ID before execution. Figure 18: Prediction.trainedmodels.get execution process (cloud.google.com, 2016) Once the details are provided and execution is done, I have received a message that the request has been sent successfully and in the response does not appear any errors, Fig. 19. Figure 19: Prediction.trainedmodels.get request and response (cloud.google.com, 2016)
  • 56. 45 The final step is to execute the prediction.trainedmodels.predict to receive the final results, Fig. 20. Figure 20: Prediction.trainedmodels.predict execution process (cloud.google.com, 2016) Figure 21: Prediction.trainedmodels.predict request (cloud.google.com, 2016) The final results are as follows, Fig. 22.
  • 57. 46 Figure 22: Prediction.trainedmodels.predict responses (cloud.google.com, 2016) Because the results from the models embedded in the Google Cloud Console are not clear, I had to use the google spreadsheet mentioned above. The entire process is explained in the fol- lowing chapter. Chapter 6: Implementation of Prediction API models within Google Spreadsheet and testing of the mobile application 6.1 GOOGLE APP SCRIPTS Google App Scripts is a silver platform to write and run scripts on Google’s infrastructure. This scripts can access your data on Google services, they can read and write data, and they can also make you easily soft with the Google Prediction APIs. We need, to begin with very basic script that access’s my data on Google documents. And then I need to integrate Google app scripts
  • 58. 47 with a google spreadsheet to make use of Google Prediction API and predict the missing values of the spreadsheet. Let’s get started first we go to script.google.com, Fig. 23. Figure 23: Google App Scripts platform (script.google.com, 2016) By selecting Start Scripting, I will create my project. Then I need to enter my basic script, Fig. 24. Figure 24: Basic script used for the purpose of the project (script.google.com, 2016)
  • 59. 48 The script creates a document using the documentsapp API, and the name of the document is my test document. Then we go through the loop and in each situation we do two things: we add a paragraph that is called heading plus the number of iteration and we set (DocumentApp,Par- agraphHeading,HEADING) to be a HEADING of level 2. Then we add a simple paragraph called paragraph and the number of iteration. Save as “my basic script”, Fig. 25. Figure 25: Edit Project Name screenshot (script.google.com, 2016) Once is saved we can run the main function, Fig. 26. Figure 26: Execution of the main function (script.google.com, 2016)
  • 60. 49 And then we need to give permission to access the google drive content, Fig. 27. Figure 27: Google Drive access request (script.google.com, 2016) And finish with pressing Allow. I need to check the console logs, Fig. 28 and make sure that everything runs without any errors.
  • 61. 50 Figure 28: Checking of the Console Logs (script.google.com, 2016) In Google Drive, I can see my basic script that has been created, Fig. 29. Figure 29: Evidence of “my basic script” and “my test document” files uploaded in the Google Drive (drive.google.com, 2016) By clicking on my test document, I can see that replies as expected, Fig. 30.
  • 62. 51 Figure 30: “my test document” content (docs.google.com, 2016) The next step is to create spreadsheet document with my training data. The scripts associated with the spreadsheet are developed by (Dorard, 2014). By using his digital package, I was able to understand the meaning of Prediction API and the process of developing Google spread- sheets, Fig. 31.
  • 63. 52 Figure 31: Prediction Google Spreadsheet (docs.google.com, 2016) The name of my document is Prediction. Once the document is created, I had to enable Predic- tion API. For this, we go to Tools click on script editor, and this opens the google app script associated with this spreadsheet, Fig. 32, Fig. 33, Fig. 34, Fig. 35. Figure 32: Google App Script associated with the spreadsheet (docs.google.com, 2016)
  • 64. 53 Figure 33: Google App Script associated with the spreadsheet (docs.google.com, 2016) Figure 34: Google App Script associated with the spreadsheet (docs.google.com, 2016)
  • 65. 54 Figure 35: Google App Script associated with the spreadsheet (docs.google.com, 2016) The code above is associated with the spreadsheet used for the purpose of this project. There are three files where the first contain the actual code specific to the Prediction API. The second file contains the help functions, and the third file contains methods that access the values stored in the spreadsheet and reads them or face them in. For the purpose of this project I had to activate the Prediction API, this could be done be se- lecting RESOURCES and click on advanced Google services, Fig. 36.
  • 66. 55 Figure 36: Activation of Prediction API (docs.google.com, 2016) It looks like the Prediction API is on, but we need to activate it in Google Developers Console as well, which has been already explained in Chapter 5, Fig. 37. Figure 37: Activation of Prediction API in the Google Developers Console (console.developers.google.com, 2016)
  • 67. 56 We need to select Prediction API to enable it, Fig. 38. Figure 38: Enabling of Prediction API in the Google Developers Console (console.developers.google.com, 2016) Click on enable, Fig. 39. Figure 39: Confirmation that Prediction API has been enabled in the Google Developers Console (con-sole.develop- ers.google.com, 2016) From the above picture, we can clearly see that Prediction API has been enabled successfully.
  • 68. 57 Let’s look at the code and what exactly does. The insert method is used to train the model, and it calls the Prediction API. var insert_reply = Prediction.Trainedmodels.insert(resource, project_number); The row above calls the trainedmodels.insert method. So the data that it uses is training_in- stances and the training instances are placed in: var training_instances = []; for (var i = 0; i < instances.length; ++i) { var output = instances[i][0]; var csv_instance = instances[i].slice(1); training_instances.push({'output': output, 'csvInstance': csv_instance}); Also gets output values and csv_instance values, so csv_instance are the feature values and for that it took var output = instances[i][0]; where the values was defined in var instances = selec- tion.getValues();, which is the selection set in the spreadsheet. The following rows represent the prediction method: function predict() { try { clearOutput(); var sheet = SpreadsheetApp.getActiveSheet(); var selection = sheet.getActiveSelection(); var instances = selection.getValues();
  • 69. 58 var project_number = getProjectNumber(); var model_name = getModelName(); for (var i = 0; i < instances.length; ++i) { var result = predictSingleRow(project_number, model_name, instances[i]); selection.getCell(i + 1, 1).setValue(result); } } catch(e) { Browser.msgBox('ERROR:' + e, Browser.Buttons.OK); } } The prediction method is used to fill the missing values, and the magic is happening in the following rows. predictSingleRow(project_number, model_name, instances[i]); selection.getCell(i + 1, 1).setValue(result); After that, I am using prediction.trainedmodels.predict method which uses the feature values defined in input_instance. var prediction_out = Prediction.Trainedmodels.predict( resource, project_number, model_name); displayOutput(prediction_out); Here the instances are again selection of cells selection.getValues();
  • 70. 59 To be more specific let’s look at the google spreadsheet dataset. Before using the spreadsheet, I had to fill the project information which was developed in Google Cloud Console with the ID number 233110773272. For the model name, we can put any name which in my case is pur- chase, and the next step is to import the data designed for the purpose of my project. To insert data, I have to import the excel file which contains the information. The Excel file contains information about wine products and their prices, Fig. 40. Figure 40: Excel dataset spreadsheet imported in the Google Spreadsheet (docs.google.com, 2016)
  • 71. 60 The process is as follows: By accessing the uploaded documents in my google drive, I need to select from File Menu-Import and then the file, Fig. 41. Figure 41: Selection of Excel dataset file called “spreadsheet.CSV” (drive.google.com, 2016) Click on Replace data starting at selected cell and then Import, Fig. 42.
  • 72. 61 Figure 42: Importing: spreadsheet.csv (docs.google.com, 2016) The following picture clearly represents that our data has been successfully imported, Fig. 43.
  • 73. 62 Figure 43: Confirmation Script output: the dataset has been imported successfully (docs.google.com, 2016) To predict some outputs, I need to delete some of the prices for the wines, Fig. 44. Figure 44: Final edit of the Google Spreadsheet before using Prediction API models (docs.google.com, 2016)
  • 74. 63 The next step is to select the data with the prices to train the model. Click on Prediction menu which is custom defined and use the prediction functions. Click on the training model from selection and authorize, Fig. 45, Fig 46. Figure 45: Authorization request for “Prediction” application (docs.google.com, 2016) Figure 46: Google Cloud Platform use of OAuth 2.0 for “Prediction” authentication and authorization (cloud.google.com, 2016)
  • 75. 64 Click on allow and I have received the following confirmation dialog which represents that the first stage of the prediction process is completed. Training model from selection is associated with the INSERT method, Fig. 47: Figure 47: Request of the INSERT method to begin the training of the dataset (docs.google.com, 2016) By selecting OK, I have received the output of the API request as follows, Fig. 48: Figure 48: Confirmation of the INSERT method efficiency (docs.google.com, 2016) Let’s check the status of the model, from the toolbar select Prediction and then” Get training status.” The following picture represents information that the connection between the project and my Google Spreadsheet is running without errors, Fig. 49.
  • 76. 65 Figure 49: “Get training status”: Confirmation of connection between Google Cloud Console project and Google Spreadsheet (docs.google.com, 2016) The last step is to select the dataset with the missing values that need to be predicted. For the purpose, I had to select from Prediction menu>>predict instances, Fig. 50. Figure 50: Results from the execution process of “predict instances” model (docs.google.com, 2016)
  • 77. 66 The missing values are filled with new data which needs to be formatted for better understand- ing. From the Format menu, I can improve the data which has been predicted, Fig. 51. Figure 51: Formatting of the results (docs.google.com, 2016) The last step is to publish the file to the web. From the file menu, I had to select File>>publish to the web and click ok. Now we are going to www.appsheet.com website to create our app. We have to sign up with our Google account and use Google drive to (or “intending to”) use our spreadsheet. The pro- cess is explained below.
  • 78. 67 6.2 APPSHEET APPLICATION DEVELOPMENT The aim is to develop an application that works with Google spreadsheet which has been ex- amined in Chapter 4 and Chapter 6. By following the instructions published in www.appsheet.com, I have created a new app and select the most suitable category for the purpose of the project, Fig. 52, Fig 53. Figure 52: First stage of the application development (appsheet.com, 2016)
  • 79. 68 Figure 53: Name and Category selection process required for the new application (appsheet.com, 2016) I have chosen Prediction as a name for my App and after selected my own data, Fig. 54.
  • 80. 69 Figure 54: Selection of the Google Prediction Spreadsheet required for the application development (appsheet.com, 2016) I need to select my spreadsheet and it’s going to build an app, Fig. 55. Figure 55: Setting of the Prediction application (appsheet.com, 2016)
  • 81. 70 The AppSheet is a fantastic solution because provides information about the entire process and engage users into the meaning of each development step, Fig. 56, Fig. 57, Fig. 58, Fig. 59. Figure 56: Welcome to AppSheet (appsheet.com, 2016) Figure 57: AppSheet architecture (appsheet.com, 2016)
  • 82. 71 Figure 58: Build and deploy an app in three simple steps (appsheet.com, 2016) Figure 59: Customization options for the application (appsheet.com, 2016) Once the application is build, I was able to see the entire view, Fig. 60.
  • 83. 72 Figure 60: Entire view of the completed "Prediction" application (appsheet.com, 2016) By selecting the Users menu from the left side of the window, I was allowed to add an entry of users, Fig. 61. Figure 61: Adding entries of users (appsheet.com, 2016) I have added the emails of the participants of this project, and they can do entries.
  • 84. 73 When the decision is made about which users are allowed to use the new customized app, they will receive the following message, Fig. 62: Figure 62: E-mail invitation for the “Prediction” app installation (gmail.com, 2016) The steps a quite easy to follow and creating an app with appsheet.com is free. I had to email the link to my personal email to try the application. Users can run the link in their web browser which means that it is not essentially to have a mobile phone. The following picture represents the results gathered from prediction models in completed web application, Fig. 63.
  • 85. 74 Figure 63: Google Spreadsheet results gathered from prediction models linked with the Prediction application (appsheet.com, 2016) By clicking on one of the wine products we can edit the data, Fig. 64. For example: Changing the features of wine products in the application will update the data associated with the Google Spreadsheet because they are synchronized and also will allow business owners to train the new dataset and gather predictions for possible prices of the newly added information.
  • 86. 75 Figure 64: Example of a wine product within the application (appsheet.com, 2016) By selecting the edit button, users can change the data. According to the purpose of the project, the owners of the small retail businesses can add more wine samples of products. To change existing information such as wine products, wine rating, the origin of the wine, wine prices and also to train the new data and generate predictions by using Prediction API models. According to the example, sometimes we need to update our data, I had to try to add new information to my spreadsheet and see if the changes are updated within the application to confirm the state- ment above. So I am going to change some of the data and see if there is any difference in my application. I have added some new prices according to the wine features, Fig. 65.
  • 87. 76 Figure 65: Adding a new data in the spreadsheet required for the evidence (appsheet.com, 2016) Once we sync the data in our app, the new information appears immediately, Fig. 66, Fig. 67. Figure 66: “Prediction” application before the execution of Prediction API models (appsheet.com, 2016)
  • 88. 77 Figure 67: “Prediction” application after the execution of Prediction API models (appsheet.com, 2016) The above picture is the evidence that my app runs without errors and also predictions updates are shown immediately after prediction models are trained again. Once the application is developed, I had to improve the entire look of the information presented within the application such as format the columns represented in the Prediction application. The following picture delivers the current look of my application, but different options could be implemented to create the better appearance of the app such as adding pictures of the wine products, adding more users…etc., Fig 68.
  • 89. 78 Figure 68: Formatting of the Columns Structure (appsheet.com, 2016) By running the app in the web browser, I have received the following result: Fig 69. Figure 69: Final look of the Prediction web application (appsheet.com, 2016)
  • 90. 79 The following picture represents the Anatomy of the Prediction mobile app, Fig 70. Figure 70: Anatomy of the Prediction mobile application (appsheet.com, 2016) Chapter 7 Reflection and recommendations for future work 7.1 INTRODUCTION The aim of the following section is to formulate accurate and practical recommendations con- cerning small retail businesses in the United Kingdom. Also, this could be applied towards modifying strategies with the aim of expanding business development through mobile and web Prediction API applications.