In this talk, I will discuss a real, actual problem we faced at CodeZone.
We will discuss the solution we have adopted using one of the most advanced methods of artificial intelligence called Deep Learning.
2. About Me
12+ Years of Experience in Software
Development
Development Manager & Co-Founder
@CodeZone
Blogger @ galaldev@blogspot.com
Interests
• SW Engineering
• Deep (Machine) Learning
• Data Science
• System Performance
4. Estimation Story
Customer request
new Requirements
All Team estimates
each requirement
Story Points
Product owner tells
the customer the
expected time
5. Estimation Story
Now team is working hard to meet the
schedule
Then you got a lot of new requirements from
another customer
Now the customer told you that “Please give
me an initial estimation for these
requirements”
What can you do?
6. Estimation Story
Option 1: Gather the
team and do estimation.
• But your team already has no
time to make a new estimation
Option 2: Hire a machine
to do the estimation
• It sounds good
7. Estimation Story
Input Data
• The requirement text
contents written in
Arabic
Output
• Story points for each
requirement
10. Text Preprocessing
Unstructured text requires some
preprocessing
Preprocessing vary from English to Arabic
This can be achieved by several cleaning
methods, such as
• replacing special characters
• replacing punctuation marks
• removing diacritics
• removing duplicate characters
• removing stop-words
• removing numbers … etc.
• Stemming
11. Text Preprocessing
•االهداف تعريف فى العميل باضافة تعديل<div
dir=rtl><p>باسم تابة اضافة مطلوب
اضافة يتم بحيث العميل&#160;عميل
لالهداف</p></div>
Original
Text
•ا مطلوب االهداف تعريف العميل باضافه تعديلضافه
لاله عميل اضافه يتم بحيث العميل باسم تابهداف
Cleaned
Text
12. Words To Vectors
Text data are unstructured data, then it needs to
transform from text space to vector space in order to
deal with it as input features for Classifier algorithm
Word2Vec one of popular methods
It convert similar words to nearby vectors
Ex: “”الموظف near to “”العامل than “”السيارة
14. Train ConvNet
Convolution Neural Network (ConvNet) is a
neural network that can make use of the internal
structure of data such as the 2D structure
Some researches apply ConvNet to text
classification so that each unit in the convolution
layer responds to a small region of a document
There are four main steps in the Convolution
Neural Network (ConvNet):
• Convolution
Non-Linearity
Pooling or Sub Sampling
• Classification (Fully Connected Layer)
Welcome and good morning.In this talk, I will discuss a real, actual problem we faced at CodeZone.We will discuss the solution we have adopted using one of the most advanced methods of artificial intelligence called Deep Learning.
I am Mohamed Galal I have worked in Software Development for over 12 years, and have participated in the development of software serving clients in different fields.I also cofounded CodeZone 8 years ago, and am a Software Development Manager.I also created and maintain a blog which addresses and discusses technical topics. My blog is in Arabic to enrich Arabic content.
Now, let's start with the story of how the Estimation works.
Initially, the client has some requirements and has asked our company to address and implement them.After receiving the requirements, the team will discuss them and estimate the effort by specifying Story Points for each requirement or user story.The Product Owner will then communicate to the client the anticipated deadline to implement these requirements.
At that point, the team will work hard to meet the deadline. However, during this period, a different client has requested an initial estimate for his new requirements.What should we do?
The first option is to gather all or some of the team to complete an estimation. However, this would require our team to stop working on the current sprint, which may lead to delay.The second option is to hire a machine to do estimation (sounds interesting).
Now, we are going to develop a software or a model to predict the story points for the new user stories depending on user stories text contents.
Now, let's talk about Model Architecture.
To build any model, we have to train it on historical data, called Training set. CodeZone has a backlog containing about 1,000 User Stories. We then, developed a training dataset containing 828 User Stories, and Testing Dataset contains 100 User Stories.The Training Dataset is a list of User Stories. Each User Story has the Story Points that the team has previously estimated, in order to instruct the model how to draw a relationship between the user story text contents and its story points.The Testing Dataset is compiled of User Stories. Each User Story has the Story Points that the team had previously estimated, but the model doesn’t "see" it during the training. However, when evaluating the model, the results predicted by the model are compared to the original story points to evaluate the model quality.The stages are as followsFirst, Text Data is preprocessed. Then, Text Data is converted to Vectors so it can be utilized and forwarded to the Convolution Neural Network, which is one of the famous Neural Networks used in Deep Learning. Finally, the last step is to evaluate the model.
Usually, Text requires some preprocessing to be useful in the classification task. These methods differ from one language to another. For example, in Arabic, the Stopwords differ from the English language, and the methods of Stemming are different.These are some of the methods used to achieve this:
Let's take for example, the Text before and after the preprocessing task. The original Text contains HTML Tags and a "في" preposition, which was removed from the clean text.
The model can understand numbers, but not Text. So, the Text should be converted to numbers or Vectors. One of the most popular methods of doing this is, Word2Vec. This method converts the nearest words in the meaning to the nearest Vectors. For example, the word of “employee." Its Vector is close to the Vector of the word, "worker," which is more than the Vector for the word “car." This has a huge, positive impact on the classification process.
Each word is represented by a Vector. Each User Story is represented by a matrix of its word Vectors, as follows:
We have the data ready for the training process in this phase. We chose to work with a type of Neural Network called Convolution Neural Network. In fact, this Neural Network is used more with images, but some researchers used it in the text classification task, with good results.
This is the architecture of the Convolution Neural Network that we used, which was previously published in a scientific journal in 2014 by an author named, Kim.
At this point, we have created the model. We now, want to apply the Testing Dataset, which this model has never seen before.
We have now tested the model, which resulted in a 74% Accuracy rate. This means our model correctly predicting 74% testing user stories to the original story points supplied by the team.
This graph shows the result of testing after each training iteration.