HeaderSIS.jpg

Difference between revisions of "IS480 Team wiki: 2016T1 IPMAN Final Wiki"

From IS480
Jump to navigation Jump to search
 
(46 intermediate revisions by the same user not shown)
Line 58: Line 58:
 
<br/>
 
<br/>
 
<center>
 
<center>
[[Image:IPMAN_FinalsSlides_Icon.png|150px|link=]]
+
[[Image:IPMAN_FinalsSlides_Icon.png|150px|link=File:IPMAN Final Presentation.pdf]]
 
[[Image:IPMAN_MidTermDeployedSite_Icon.png|150px|link=http://www.hookcoffee.com.sg/manager]]
 
[[Image:IPMAN_MidTermDeployedSite_Icon.png|150px|link=http://www.hookcoffee.com.sg/manager]]
 
[[Image:IPMAN Finals Pitch Video Icon.png|150px|link=https://www.youtube.com/watch?v=8pO5DzcR0Y0]]
 
[[Image:IPMAN Finals Pitch Video Icon.png|150px|link=https://www.youtube.com/watch?v=8pO5DzcR0Y0]]
[[Image:IPMAN Poster Icon.png|150px|link=https://drive.google.com/drive/folders/0ByVkTRApcT_7azZLeGdlWFZlSzQ?usp=sharing]]
+
[[Image:IPMAN Poster Icon.png|150px|link=https://drive.google.com/drive/folders/0ByVkTRApcT_7cTlISExlc3V1RjQ]]
 
</center>
 
</center>
 
<div style="font-family:Garamond;font-size:16px">
 
<div style="font-family:Garamond;font-size:16px">
Line 70: Line 70:
  
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Project Highlights</font></div>===
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Project Highlights</font></div>===
 +
<div style="font-family:Garamond;font-size:16px">
 +
* Implemented new chart technology such as D3.js to display customer segmentation in Sprint 11
 +
* Implemented the coffee demand prediction using Stochastic Knapsack Model in Sprint 11
 +
* Utilised KMeans Clustering to obtain customer segments that would be added into mailing lists on Mailchimp automatically in Sprint 11
 +
* Implemented access rights control using Role-Based Access Control in Sprint 12
 +
* Conducted our User Testing 3 with 10 business owners to validate the functions we have implemented for sponsors
 
<br/>
 
<br/>
 
+
</div>
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Project Challenges</font></div>===
 
<br/>
 
 
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Project Achievements</font></div>===
 
<br/>
 
  
 
==Project Management==
 
==Project Management==
Line 82: Line 83:
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Project Status</font></div>===
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Project Status</font></div>===
 
[[Image:IPMAN Progress Overview Final.png|center|800px]]
 
[[Image:IPMAN Progress Overview Final.png|center|800px]]
 +
<br/>
 +
<div style="font-family:Garamond;font-size:16px">
 +
As seen below, Team IPMAN has delivered '''100%''' of the agreed-on project scope to our sponsor.
 +
</div>
 +
[[Image:IPMAN Finals Project Scope Status.png|center|1000px]]
 
<br/>
 
<br/>
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Project Schedule (Plan vs. Actual)</font></div>===
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Project Schedule (Plan vs. Actual)</font></div>===
 
<div style="font-family:Garamond;font-size:16px">
 
<div style="font-family:Garamond;font-size:16px">
No major changes were made to the project schedule since IPMAN's Mid-Term presentation. Firstly, the team shifted our user testing 3 from 18 October 2016 to 3 November 2016. The team settled on this decision as we wanted to ensure that all functions of our platform would be covered and tested. As such, it was pushed forward from Sprint 11 to 12 when all functions would have been completed. Next, our sponsor highlighted a prominent change that they have implemented at the start of Sprint 13. After assessing the progress and workload of the team, we were confident that integrating that feature would not set us back in any way as it meant the use of buffer time that was allocated for the sprint. Lastly, the team scheduled a project handover procedure task to ensure that there would be a proper handover timeline that the team would adhere closely to. We believe proper documentation and instructions is vital for our sponsors and their freelance developers now and also, in the future.  
+
No major changes were made to the project schedule since IPMAN's Mid-Term presentation. Firstly, the team shifted our user testing 3 from 18 October 2016 to 3 November 2016. The team settled on this decision as we wanted to ensure that all functions of our platform would be covered and tested. As such, it was pushed forward from Sprint 11 to 12 when all functions would have been completed. Next, Team IPMAN added in new function in sprint 13 which is the integration of gifts tab because it was a new feature that the freelancer developers have built on the old application. In order for sponsors to be using the new application that Team IPMAN has built, Team IPMAN ported over the entire code that the freelancer developers have created onto the new application as soon as they were built. Lastly. the team also added in the project handover procedure and implementation as a new task in sprint 14 to ensure that there would be a proper handover timeline that the team would adhere closely to. This will allow all documentations to be properly handed over to the sponsors and freelancer developers. We believe proper documentation and instructions is vital for our sponsors and their freelance developers now and also, in the future.  
 
<br/>
 
<br/>
 
</div>
 
</div>
 
===<div style="font-size:16px; font-family:Garamond">Planned Project Schedule===
 
===<div style="font-size:16px; font-family:Garamond">Planned Project Schedule===
[[Image:IPMAN Timeline MidTerm Planned.png|center|1100px]]
+
<div style="font-family:Garamond;font-size:16px">
 +
The planned project schedule shows the Team IPMAN's timeline during Mid-Term presentation:
 +
<br/>
 +
</div>
 +
[[Image:IPMAN Timeline Final Planned.png|center|1100px]]
 
<br/>
 
<br/>
 
===<div style="font-size:16px; font-family:Garamond">Actual Project Schedule===
 
===<div style="font-size:16px; font-family:Garamond">Actual Project Schedule===
 +
<div style="font-family:Garamond;font-size:16px">
 +
The actual project schedule reflects the changes made to Team IPMAN's timeline between Mid-Term presentation and Final presentation:
 +
<br/>
 +
</div>
 
[[Image:IPMAN Timeline Final Actual.png|center|1100px]]
 
[[Image:IPMAN Timeline Final Actual.png|center|1100px]]
 
<br/>
 
<br/>
  
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Project Metrics</font></div>===
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Project Metrics</font></div>===
 +
<div style="font-family:Garamond;font-size:16px">
 +
Team IPMAN has applied the following 4 metrics to enable greater efficiency and effectiveness in project planning. No new project metrics was introduced between Mid-Term presentation and Final presentation.<br/><br/>
 +
Below are the graphical representations of the various metrics that IPMAN has applied:
 +
<br/><br/>
 +
1. '''Sprint Velocity'''
 +
<br/>
 +
[[Image:IPMAN Finals PM SprintVelocity.png|center|800px]]
 +
<br/>
 +
Sprint velocity is a measurement of the amount of work Team IPMAN has completed during each sprint and it a key metric. Velocity is calculated at the end of each sprint by summing the total points of completed user stories. Only stories that are completed at the end of the iteration are counted. As seen from the Sprint Velocity chart above, from mid-terms onwards, the team has completed all planned story points.
 +
<br/><br/>
 +
 +
2. '''Scrum Burndown Chart'''
 +
<br/>
 +
The Scrum Burndown Chart is a visual measurement tool to display the amount of work completed each day by Team IPMAN against the ideal projected rate of completion for the current sprint.
 +
<br/><br/>
 +
<u>Formula</u> <br/>
 +
Ideal: Total planned story points to be completed over number of days in a sprint<br/>
 +
Actual: Actual story points remaining after completion of story points each day in a sprint<br/>
 +
<br/>
 +
The team will like to highlight several key points for the following sprints after Mid-Term presentation as shown below: <br/>
 +
[[Image:IPMAN BurndownChart Sprint11.png|center|800px]]
 +
<br/>
 +
[[Image:IPMAN BurndownChart Sprint12.png|center|800px]]
 +
<br/>
 +
[[Image:IPMAN BurndownChart Sprint13.png|center|800px]]
 +
<br/>
 +
[[Image:IPMAN BurndownChart Sprint14.png|center|800px]]
 +
<br/>
 +
Team IPMAN completed all the planned story points before the end of the sprint. This shows that Team IPMAN has been consistent in the implementation and delivered the product within the desired schedule.
 +
<br/><br/>
 +
Sprint 13 & 14 are mainly the implementation of bug fixing based on UAT 3’s feedback. In Sprint 14, Team ended the coding implementation early on 20th November as team had to ensure that the application was tested thoroughly before the handing over our completed application to our sponsors on 23rd November.
 +
<br/><br/>
 +
 +
3. '''Bug Metrics'''
 +
<br/>
 +
[[Image:IPMAN BugMetric Chart.png|center|800px]]
 +
<br/><br/>
 +
 +
4. '''Mean Time to Recover (MTTR)'''
 +
<br/>
 +
<u>Formula</u><br/>
 +
(Hours spent on analysing the issue + Hours spent to implement the changes) / Number of issue in the sprint
 +
<br/>
 +
[[Image:IPMAN Finals MTTR Chart.png|center|600px]]
 +
<br/>
 +
Based on the MTTR in sprint 10, Team IPMAN spent 5.5 hours to implement the changes based on the feedbacks given by our supervisor for the mid-terms slides draft. Therefore, Team IPMAN has learnt from this incident. As such, Team IPMAN discussed about the final slides during internal meeting each week ever since mid-terms presentation. Currently, we took only 2 hours to implement the changes based on supervisor’s feedback.
 +
<br/>
 +
 +
<center>
 +
{| class="wikitable" style="font-family:Garamond; background-color:#FFFFFF; width: 1000px;" align="center"
 +
|-
 +
 +
! style="color:#ecf0f1; background-color:#07264C;" width="50pt" | S/N
 +
! style="color:#ecf0f1; background-color:#07264C;" width="50pt" | Sprint
 +
! style="color:#ecf0f1; background-color:#07264C;" width="250pt" | Issue / Change
 +
! style="color:#ecf0f1; background-color:#07264C;" width="250pt" | Description
 +
! style="color:#ecf0f1; background-color:#07264C;" width="100pt" | Suggested by
 +
! style="color:#ecf0f1; background-color:#07264C;" width="100pt" | Hours spent on analysing the issue/brainstorm
 +
! style="color:#ecf0f1; background-color:#07264C;" width="100pt" | Hours spent on to implement the changes
 +
! style="color:#ecf0f1; background-color:#07264C;" width="100pt" | Total Hours to Recover
 +
|-
 +
 +
|style="text-align: center;"| 12
 +
|style="text-align: center;"| 11
 +
|style="text-align: left;"| Sponsor requested for additional inputs in the dashboard summary page
 +
|style="text-align: left;"| Sponsors would like to view the numbers of customers who cancelled subscriptions and number of active customers on the dashboard
 +
|style="text-align: center;"| Sponsors
 +
|style="text-align: center;"| 0.1
 +
|style="text-align: center;"| 1.25
 +
|style="text-align: center;"| 1.35
 +
|-
 +
 +
|style="text-align: center;"| 13
 +
|style="text-align: center;"| 12
 +
|style="text-align: left;"| Sponsor requested for the additional feature to be integrated
 +
|style="text-align: left;"| Sponsor requested for the freelancer's codes (customer's sample) implemented on the old application to be integrated with our new application
 +
|style="text-align: center;"| Sponsors
 +
|style="text-align: center;"| 1
 +
|style="text-align: center;"| 0
 +
|style="text-align: center;"| 1
 +
|-
 +
 +
|style="text-align: center;"| 14
 +
|style="text-align: center;"| 13
 +
|style="text-align: left;"| Sponsor requested for the additional feature to be integrated
 +
|style="text-align: left;"| Sponsor requested for the freelancer's codes (customer's sample) implemented on the old application to be integrated with our new application
 +
|style="text-align: center;"| Sponsors
 +
|style="text-align: center;"| 0
 +
|style="text-align: center;"| 2
 +
|style="text-align: center;"| 2
 +
|-
 +
 +
|style="text-align: center;"| 15
 +
|style="text-align: center;"| 13
 +
|style="text-align: left;"| Make changes to the final slides draft based on supervisor's comments
 +
|style="text-align: left;"| Supervisor suggested to provide examples when we mentioned about the different models used, provide a one-page summary to show the values we have provided for sponsors and show how we used the metrics to mitigate issues in PM.
 +
|style="text-align: center;"| Supervisor
 +
|style="text-align: center;"| 1
 +
|style="text-align: center;"| 1
 +
|style="text-align: center;"| 2
 +
|-
 +
 +
|style="text-align: center;"| 16
 +
|style="text-align: center;"| 14
 +
|style="text-align: left;"| Make changes to the processing order dashboard; Allow orders made using voucher codes
 +
|style="text-align: left;"| Sponsor informed the team that customers are able to sign up without using credit card but using the voucher code sent by friends instead; thus, application needs to handle that in the processing order dashboard
 +
|style="text-align: center;"| Sponsors
 +
|style="text-align: center;"| 0.5
 +
|style="text-align: center;"| 1
 +
|style="text-align: center;"| 1.5
 +
|}
 +
</center>
 +
 +
</div>
 
<br/>
 
<br/>
  
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Project Risks</font></div>===
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Project Risks</font></div>===
 +
[[Image:IPMAN RiskManagement Chart.png|center|800px]]
 
<div style="font-family:Garamond;font-size:16px">
 
<div style="font-family:Garamond;font-size:16px">
 
From the period of Mid-Terms till Final Presentation, we will like to highlight that our concerns were 1) Technical Risk and 2) Stakeholder Management Risk as described below:
 
From the period of Mid-Terms till Final Presentation, we will like to highlight that our concerns were 1) Technical Risk and 2) Stakeholder Management Risk as described below:
Line 138: Line 267:
 
</center>
 
</center>
 
<br/><br/>
 
<br/><br/>
 +
 +
<div style="font-family:Garamond;font-size:16px">
 +
The diagram below illustrates our project handover procedure to our sponsors and freelance developers.
 +
<br/>
 +
</div>
 +
[[Image:IPMAN Project Handover Procedure.png|center|1000px]]
 +
<br/>
  
 
<div style="font-family:Garamond;font-size:16px">
 
<div style="font-family:Garamond;font-size:16px">
Line 149: Line 285:
 
! style="color:#ecf0f1; background-color:#07264C;" width="50pt" | S/N
 
! style="color:#ecf0f1; background-color:#07264C;" width="50pt" | S/N
 
! style="color:#ecf0f1; background-color:#07264C;" width="100pt" | Risk Type
 
! style="color:#ecf0f1; background-color:#07264C;" width="100pt" | Risk Type
! style="color:#ecf0f1; background-color:#07264C;" width="250pt" | Risk Event
+
! style="color:#ecf0f1; background-color:#07264C;" width="350pt" | Risk Event
 
! style="color:#ecf0f1; background-color:#07264C;" width="100pt" | Likelihood
 
! style="color:#ecf0f1; background-color:#07264C;" width="100pt" | Likelihood
 
! style="color:#ecf0f1; background-color:#07264C;" width="100pt" | Impact Level
 
! style="color:#ecf0f1; background-color:#07264C;" width="100pt" | Impact Level
! style="color:#ecf0f1; background-color:#07264C;" width="50pt" | Category
+
! style="color:#ecf0f1; background-color:#07264C;" width="100pt" | Category
! style="color:#ecf0f1; background-color:#07264C;" width="100pt" | Strategy Adopted
+
! style="color:#ecf0f1; background-color:#07264C;" width="200pt" | Mitigation
! style="color:#ecf0f1; background-color:#07264C;" width="250pt" | Actions
 
 
|-
 
|-
  
Line 163: Line 298:
 
|style="text-align: center;"| High
 
|style="text-align: center;"| High
 
|style="text-align: center;"| B
 
|style="text-align: center;"| B
|style="text-align: center;"| Mitigate
 
 
|style="text-align: left;"| Team IPMAN took the initiative to understand what changes have been made and whether the changes are necessary by discussing with the freelancers early on. We also work to communicate with freelancers to modify models in a way such that any impact is minimized, e.g. adding fields instead of changing fields in the model.  
 
|style="text-align: left;"| Team IPMAN took the initiative to understand what changes have been made and whether the changes are necessary by discussing with the freelancers early on. We also work to communicate with freelancers to modify models in a way such that any impact is minimized, e.g. adding fields instead of changing fields in the model.  
 
|}
 
|}
 
</center>
 
</center>
 
<br/><br/>
 
<br/><br/>
 +
 +
<div style="font-family:Garamond;font-size:18px">
 +
'''Change Management'''
 +
</div>
 +
<div style="font-family:Garamond;font-size:16px">
 +
Below is the change log for Sprint 11 to 14 (after Mid-Term presentation):
 +
<br/>
 +
[[Image:IPMAN Finals Change Log.png|center|1000px]]
 +
</div>
 +
<br/>
  
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Technical Complexity</font></div>===
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Technical Complexity</font></div>===
 +
<div style="font-family:Garamond;font-size:16px">
 +
Note: '''Comparison Using Hashes''' and '''Fortnightly Live Deployment''' have been created prior to our Mid-term presentation and it is accessible via our [https://wiki.smu.edu.sg/is480/IS480_Team_wiki%3A_2016T1_IPMAN_Midterm_Wiki Mid-Term Wiki].
 +
<br/>
 +
'''Monte Carlo Stochastic Knapsack''' and '''Understanding Customer Segments with K Means Clustering''' is Team IPMAN's new technical complexity after mid-terms.
 +
<br/><br/>
 +
</div>
 +
 +
<div style="font-family:Garamond;font-size:18px">
 +
'''1. Deciding how much budget for each marketing component with Monte Carlo Stochastic Knapsack Problem'''
 +
</div>
 +
<div style="font-family:Garamond;font-size:16px">
 +
(Reference: Morton, D. P., & Wood, R. K. (1997). On a Stochastic Knapsack Problem and Generalizations. In ResearchGate (pp. 149–168). https://doi.org/10.1007/978-1-4757-2807-1_5)
 +
<br/><br/>
 +
'''Problem Statement''' <br/>
 +
Right now, HookCoffee has a range marketing activities – Google Adwords, Facebook campaigns, introducing coffees, writing blog articles, sending email campaigns and doing roadshows - but they don’t know how much to spend on each component, and they have no way of keeping track how well their campaigns have done viz-a-viz their Key Performance Indicators, namely, new signups, active customers, churn, and most importantly, the number of orders for the month. In this analysis module, we hope to solve the problem of deciding how much to spend on each component so that they maximize their growth in orders.
 +
<br/><br/>
 +
 +
'''Budgeting'''<br/>
 +
Here, because the full marketing budget varies and is not known, we make certain assumptions so that the problem at hand can be modelled as a Knapsack problem with a fixed budget. We assume that their marketing budget grows in proportion with the weighted moving average percentage increase in number of orders, as below:
 +
<br/>
 +
[[Image:IPMAN TC Knapsack Formula 1.png|center|400px]]
 +
<br/>
 +
In layman’s terms, the budget for this month is equal to the budget for last month multiplied by the weighted average percentage change in coffee demand.
 +
<br/><br/>
 +
 +
'''Modelling'''<br/>
 +
<center>
 +
[[Image:IPMAN TC HookCoffee Order Dist Graph.png|400px]]
 +
[[Image:IPMAN TC Stock Graph.png|400px]]
 +
</center>
 +
<br/>
 +
The distribution of demand is very similar to that of stock prices, and can be said to be an Ito Process, following the Geometric Brownian Motion i.e.
 +
<br/>
 +
[[Image:IPMAN TC Knapsack Formula 2.png|center|200px]]
 +
<br/>
 +
This means that we can model demand at each time period under the lognormal distribution, as below (Reference: Magee, J. F., Copacino, W. C., & Rosenfield, D. B. (1985). Modern Logistics Management: Integrating Marketing, Manufacturing and Physical Distribution. John Wiley & Sons.):
 +
<br/>
 +
[[Image:IPMAN TC Knapsack Formula 3.png|center|200px]]
 +
<br/><br/>
 +
 +
'''Finding the Parameters'''<br/>
 +
[[Image:IPMAN TC FindingParameters Desc.png|center|800px]]
 +
<br/><br/>
 +
 +
'''The Monte Carlo Stochastic Knapsack Problem'''<br/>
 +
[[Image:IPMAN TC MonteCarloStochasticKnapsack Desc.png|center|800px]]
 +
<br/>
 +
[[Image:IPMAN TC MonteCarloStochasticKnapsack Image.png|center|600px]]
 +
<br/><br/>
 +
 +
'''Validation'''<br/>
 +
[[Image:IPMAN TC Knapsack Validation.png|center|800px]]
 +
<br/>
 +
[[Image:IPMAN TC Knapsack Validation Table.png|center|600px]]
 +
<br/>
 +
[[Image:IPMAN TC Knapsack Formula 4.png|center|200px]]
 +
<br/><br/>
 +
We reject the null hypothesis at the 10% level of significance.
 +
<br/><br/>
 +
There is sufficient evidence to show our MCSKP agent performs better than the random agent (p-value = 0.05679) over the 12-month period at the 10% level of significance.
 +
<br/><br/>
 +
Empirically, however, our agent has yet to be tested in the real world. We hope that it will perform similarly, but we have put into place preventive measures to allow our sponsor to validate whether the recommendations still make sense. We have provided a table below that if they follow exactly, i.e. low deviation and it still does not hit the expected demand, our model may not be working as expected in practice, and they should look at the historical data to see if there are any other conclusions that can be drawn.
 +
<br/><br/>
 +
[[Image:IPMAN TC Knapsack Validation Table 2.png|center|1000px]]
 +
<br/><br/>
 +
</div>
 +
 +
 +
<div style="font-family:Garamond;font-size:18px">
 +
'''2. Understanding Customer Segments with Clustering'''
 +
</div>
 +
<div style="font-family:Garamond;font-size:16px">
 +
'''Problem Statement''' <br/>
 +
We wanted to deliver real business value, providing our sponsor with insights they didn’t know about their customers. We suggested doing automatic segmentation of customers, because we realized they had difficulty doing segmentation manually using external tools (like Intercom). Even if they manually found out about their segments, there was little data and they still had to process the data manually to find out if there’s anything that they can use to target that specific segment.
 +
<br/><br/>
 +
 +
'''Understanding their Customers''' <br/>
 +
We first tried to find what metric we could use to cluster customers.  From previous visualization of data, we found out that there was a huge portion of their customer base who were extremely loyal to them, and these are the customers who order more. We also understood from our sponsor that there was an issue with churn and people exploiting the voucher codes, so we wanted to find out who were these customers as well.
 +
<br/><br/>
 +
We concluded using the following variables as segmentation variables:
 +
<br/>
 +
[[Image:IPMAN TC Kmeans Formula 1.png|center|400px]]
 +
<br/>
 +
The following will the profiling variables used, which are things that our sponsor can act to target the segments involved:
 +
<br/>
 +
[[Image:IPMAN TC Kmeans Formula 2.png|center|200px]]
 +
<br/><br/>
 +
 +
'''Finding Number of Segments''' <br/>
 +
We will be using two popular methods of clustering: hierarchical clustering and k-means clustering. We will first use hierarchical clustering to find the number of clusters, k, that we can fit into k-means cluster algorithm later.
 +
<br/><br/>
 +
We first perform Principal Component Analysis to reduce the dimensionality of our segmentation variable to a n X 2 vector (where n=2207), and performed hierarchical clustering using Ward’s method, which works well for quantitative variables. This is described in scipy’s documentation as follows:
 +
<br/>
 +
[[Image:IPMAN TC Kmeans Formula 3.png|center|600px]]
 +
<br/>
 +
The resulting dendrogram is as follows:
 +
<br/>
 +
[[Image:IPMAN TC Kmeans Dendrogram.png|center|800px]]
 +
<br/>
 +
We truncate the dendrogram to get more readable results, as follows:
 +
<br/>
 +
[[Image:IPMAN TC Kmeans Dendrogram truncated.png|center|400px]]
 +
<br/>
 +
At first, we attempted to use the elbow method to find the clustering step where the acceleration of distance growth is the biggest (the "strongest elbow") of the blue line graph below, which is the highest value of the orange graph, as below:
 +
<br/>
 +
[[Image:IPMAN TC Kmeans Dendrogram graph.png|center|400px]]
 +
<br/>
 +
Here, we get k = 2, however we found that if we do that, we would be ignoring a large group of high value customers, where the threshold is shown in grey, and the lost segment is shown in purple below:
 +
<br/>
 +
[[Image:IPMAN TC Kmeans Dendrogram truncated explained.png|center|400px]]
 +
<br/>
 +
We set our threshold at 200 and will be taking these 3 segments instead, and will feed k=3 into our k-means clustering.
 +
<br/>
 +
[[Image:IPMAN TC Kmeans Dendrogram truncated explained 2.png|center|400px]]
 +
<br/><br/>
 +
 +
'''K Means''' <br/>
 +
We use scikit-learn library to conduct the k-means. The K-means algorithm aims to choose centroids that minimise the inertia, or within-cluster sum of squared criterion:
 +
<br/>
 +
[[Image:IPMAN TC Kmeans Formula 4.png|center|200px]]
 +
<br/>
 +
We set k=3, and the following table shows the profiles of the different clusters.
 +
<br/>
 +
[[Image:IPMAN TC Kmeans Table.png|center|600px]]
 +
<br/><br/>
 +
 +
'''Interpretation''' <br/>
 +
From the number of orders and ratio, we conclude the following:
 +
<br/><br/>
 +
Segment 1 are the '''"Surfers"''', they tend to jump around from one new thing to the next, trying out new stuff for a while before moving on to the next hip thing.
 +
<br/><br/>
 +
Segment 2 are the '''"Benefit Seekers"''', they quickly churn after their first order, after using the voucher provided on signup.
 +
<br/><br/>
 +
Segment 3 are the '''"Committed Customers"''', they remain loyal to HookCoffee even after a long time, making as many as 14 orders, and are the biggest average spenders among the 3 spenders. Hookcoffee’s job is to keep them committed, and to move more people to this segment/get more people to join this segment.
 +
<br/><br/>
 +
We calculated the ratio for each variable of each segment and compared it against the population; we see that there is low similarity between the profiling attributes of the segments found, as shown below:
 +
<br/>
 +
[[Image:IPMAN TC Kmeans Table 2.png|center|600px]]
 +
<br/>
 +
The closer the value is to 1, the less different it is from the population, and the less significant it is. The further it is from 1, for example one-offs for segment 3, the more significant and different it is from the population. From this, we can see that we can target segment 3 with new coffees that are one-off exclusive, for example.
 +
<br/><br/>
 +
 +
'''Robustness of Clusters''' <br/>
 +
We validate the robustness of our cluster by comparing our results against that of hierarchical clustering using Ward’s Method. We get the following overlap in the clusters:
 +
<br/>
 +
[[Image:IPMAN TC Kmeans Table 3.png|center|600px]]
 +
<br/>
 +
We see that our method is fairly robust, especially for Segments 1 and 2.
 +
<br/><br/>
 +
</div>
 +
 
<br/>
 
<br/>
  
Line 176: Line 471:
  
 
==Quality of Product==
 
==Quality of Product==
 +
<div style="font-family:Garamond;font-size:16px">
 +
Note: Contents for '''Software Architecture Redesign''' can be found in our [https://wiki.smu.edu.sg/is480/IS480_Team_wiki%3A_2016T1_IPMAN_Midterm_Wiki Mid-Term Wiki]. The '''Use of Adapter Pattern''' and '''Capturing Mailchimp statistics''' illustrated here has been refined after mid-terms to ensure clearer and better representation.
 +
<br/><br/>
 +
</div>
 +
 +
<div style="font-family:Garamond;font-size:18px">
 +
'''1. Use of Adapter Pattern'''
 +
</div>
 +
<div style="font-family:Garamond;font-size:16px">
 +
In order to communicate with Mailchimp services from our web application, we have to make calls to Mailchimp’s RESTful API services. However, we do not want to call these APIs directly from our controller, as it would mean that API calls to fetch similar data would be repeated.
 +
<br/><br/>
 +
How do we ensure that our main application can reuse the code that calls these RESTful services, as well as protect our main application from changes to Mailchimp’s API?
 +
<br/><br/>
 +
We solve this by using the '''Adapter Pattern'''. The high-level overview is shown below:
 +
<br/>
 +
[[Image:IPMAN TC Adapter.png|center|600px]]
 +
<br/>
 +
 +
Python itself uses modules rather than classes, where each file is a module. This is analogous to your Utility classes in Java, and a module diagram for how it is represented as an Adapter is provided below.
 +
<br/>
 +
[[Image:IPMAN TC Adapter Python Classes.png|center|800px]]
 +
<br/><br/>
 +
Using the above as an example, we delegate the responsibility of calling MailChimp’s RESTful API to the module mailchimp_api.py. In doing so, we can centralize all of the Mailchimp API related code. If Mailchimp decides to change their API interface (e.g. add a new field), only one module will be affected (Adapter – mailchimp_api.py), and we would only have to make changes there. Below is an example of the code from mailchimp_api.py module.
 +
<br/>
 +
[[Image:IPMAN TC Adapter PseudoCode.png|center|800px]]
 +
<br/><br/>
 +
When the actual call is made from the browser to our application, the resulting call graph is as below. As you can see, because all the methods in our app call Mailchimp’s RESTful services through the mailchimp_api.py module, we are able reduce change effort by reducing coupling, and the impacted modules from a change in Mailchimp’s API would only be at mailchimp_api.py. This can be seen from a modified call-graph generated using pycallgraph, as below:
 +
<br/>
 +
[[Image:IPMAN TC Adapter CallGraph.png|center|800px]]
 +
<br/>
 +
</div>
 +
 +
<div style="font-family:Garamond;font-size:18px">
 +
'''2. Decorator Pattern: Capturing MailChimp Statistics'''
 +
</div>
 +
<div style="font-family:Garamond;font-size:16px">
 +
Hookcoffee extensively uses email marketing to push out their products. However, while Mailchimp provides the capability to keep track of who has opened the email and who has clicked through, for any given campaign, the activities that the prospective customer has on the website is invisible to the owners.
 +
<br/><br/>
 +
Mailchimp provides an eCommerce tracking option which enables web developers to record revenue generated from their campaigns, but fail to provide granularity in the sales funnel. For instance, did the customer register their interest on the site? Or did they make a purchase or was engaged in the campaign in a positive way (switching to a different type of coffee).
 +
<br/><br/>
 +
Previously, it was invisible to HookCoffee what happens at that level. However, by building on top of the eCommerce function, we are able to fetch who the user is and from which campaign he was from by interacting with Mailchimp’s RESTful APIs. We also recorded what the user did AFTER they clicked through the email campaign on the local database.
 +
<br/><br/>
 +
However, the issue came when we found out that Mailchimp actually stores critical details after the clickthrough on the request itself as parameters on the request, as shown below.
 +
<br/>
 +
[[Image:IPMAN TC MailChimpStats Request.png|center|600px]]
 +
<br/>
 +
This meant that for every end point, we have to capture these parameters and store them in session, as shown below.
 +
<br/>
 +
[[Image:IPMAN TC MailChimpStats Flow.png|center|600px]]
 +
<br/>
 +
The naïve method is to go into every single url view endpoint and add a method to capture such data, but this proved to be impossible, due to the large number of possible endpoints. Furthermore, as the project went on, we cannot guarantee that all these endpoints will capture the data as other freelancers are also working on the same website.
 +
<br/><br/>
 +
We used the '''Decorator''' pattern to handle this. The decorator is an additional functionality we can add without affecting current implementations. Think of it as a plugin for a web browser.
 +
<br/><br/>
 +
Django handles decorators differently from an object-oriented language. Each decorator is actually a list of functions that are invoked (before it returns the original function). Here, we use an analogous model to display how it is.
 +
<br/>
 +
[[Image:IPMAN TC Analogous Model.png|center|800px]]
 +
<br/><br/>
 +
The decorator function that we have defined is shown below:
 +
<br/>
 +
[[Image:IPMAN TC MailChimpStats Decorator.png|center|800px]]
 +
<br/><br/>
 +
There exists a plugin to bind decorators to a url.py file, however, there was no indication of how we would do it on the same file. We dig deeper and realize the urls.py is automatically exported as a list in Django. Now, we store all URL patterns as a list of unwrapped (or undecorated) URL patterns. We then hook our own decorator (processMailchimpParams, which takes a request and stores the mailchimp campaign id and resolve the email address if it exists) to the list of unwrapped URL patterns, thereby causing it to execute for every endpoint (with the exception of static pages, e.g. images). This enables an easy to use solution that is easily extensible by other developers on the team, as modifications are made on the same file.
 +
<br/>
 +
[[Image:IPMAN TC MailChimpStats URLPatterns.png|center|800px]]
 +
<br/><br/>
 +
'''Issues arising from ordering of decorators'''
 +
<br/>
 +
We were contacted by one of the freelancers working on the internationalization, and he was trying to figure out how to make an external library which made use of decorators for translating between languages (solid_i18n_patterns).
 +
<br/>
 +
[[Image:IPMAN TC Freelancer.png|center|800px]]
 +
<br/><br/>
 +
We worked together with the freelancer to resolve the issue. The first issue our found was that the solid_i18n_patterns were being applied first before our decorator, causing the internationalized URL to be lost. In this case, the Chinese version of the site could not be accessed.
 +
<br/>
 +
[[Image:IPMAN TC PageError.png|center|800px]]
 +
<br/><br/>
 +
We that made sure that the decorator was only applied for URLs that we needed to capture, as the regular expression pattern that matches URLs in the internationalization had some side effects that prevented us from applying it to all URLs using a regular expression, hence by specifying the customer facing endpoints in a separate list (here we put it in the unwrapped_translated_patterns), we managed to solve the issue in a timely fashion.
 +
<br/><br/>
 +
[[Image:IPMAN TC Patterns Code.png|center|600px]]
 +
</div>
 
<br/>
 
<br/>
  
Line 219: Line 594:
 
|-
 
|-
 
|| User Stories
 
|| User Stories
|| [[IS480 Team wiki: 2016T1 IPMAN | User Stories]]
+
|| [[IS480 Team wiki: 2016T1 IPMAN Sprint Stories | User Stories]]
 
|-
 
|-
  
Line 247: Line 622:
 
|rowspan=4| Handover
 
|rowspan=4| Handover
 
|| Handover Procedure Timeline
 
|| Handover Procedure Timeline
|| See project handover timeline below
+
|| See project handover timeline in 'Project Risks' section of Final wiki page
 
|-
 
|-
 
|| User Manual  
 
|| User Manual  
|| [[IFile: | Delivered via private folder on Google Drive]]
+
|| Delivered via Private Folder on Dropbox (Invited Supervisors and Evaluators to view it)
 
|-
 
|-
 +
 
|| Developers Manual
 
|| Developers Manual
|| [[IFile: | Delivered via private folder on Google Drive]]
+
|| Delivered via Private Folder on Dropbox (Invited Supervisors and Evaluators to view it)
 
|-
 
|-
  
 
|| Setup Manual
 
|| Setup Manual
|| [[IFile: | Delivered via private folder on Google Drive]]
+
|| Delivered via Private Folder on Dropbox (Invited Supervisors and Evaluators to view it)
 
|}
 
|}
 
+
<div style="font-family:Garamond;font-size:16px">
 +
Note that due to the NDA signed with Hook Coffee, the user manual, developers manual and setup manual will be provided via private access.
 +
</div>
 
<br/>
 
<br/>
  
Line 282: Line 660:
 
For every functionality that we build, we have ensured maximum usability by using the following design methodology:
 
For every functionality that we build, we have ensured maximum usability by using the following design methodology:
 
<br/><br/>
 
<br/><br/>
[diagram to be inserted here]
+
[[Image:IPMAN Quality of Product Quality Process.png|center|600px]]
 
<br/><br/>
 
<br/><br/>
 
We improved the usability of their system, for instance in the resend order functionality - from 20 clicks down to 4 clicks - an 80% improvement.
 
We improved the usability of their system, for instance in the resend order functionality - from 20 clicks down to 4 clicks - an 80% improvement.
Line 288: Line 666:
 
We meet our sponsor at the start and end of every sprint for the following reviews, meeting every fortnight to ensure that any problems with our system can be made known to us immediately. We also communicate remotely via Telegram to validate our work and to communicate urgent matters to our sponsor. This is also a medium for us to gather feedback on our system if our sponsor is not available to meet physically, so that we still have timely feedback to continue our work that will also meet his business needs.  
 
We meet our sponsor at the start and end of every sprint for the following reviews, meeting every fortnight to ensure that any problems with our system can be made known to us immediately. We also communicate remotely via Telegram to validate our work and to communicate urgent matters to our sponsor. This is also a medium for us to gather feedback on our system if our sponsor is not available to meet physically, so that we still have timely feedback to continue our work that will also meet his business needs.  
 
<br/>
 
<br/>
 +
</div>
  
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Deployment</font></div>===
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Deployment</font></div>===
 +
<div style="font-family:Garamond;font-size:16px">
 +
Note: Facebook login will not work as it is tied to the hostname: hookcoffee.com.sg <br/>
 +
To view application, visit: http://128.199.107.26/manager <br/>
 +
Username: temp@supertemp.temp <br/>
 +
Password: supersecurepassword <br/>
 
<br/>
 
<br/>
 +
</div>
  
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Testing</font></div>===
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Testing</font></div>===
 +
<div style="font-family:Garamond;font-size:18px">
 +
<b>User Acceptance Tests</b>
 +
</div>
 +
<div style="font-family:Garamond;font-size:16px">
 +
Team IPMAN has conducted a total of 3 user tests which allowed us to better manage sponsor expectations as well as improve on usability of our application interface.
 +
</div>
 +
<center>
 +
[[Image: IPMAN Finals Testing Overview.png|800px]]
 +
<div style="font-family:Garamond;font-size:16px">
 +
For more detailed version of Team IPMAN's user acceptance test results, access it here:
 +
</div>
 +
[[Image: IPMAN UserTesting1 Icon.png|200px|link=IS480_Team_wiki:_2016T1 IPMAN User Testing 1]]
 +
&nbsp;&nbsp;&nbsp;
 +
[[Image: IPMAN UserTesting2 Icon.png|200px|link=IS480_Team_wiki:_2016T1 IPMAN User Testing 2]]
 +
&nbsp;&nbsp;&nbsp;
 +
[[Image: IPMAN UserTesting3 Icon.png|200px|link=IS480_Team_wiki:_2016T1 IPMAN User Testing 3]]
 +
</center>
 
<br/>
 
<br/>
  
Line 299: Line 701:
  
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Team Reflection</font></div>===
 
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Team Reflection</font></div>===
 +
[[Image:IPMAN Finals TeamReflections.png|center|1000px]]
 
<br/>
 
<br/>
  
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Individual Reflection</font></div>===
+
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Sponsors' Testimonial (Ernest and Faye)</font></div>===
 +
<center>
 +
[[Image:IPMAN HookCoffee Ernest.png|150px]]
 +
[[Image: IPMAN HookCoffee Faye.png|150px]]
 +
</center>
 +
<div style="font-family:Garamond;font-size:16px">
 +
"Team IPMAN produces work of great quality, values constant communication and provides regular updates (every 2 weeks) on the progress of product development. The team is dedicated, possess strong technical capabilities and is willing and flexible with requests to improve the user experience design on the product."
 
<br/>
 
<br/>
 +
</div>
  
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Sponsors' Testimonial</font></div>===
+
===<div style="background: #07264C; padding: 15px; line-height: 0.3em; text-indent: 15px; font-size:16px; font-family:Garamond"><font color= #FFFFFF>Individual Reflections</font></div>===
 +
[[Image:IPMAN Finals Reflections.png|center|1100px]]
 
<br/>
 
<br/>
 +
 +
  
 
<!--/Content-->
 
<!--/Content-->

Latest revision as of 08:54, 25 November 2016

Team IPMAN Logo 1200x960.png


Team IPMAN Icon Home.png   HOME

 

Team IPMAN Icon AboutUs.png   ABOUT US

 

Team IPMAN Icon ProjectOverview.png   PROJECT OVERVIEW

 

Team IPMAN Icon ProjectManagement.png   PROJECT MANAGEMENT

 

Team IPMAN Icon ProjectDocumentation.png   DOCUMENTATION

 


IPMAN FinalsWiki Title.png


Project Progress Summary


IPMAN Dashboard Final.png


IPMAN FinalsSlides Icon.png IPMAN MidTermDeployedSite Icon.png IPMAN Finals Pitch Video Icon.png IPMAN Poster Icon.png

Note: We have deployed live on Hook Coffee's existing application. However, as Team IPMAN has signed an NDA with Hook Coffee, the above link to the deployed site is only available to existing administrators in Hook Coffee. To view the application, we have created a staging server in which the credentials are available in the deployment section below.


Project Highlights

  • Implemented new chart technology such as D3.js to display customer segmentation in Sprint 11
  • Implemented the coffee demand prediction using Stochastic Knapsack Model in Sprint 11
  • Utilised KMeans Clustering to obtain customer segments that would be added into mailing lists on Mailchimp automatically in Sprint 11
  • Implemented access rights control using Role-Based Access Control in Sprint 12
  • Conducted our User Testing 3 with 10 business owners to validate the functions we have implemented for sponsors


Project Management


Project Status

IPMAN Progress Overview Final.png


As seen below, Team IPMAN has delivered 100% of the agreed-on project scope to our sponsor.

IPMAN Finals Project Scope Status.png


Project Schedule (Plan vs. Actual)

No major changes were made to the project schedule since IPMAN's Mid-Term presentation. Firstly, the team shifted our user testing 3 from 18 October 2016 to 3 November 2016. The team settled on this decision as we wanted to ensure that all functions of our platform would be covered and tested. As such, it was pushed forward from Sprint 11 to 12 when all functions would have been completed. Next, Team IPMAN added in new function in sprint 13 which is the integration of gifts tab because it was a new feature that the freelancer developers have built on the old application. In order for sponsors to be using the new application that Team IPMAN has built, Team IPMAN ported over the entire code that the freelancer developers have created onto the new application as soon as they were built. Lastly. the team also added in the project handover procedure and implementation as a new task in sprint 14 to ensure that there would be a proper handover timeline that the team would adhere closely to. This will allow all documentations to be properly handed over to the sponsors and freelancer developers. We believe proper documentation and instructions is vital for our sponsors and their freelance developers now and also, in the future.

Planned Project Schedule

The planned project schedule shows the Team IPMAN's timeline during Mid-Term presentation:

IPMAN Timeline Final Planned.png


Actual Project Schedule

The actual project schedule reflects the changes made to Team IPMAN's timeline between Mid-Term presentation and Final presentation:

IPMAN Timeline Final Actual.png


Project Metrics

Team IPMAN has applied the following 4 metrics to enable greater efficiency and effectiveness in project planning. No new project metrics was introduced between Mid-Term presentation and Final presentation.

Below are the graphical representations of the various metrics that IPMAN has applied:

1. Sprint Velocity

IPMAN Finals PM SprintVelocity.png


Sprint velocity is a measurement of the amount of work Team IPMAN has completed during each sprint and it a key metric. Velocity is calculated at the end of each sprint by summing the total points of completed user stories. Only stories that are completed at the end of the iteration are counted. As seen from the Sprint Velocity chart above, from mid-terms onwards, the team has completed all planned story points.

2. Scrum Burndown Chart
The Scrum Burndown Chart is a visual measurement tool to display the amount of work completed each day by Team IPMAN against the ideal projected rate of completion for the current sprint.

Formula
Ideal: Total planned story points to be completed over number of days in a sprint
Actual: Actual story points remaining after completion of story points each day in a sprint

The team will like to highlight several key points for the following sprints after Mid-Term presentation as shown below:

IPMAN BurndownChart Sprint11.png


IPMAN BurndownChart Sprint12.png


IPMAN BurndownChart Sprint13.png


IPMAN BurndownChart Sprint14.png


Team IPMAN completed all the planned story points before the end of the sprint. This shows that Team IPMAN has been consistent in the implementation and delivered the product within the desired schedule.

Sprint 13 & 14 are mainly the implementation of bug fixing based on UAT 3’s feedback. In Sprint 14, Team ended the coding implementation early on 20th November as team had to ensure that the application was tested thoroughly before the handing over our completed application to our sponsors on 23rd November.

3. Bug Metrics

IPMAN BugMetric Chart.png



4. Mean Time to Recover (MTTR)
Formula
(Hours spent on analysing the issue + Hours spent to implement the changes) / Number of issue in the sprint

IPMAN Finals MTTR Chart.png


Based on the MTTR in sprint 10, Team IPMAN spent 5.5 hours to implement the changes based on the feedbacks given by our supervisor for the mid-terms slides draft. Therefore, Team IPMAN has learnt from this incident. As such, Team IPMAN discussed about the final slides during internal meeting each week ever since mid-terms presentation. Currently, we took only 2 hours to implement the changes based on supervisor’s feedback.

S/N Sprint Issue / Change Description Suggested by Hours spent on analysing the issue/brainstorm Hours spent on to implement the changes Total Hours to Recover
12 11 Sponsor requested for additional inputs in the dashboard summary page Sponsors would like to view the numbers of customers who cancelled subscriptions and number of active customers on the dashboard Sponsors 0.1 1.25 1.35
13 12 Sponsor requested for the additional feature to be integrated Sponsor requested for the freelancer's codes (customer's sample) implemented on the old application to be integrated with our new application Sponsors 1 0 1
14 13 Sponsor requested for the additional feature to be integrated Sponsor requested for the freelancer's codes (customer's sample) implemented on the old application to be integrated with our new application Sponsors 0 2 2
15 13 Make changes to the final slides draft based on supervisor's comments Supervisor suggested to provide examples when we mentioned about the different models used, provide a one-page summary to show the values we have provided for sponsors and show how we used the metrics to mitigate issues in PM. Supervisor 1 1 2
16 14 Make changes to the processing order dashboard; Allow orders made using voucher codes Sponsor informed the team that customers are able to sign up without using credit card but using the voucher code sent by friends instead; thus, application needs to handle that in the processing order dashboard Sponsors 0.5 1 1.5


Project Risks

IPMAN RiskManagement Chart.png

From the period of Mid-Terms till Final Presentation, we will like to highlight that our concerns were 1) Technical Risk and 2) Stakeholder Management Risk as described below:

S/N Risk Type Risk Event Likelihood Impact Level Category Strategy Adopted Actions
11 Technical Risk Team IPMAN had the risk to reformulate the analysis models because of sparse data sets. High High A Mitigate Team IPMAN consulted one of our Professors for the feasibility of the models created and also did a lot of prior research before the implementation of analysis modules. Subsequently, the team created a quick mock up for the prototype so that changes can be made easily.
12 Stakeholder Management Risk Freelancer developer created new feature on the old dashboard. Sponsors were inclined to use the old dashboard if the codes were not ported over to the new application. High High A Mitigate Team IPMAN ported over the entire code that the freelancer developers have created onto the new application as soon as they were built. Team IPMAN will schedule for a handover ceremony to present to the freelancer developers all the proper documentation we have created and assist any questions from them so as to ensure the continuity of the application.



The diagram below illustrates our project handover procedure to our sponsors and freelance developers.

IPMAN Project Handover Procedure.png


We also foresee a potential integration risk that can occur post-handover of our project, hence planning our mitigation plan in advance:

S/N Risk Type Risk Event Likelihood Impact Level Category Mitigation
13 Integration Risk The new application that we have built is using the database models. If the database models change (such as when the internationalization functionality was built by the freelancers), these changes would impact our system. Low High B Team IPMAN took the initiative to understand what changes have been made and whether the changes are necessary by discussing with the freelancers early on. We also work to communicate with freelancers to modify models in a way such that any impact is minimized, e.g. adding fields instead of changing fields in the model.



Change Management

Below is the change log for Sprint 11 to 14 (after Mid-Term presentation):

IPMAN Finals Change Log.png


Technical Complexity

Note: Comparison Using Hashes and Fortnightly Live Deployment have been created prior to our Mid-term presentation and it is accessible via our Mid-Term Wiki.
Monte Carlo Stochastic Knapsack and Understanding Customer Segments with K Means Clustering is Team IPMAN's new technical complexity after mid-terms.

1. Deciding how much budget for each marketing component with Monte Carlo Stochastic Knapsack Problem

(Reference: Morton, D. P., & Wood, R. K. (1997). On a Stochastic Knapsack Problem and Generalizations. In ResearchGate (pp. 149–168). https://doi.org/10.1007/978-1-4757-2807-1_5)

Problem Statement
Right now, HookCoffee has a range marketing activities – Google Adwords, Facebook campaigns, introducing coffees, writing blog articles, sending email campaigns and doing roadshows - but they don’t know how much to spend on each component, and they have no way of keeping track how well their campaigns have done viz-a-viz their Key Performance Indicators, namely, new signups, active customers, churn, and most importantly, the number of orders for the month. In this analysis module, we hope to solve the problem of deciding how much to spend on each component so that they maximize their growth in orders.

Budgeting
Here, because the full marketing budget varies and is not known, we make certain assumptions so that the problem at hand can be modelled as a Knapsack problem with a fixed budget. We assume that their marketing budget grows in proportion with the weighted moving average percentage increase in number of orders, as below:

IPMAN TC Knapsack Formula 1.png


In layman’s terms, the budget for this month is equal to the budget for last month multiplied by the weighted average percentage change in coffee demand.

Modelling

IPMAN TC HookCoffee Order Dist Graph.png IPMAN TC Stock Graph.png


The distribution of demand is very similar to that of stock prices, and can be said to be an Ito Process, following the Geometric Brownian Motion i.e.

IPMAN TC Knapsack Formula 2.png


This means that we can model demand at each time period under the lognormal distribution, as below (Reference: Magee, J. F., Copacino, W. C., & Rosenfield, D. B. (1985). Modern Logistics Management: Integrating Marketing, Manufacturing and Physical Distribution. John Wiley & Sons.):

IPMAN TC Knapsack Formula 3.png



Finding the Parameters

IPMAN TC FindingParameters Desc.png



The Monte Carlo Stochastic Knapsack Problem

IPMAN TC MonteCarloStochasticKnapsack Desc.png


IPMAN TC MonteCarloStochasticKnapsack Image.png



Validation

IPMAN TC Knapsack Validation.png


IPMAN TC Knapsack Validation Table.png


IPMAN TC Knapsack Formula 4.png



We reject the null hypothesis at the 10% level of significance.

There is sufficient evidence to show our MCSKP agent performs better than the random agent (p-value = 0.05679) over the 12-month period at the 10% level of significance.

Empirically, however, our agent has yet to be tested in the real world. We hope that it will perform similarly, but we have put into place preventive measures to allow our sponsor to validate whether the recommendations still make sense. We have provided a table below that if they follow exactly, i.e. low deviation and it still does not hit the expected demand, our model may not be working as expected in practice, and they should look at the historical data to see if there are any other conclusions that can be drawn.

IPMAN TC Knapsack Validation Table 2.png




2. Understanding Customer Segments with Clustering

Problem Statement
We wanted to deliver real business value, providing our sponsor with insights they didn’t know about their customers. We suggested doing automatic segmentation of customers, because we realized they had difficulty doing segmentation manually using external tools (like Intercom). Even if they manually found out about their segments, there was little data and they still had to process the data manually to find out if there’s anything that they can use to target that specific segment.

Understanding their Customers
We first tried to find what metric we could use to cluster customers. From previous visualization of data, we found out that there was a huge portion of their customer base who were extremely loyal to them, and these are the customers who order more. We also understood from our sponsor that there was an issue with churn and people exploiting the voucher codes, so we wanted to find out who were these customers as well.

We concluded using the following variables as segmentation variables:

IPMAN TC Kmeans Formula 1.png


The following will the profiling variables used, which are things that our sponsor can act to target the segments involved:

IPMAN TC Kmeans Formula 2.png



Finding Number of Segments
We will be using two popular methods of clustering: hierarchical clustering and k-means clustering. We will first use hierarchical clustering to find the number of clusters, k, that we can fit into k-means cluster algorithm later.

We first perform Principal Component Analysis to reduce the dimensionality of our segmentation variable to a n X 2 vector (where n=2207), and performed hierarchical clustering using Ward’s method, which works well for quantitative variables. This is described in scipy’s documentation as follows:

IPMAN TC Kmeans Formula 3.png


The resulting dendrogram is as follows:

IPMAN TC Kmeans Dendrogram.png


We truncate the dendrogram to get more readable results, as follows:

IPMAN TC Kmeans Dendrogram truncated.png


At first, we attempted to use the elbow method to find the clustering step where the acceleration of distance growth is the biggest (the "strongest elbow") of the blue line graph below, which is the highest value of the orange graph, as below:

IPMAN TC Kmeans Dendrogram graph.png


Here, we get k = 2, however we found that if we do that, we would be ignoring a large group of high value customers, where the threshold is shown in grey, and the lost segment is shown in purple below:

IPMAN TC Kmeans Dendrogram truncated explained.png


We set our threshold at 200 and will be taking these 3 segments instead, and will feed k=3 into our k-means clustering.

IPMAN TC Kmeans Dendrogram truncated explained 2.png



K Means
We use scikit-learn library to conduct the k-means. The K-means algorithm aims to choose centroids that minimise the inertia, or within-cluster sum of squared criterion:

IPMAN TC Kmeans Formula 4.png


We set k=3, and the following table shows the profiles of the different clusters.

IPMAN TC Kmeans Table.png



Interpretation
From the number of orders and ratio, we conclude the following:

Segment 1 are the "Surfers", they tend to jump around from one new thing to the next, trying out new stuff for a while before moving on to the next hip thing.

Segment 2 are the "Benefit Seekers", they quickly churn after their first order, after using the voucher provided on signup.

Segment 3 are the "Committed Customers", they remain loyal to HookCoffee even after a long time, making as many as 14 orders, and are the biggest average spenders among the 3 spenders. Hookcoffee’s job is to keep them committed, and to move more people to this segment/get more people to join this segment.

We calculated the ratio for each variable of each segment and compared it against the population; we see that there is low similarity between the profiling attributes of the segments found, as shown below:

IPMAN TC Kmeans Table 2.png


The closer the value is to 1, the less different it is from the population, and the less significant it is. The further it is from 1, for example one-offs for segment 3, the more significant and different it is from the population. From this, we can see that we can target segment 3 with new coffees that are one-off exclusive, for example.

Robustness of Clusters
We validate the robustness of our cluster by comparing our results against that of hierarchical clustering using Ward’s Method. We get the following overlap in the clusters:

IPMAN TC Kmeans Table 3.png


We see that our method is fairly robust, especially for Segments 1 and 2.




Quality of Product

Note: Contents for Software Architecture Redesign can be found in our Mid-Term Wiki. The Use of Adapter Pattern and Capturing Mailchimp statistics illustrated here has been refined after mid-terms to ensure clearer and better representation.

1. Use of Adapter Pattern

In order to communicate with Mailchimp services from our web application, we have to make calls to Mailchimp’s RESTful API services. However, we do not want to call these APIs directly from our controller, as it would mean that API calls to fetch similar data would be repeated.

How do we ensure that our main application can reuse the code that calls these RESTful services, as well as protect our main application from changes to Mailchimp’s API?

We solve this by using the Adapter Pattern. The high-level overview is shown below:

IPMAN TC Adapter.png


Python itself uses modules rather than classes, where each file is a module. This is analogous to your Utility classes in Java, and a module diagram for how it is represented as an Adapter is provided below.

IPMAN TC Adapter Python Classes.png



Using the above as an example, we delegate the responsibility of calling MailChimp’s RESTful API to the module mailchimp_api.py. In doing so, we can centralize all of the Mailchimp API related code. If Mailchimp decides to change their API interface (e.g. add a new field), only one module will be affected (Adapter – mailchimp_api.py), and we would only have to make changes there. Below is an example of the code from mailchimp_api.py module.

IPMAN TC Adapter PseudoCode.png



When the actual call is made from the browser to our application, the resulting call graph is as below. As you can see, because all the methods in our app call Mailchimp’s RESTful services through the mailchimp_api.py module, we are able reduce change effort by reducing coupling, and the impacted modules from a change in Mailchimp’s API would only be at mailchimp_api.py. This can be seen from a modified call-graph generated using pycallgraph, as below:

IPMAN TC Adapter CallGraph.png


2. Decorator Pattern: Capturing MailChimp Statistics

Hookcoffee extensively uses email marketing to push out their products. However, while Mailchimp provides the capability to keep track of who has opened the email and who has clicked through, for any given campaign, the activities that the prospective customer has on the website is invisible to the owners.

Mailchimp provides an eCommerce tracking option which enables web developers to record revenue generated from their campaigns, but fail to provide granularity in the sales funnel. For instance, did the customer register their interest on the site? Or did they make a purchase or was engaged in the campaign in a positive way (switching to a different type of coffee).

Previously, it was invisible to HookCoffee what happens at that level. However, by building on top of the eCommerce function, we are able to fetch who the user is and from which campaign he was from by interacting with Mailchimp’s RESTful APIs. We also recorded what the user did AFTER they clicked through the email campaign on the local database.

However, the issue came when we found out that Mailchimp actually stores critical details after the clickthrough on the request itself as parameters on the request, as shown below.

IPMAN TC MailChimpStats Request.png


This meant that for every end point, we have to capture these parameters and store them in session, as shown below.

IPMAN TC MailChimpStats Flow.png


The naïve method is to go into every single url view endpoint and add a method to capture such data, but this proved to be impossible, due to the large number of possible endpoints. Furthermore, as the project went on, we cannot guarantee that all these endpoints will capture the data as other freelancers are also working on the same website.

We used the Decorator pattern to handle this. The decorator is an additional functionality we can add without affecting current implementations. Think of it as a plugin for a web browser.

Django handles decorators differently from an object-oriented language. Each decorator is actually a list of functions that are invoked (before it returns the original function). Here, we use an analogous model to display how it is.

IPMAN TC Analogous Model.png



The decorator function that we have defined is shown below:

IPMAN TC MailChimpStats Decorator.png



There exists a plugin to bind decorators to a url.py file, however, there was no indication of how we would do it on the same file. We dig deeper and realize the urls.py is automatically exported as a list in Django. Now, we store all URL patterns as a list of unwrapped (or undecorated) URL patterns. We then hook our own decorator (processMailchimpParams, which takes a request and stores the mailchimp campaign id and resolve the email address if it exists) to the list of unwrapped URL patterns, thereby causing it to execute for every endpoint (with the exception of static pages, e.g. images). This enables an easy to use solution that is easily extensible by other developers on the team, as modifications are made on the same file.

IPMAN TC MailChimpStats URLPatterns.png



Issues arising from ordering of decorators
We were contacted by one of the freelancers working on the internationalization, and he was trying to figure out how to make an external library which made use of decorators for translating between languages (solid_i18n_patterns).

IPMAN TC Freelancer.png



We worked together with the freelancer to resolve the issue. The first issue our found was that the solid_i18n_patterns were being applied first before our decorator, causing the internationalized URL to be lost. In this case, the Chinese version of the site could not be accessed.

IPMAN TC PageError.png



We that made sure that the decorator was only applied for URLs that we needed to capture, as the regular expression pattern that matches URLs in the internationalization had some side effects that prevented us from applying it to all URLs using a regular expression, hence by specifying the customer facing endpoints in a separate list (here we put it in the unwrapped_translated_patterns), we managed to solve the issue in a timely fashion.

IPMAN TC Patterns Code.png


Project Deliverables

Stage Specification Modules
Project Management Project Schedule Project Schedule
Meeting Minutes Internal, Sponsor and Supervisor Meeting Minutes
Metrics Project Metrics
Risk Management Risk Management
Change Management Change Management
Requirements Project Overview Project Overview
Team's Motivation Team's Motivation
Project Scope Project Scope
User Stories User Stories
Analysis Personas and Scenarios Personas & Scenarios
Diagrams Diagrams
Design Prototypes Low & Mid Fidelity Prototypes
Project Implementation Technologies Used Technologies Implemented
Testing User Test Plan and Results Testing Documentation
Handover Handover Procedure Timeline See project handover timeline in 'Project Risks' section of Final wiki page
User Manual Delivered via Private Folder on Dropbox (Invited Supervisors and Evaluators to view it)
Developers Manual Delivered via Private Folder on Dropbox (Invited Supervisors and Evaluators to view it)
Setup Manual Delivered via Private Folder on Dropbox (Invited Supervisors and Evaluators to view it)

Note that due to the NDA signed with Hook Coffee, the user manual, developers manual and setup manual will be provided via private access.


Quality

Performance:
Because we cannot optimize the Python libraries (after trying both PyPDF and pdfrw), we had to render the labels with customer information, in .pdf format, in a way that ensured high performance during the regular business hours. We generated new tasks for every order to pre-process the PDFs using a task scheduler that was built on top of Python (Celery) so that new orders would have their order label pdfs ready by the time they must be printed. This sped up the process for each label from 0.47s to 0.05s for our experiment with one label, and led to an overall reduction for printing all labels by 68.09%.

In pages that require extended or large use of data, long page loading times are expected. Asynchronous calls help to alleviate this issue, rendering the longest-loading endpoint to be the page-load critical path. Also, to minimise the user’s idle time, we display data as they load, without waiting for the other endpoints. This allows the user to start using parts of the page first while waiting for other endpoints with longer loading times to be returned. Apart from improved user experience, this methodology also builds fault-tolerance into each page. This way, even if a particular endpoint fails to load, other parts of the page can continue to function.

With constant communication between our front-and-back end developers, we have also managed to minimise the use of promises/callbacks on the frontend to process data. Our endpoints allow for batch-updates, where foreseen, to allow at most one HTTP call to process each user action. This reduces the amount of round-trip time (RTT) for communication between the client and server, saving bandwidth and loading times for both parties.

Maintainability:
We ensure high maintainability for our code base through various ways. For example, we maximize the use of functionalities that are built into Django itself, from the Role-Based Access Control System to the Decorator functionalities that we use for each endpoint. This is as our code would have to be maintained by a third party in the future, so following conventions would enable them to easily take over our work. We also configured PyCharm to use PEP8, a style guide for Python, and ensured that the majority of our code is PEP8-compliant. We have documentation for each API-endpoint so that they can be easily reused, and that is documented in the developer’s manual. We also ensure that both the development branch and production branches are separate during our development so that any urgent bug changes in the production branch can be quickly rectified and redeployed, as we are deploying live and running it for the system. We also made sure that messages in the each of the commits were succinct and documented what changes were made to the codebase, and isolated each change to each commit, so that it is easy to refer to later on by any party.

Usability:
For every functionality that we build, we have ensured maximum usability by using the following design methodology:

IPMAN Quality of Product Quality Process.png



We improved the usability of their system, for instance in the resend order functionality - from 20 clicks down to 4 clicks - an 80% improvement.

We meet our sponsor at the start and end of every sprint for the following reviews, meeting every fortnight to ensure that any problems with our system can be made known to us immediately. We also communicate remotely via Telegram to validate our work and to communicate urgent matters to our sponsor. This is also a medium for us to gather feedback on our system if our sponsor is not available to meet physically, so that we still have timely feedback to continue our work that will also meet his business needs.

Deployment

Note: Facebook login will not work as it is tied to the hostname: hookcoffee.com.sg
To view application, visit: http://128.199.107.26/manager
Username: temp@supertemp.temp
Password: supersecurepassword

Testing

User Acceptance Tests

Team IPMAN has conducted a total of 3 user tests which allowed us to better manage sponsor expectations as well as improve on usability of our application interface.

IPMAN Finals Testing Overview.png

For more detailed version of Team IPMAN's user acceptance test results, access it here:

IPMAN UserTesting1 Icon.png     IPMAN UserTesting2 Icon.png     IPMAN UserTesting3 Icon.png



Reflection

Team Reflection

IPMAN Finals TeamReflections.png


Sponsors' Testimonial (Ernest and Faye)

IPMAN HookCoffee Ernest.png IPMAN HookCoffee Faye.png

"Team IPMAN produces work of great quality, values constant communication and provides regular updates (every 2 weeks) on the progress of product development. The team is dedicated, possess strong technical capabilities and is willing and flexible with requests to improve the user experience design on the product."

Individual Reflections

IPMAN Finals Reflections.png




Silhouettes wiki background IPMAN.png