Saturday, 17 November 2018

Datarmatics International Coding Festival Comming up...

Datarmtics International Coding Festival Coming up in December.
Program would be provided soon.

Thursday, 15 November 2018

How Bubble Sort Algorithm Works (Implementation in Java)

This would be a very simple explanation with the program in Java on how the Bubble Sort Algorithms works.

Bubble Sort works by iterating through the elements of the array and doing pairwise swap of adjacent elements that are out of order.

We would examine the program in Java and then explain it line by line. The we would actually run the program using Netbeans IDE to see how it works.

The java program is explained as follows: There would be three functions in addition to the main methods

BubbleSort(): This is the function that performs the sorting on an array. This function takes an array as parameter.

    public static void BubbleSort(int[] a)
        int i, j;
        int N = a.length;
        for(j=N-1; j>0; j--) {
            for(i=0; i<j; i++){
                if(a[i]> a[i+1])
                    swap(a, i, i+1);
Listing 1: BubbleSort function

Swap(): This function performs a pairwise swap of two array elements. It take three parameters: the first is the array, the second and third are the indices of the elements to be swapped.

    public static void swap(int[] ar, int x, int y)
        int k = ar[x];
        ar[x] = ar[y];
        ar[y] = k;
Listing 2: Swap Function

Display(): This function displays the elements of the array to the output by looping through the array elements and calling System.out.println().

    public static void Display(int a[])
        int i=0;
        while(i != a.length)
Listing 3: Swap Function

Main(): Runs the program by calling the each of the functions.

    public static void main(String[] args) {
      int a[] = {5,7,3,8,0,2};    //INITIALIZE AN ARRAY WE ARE GOING TO SORT
      Display(a);                 //DISPLAY THE UNSORTED ARRAY
      BubbleSort(a);              //SORT THE ARRAY USING BUBBLESORT     
      System.out.println("The Sorted list is given below:");
      Display(a);                 //DISPLAY THE SORTED ARRAY
Listing 4: Main Program

This short video explains how to put everything together and run it in Netbeans

Monday, 12 November 2018

What is Genetic Algorithm? (A Simple and Detailed Explanation)

Hello guys, I would be happy to give you a clear explanation about the concept of Genetic Algorithm. And this is very interesting because scientists are kind of succeeding in breaching the gab between biology and artificial intelligence.

I would explain the concept in two ways: Simple and clear non-technical overview Some technical details (if you would like to go further!)

You could stop after the first part if you are not a tech pro, but it's alright to take up challenges from time to time.

We would cover the following:
  1. Foundation of Genetic Algorithm
  2. What is Genetic Algorithm?
  3. Why Genetic Algorithm
  4. Phases in Genetic Algorithm
  5. Concept of Heuristics
  6. The Simplified Algorithm
  7. Summary
  8. Final Notes

1. Introduction to Genetic Algorithms (Who did it first?)

Just like you know, the field of technology had made great strides by copying from creation. So you see great inventions actually existed in nature all the while. Take a few examples:
  • Airplanes wings design: existed naturally in birds
  • Air Conditioning Technology: used by termites
  • Antifreeze: existed in some microscopic plants
  • Underwater Breathing technology: used by water beetles
  • Clocks: Many living things keep time naturally
  • Compasses: Used naturally by migrating birds
  • Jet Propulsion: Naturally in squid 
Other are Sonar, lighting, submarines, incubator, electricity and more. For an exhaustive list, you could read chapter 12(Who did it First) of the book 'Creation', published by Jehovah's Witnesses.

The same principle applies to generic algorithm. It is an attempt to mimic the way natural selection occurs  in living things. But what exactly is Genetic Algorithm?

2. What is Genetic Algorithm?

Genetic algorithm is a procedure used in the field of Computer Science and operations research to solve problems of optimization copying the process of natural selection. Genetic Algorithm attempts to generating the best solution by employing operations such as mutation, cross-over and selection.
So the objective is the start with a very large population (or space) and then gradually reduce the size until you have only the best (kind of survival of the fittest)

3. Why Genetic Algorithm?

Genetic algorithm tends to play the same role as Artificial Intelligence. But Genetic Algorithm is sometimes considered to be more robust than AI. This is because, unlike conventional AI systems, GA would adjust on changing inputs and would also be able to handle noisy or fuzzy input. Additionally, GE is able to handle complex problems better.

4. Phases in Genetic Algorithm

Just as was mentioned, GE begins with a large population and gradually reduces it using some heuristics until only the best is left. So let's look at the phases

(a) Initial Population

The process starts with a set of individuals known as the Population. Each individual member of the population represents the solution to the problem that need to be solved. This is the starting point. Each individual is associated with parameters known as Genes which are joined together into a string to form a Chromosome. The set of genes of a particular individual is represented using a string (these set of string represent the chromosome. This is illustrated in the figure below.

Figure 1: Genes, Chromosomes and Population

(b) Fitness Function

The fitness function is the relation that determines how fit an individual member of the population is. There is a fitness score associated with each individual. The more fit an individual is, then the higher the fitness score or vice versa. And the higher the fitness score, the higher the probability that individual will be selected for reproduction to the next generation.

(c) Selection

This is an idea of deciding which member of the existing generation is selected to breed the new generation and this is based on the fitness of that individual. The more fit the individual, the more likely it would be selected. During the selection process, two individuals are selected to serve as "parents" to be used to produce the next generation.

(d) Crossover

Crossover is also called recombination. It is an operation of merging the genetic information from the parents (father and mother) to produce new offspring.
This is illustrated in Figure 2. From the figure, we can see that some of the genes 'crosses-over' to produce new set of genes.

Figure 2: Crossover

(e) Mutation

Mutation just like crossover is a genetic operation. In the case of mutation, the arrangement of the genes in the chromosome kind of alters to produce a totally new chromosome. This happens with very low probability. Evolutionist tent to capitalize on mutation to explain how species evolve into now species. But this is not based on any scientific law.

(f) Termination

Just as you know, an algorithm terminates at some point. This process is also called convergence. So the algorithm repeats until certain termination conditions is reached where the offspring is a new generation is not much different from the previous. At this point not much changes occur and this is called termination.

5. Concept of Heuristics

I would like to mention the concept of heuristics as it relates to genetic algorithms. Heuristics sometimes is called 'rule of thumb'. In case of generic algorithm, other rules  are employed to enhance the process and improve the quality of the final solution.

6. The Simplified Algorithm

I would like to write the simplified algorithm based on what we have discussed so far. This is given in the listing below.

Generate the Initial Population
Compute Fitness
  Perform Selection
  Perform Crossover
  Perform Mutation
  Compute Fitness
UNTIL population converges
Listing 1: Simplified Genetic Algorithm

7 Summary

From this brief discussion, we can see that genetic algorithm claims that you can get a good solution (best members of population) by performing certain operations such as crossover and selection as well as applying certain heuristics. Research in Genetic algorithm is currently being carried out in different areas with the objective of creating better products/processes.

8. Final Notes

We could be sure that there is much dissimilarity in the understanding of what is know and genetic algorithm is natural world and the current trend of research in genetic algorithm. While we can be sure that there is not scientific proof that living organisms evolved into new ones,  the genetic algorithms can be applied today to solve scientific problems and more.

I'll like to thank you for reading and you could let me know if this is been informative for you in the comment box below or the form to the left of this page.

Thursday, 8 November 2018

5 Keys to Getting Project Management Professional(PMP) Certification

I could tell you that of all the certification I've acquired as a Tech Professional, the Project Management Professional (PMP) certification was the toughest to achieve.

This is not tough in terms of just to study effort, but financially as well. I literally spent thousands of dollars as I had to made two international travels (there was not exam center in my country at the time), take the PMP courses as well as join a local PMI chapter.

I sat for the exam twice and passed it at the second sitting and now I would share these five hints with you so you could make it the first time and avoid making the mistake I made. At a different day, I could share my story.

1. Participate in Project Management Activities
2. Set Aside Sufficient Time to Prepare
3. Make Sure You Pass Mock Exams First
4. Write a Full Project Management Plan
5. Complete Reading the PMBOK Guide at Least 3 Times

Let's get started with the first point

1. Participate in Project Management Activities

The truth is that the PMP certification is unique. You really can not memorize the study materials and make it through. You need develop the Project Management mindset. This means that you develop overall view of work role: seeing work activities in terms of cost, resources, budget, schedule, stakeholders, risks etc.
You can only develop this mindset if you get involved to some extent with Project Management activities. So try to reach out to Project Managers in your organization to understand how they do things. You could also leave me a comment below this article if you would need my assistance.

2. Spent Sufficient Time to Prepare

I would recommend you make out at least 6 months for preparation. This means that you could use about 1 hour everyday to read and study for the exam. Remember you have much to learn includes some aspects of cost analysis, so you need some time to get your head around these things.

3. Make Sure you Pass Mock Exams First

The rule of thumb here is simple: 'if you have not passed the mock exams satisfactorily, then don't attempt the real exam'.
The current passing score for the PMP  exam is 80.6%! That is quite high considering the fact that the questions are scenario-based and not easy. Therefore you need to score about 90% on your mock exams a number of times, before you can say you're ready to go for the PMP exam.

4. Write a Project Management Plan

This may actually be the most tasking part of your prep effort. But Trust me, this is a key  to success in the PMP. A Project Management Plan is a document that defines how a project would progress. It contains every bit of details about the project activities.
So go read up Project Management Plan and develop one for a hypothetical project. You could let me know if you have challenges using the form to the left of this page.

5. Complete Reading the PMBOK Guide at Least 3 Times

The PMP exam is based on the PMB Guide, but note that it's just a guide to help you understand the concepts of Project Management. However, the questions are based on how you can apply the concepts in real work scenario. So step 1 is to know the concepts which are actually covered close to 100% in the exam.
I'm sure that with the right effort and motivation, you will make it through the PMP certification path.

I wish you success in your efforts!

Wednesday, 7 November 2018

Java Progamming For Beginners Lesson 3: Your Second Program (Java Basic Syntax)

In this Tutorial 3, we would write a second program and also understand java basic syntax. In Tutorials 1 we installed NetBeans which is the compiler you will be using.
In Tutorial 2, we wrote our first program.

Let's start with a little exercise. (Your Second Program)
Write and run the program below. You already know how to create Java application in NetBeans.

    public static void main(String[] args) {
      String name = "Kindson The Genius"; //You can replace Kindson The Genius with your own name
      String title = "Researcher";
      String location = "Europe";
      int duration = 1;

      System.out.println("My Name is "+ name );
      System.out.println("I am a " + title );
      System.out.println("I live in " + location);
      System.out.println("I have stayed here for " + duration + " year");
Listing 1.0: Your Second Program

If you have written it correctly and run it, the window would be as shown in Figure 1 below.

Figure 1

Let's understand a few things about the program above

1. The first four lines following the main line show a declaration of four variables. The first 3 are strings while the last one is an integer(number). A variable is just a memory location to hold values.

      String name = "Kindson The Genius"; //YOu can replace Kindson The Genius with your own name
      String title = "Researcher";
      String location = "Europe";
      int duration = 1;
Variable declaration in Java

2. Note in the first line that there is a part that starts with // You can replace... This is example of a comment. The compiler ignores comments. Comments are what you add to a program to explain it to someone reading it. The compiler does not execute it.

//YOu can replace Kindson The Genius with your own name
Example of comment in Java

3. Note the use of + sign in the last four lines. This plus sign is called 'concatenation operation' (say in 5 times!). It is used to combine two variable together into a string.

      System.out.println("My Name is "+ name );
      System.out.println("I am a " + title );
      System.out.println("I live in " + location);
      System.out.println("I have stayed here for " + duration + " year");
Concatenation in Java

4. Also note that part of the statement to be printed is enclosed in double quotes. This is called string literal. The next part not enclosed in quotes is called variable (can be string variable or integer variable)

Try to digest this all that have been mentioned here and then Tutorial 4 would be out is couple of days.

Tutorial 1: Introduction to Java and NetBeans Installation
Tutorial 2: Write Your First Java Program in NetBeans

Tuesday, 30 October 2018

Top 10 Free Machine Learning Papers Every Student Researcher Must Read

I have made a list of this 10 research paper I believe very student and researcher in area of Artificial Intelligence and Machine learning must have.

You could learn about how the following is applied: Neural Network, Deep Learning, Convolutional Neural Network, Recurrent Neural Network, Learning algorithms and more

I have provided the links to download this papers for free:

I also found some really good papers that are not free and I'm trying to reach the authors to see if they could make it available to researchers based on some bargain. I'll let you know once it's done.

1. "Show and Tell: A Neural Image Caption Generator".  
In this publication, the authors create a model for image captioning using deep recurrent neural network architecture by applying computer vision and machine translation.
Download this paper

2. "Deep Residual Learning for Image Recognition"
This paper examines the benefits of residual networks which improves accuracy of prediction using increased depth.
Download this paper

3. "A Review of Deep Learning"
This paper is a comprehensive review of Deep Learning as well as application of deep learning is various fields such as image recognition and processing, speech recognition, video and text processing.
Download this paper

4. "Computer Vision Based Date Fruit Grading System: Design and Implementation"
This is a design and implementation research work for a prototype fruit grading system based on computer vision. The system performs feature extraction and then uses a classifier to grade the dates into three pre-defined classes.
Download this paper

5. "Improving Quality Inspection of Food Products by Computer Vision"
This Paper describes a system of adopting computer vision approach to the food industry. Image recognition is used to analyse the quality of different categories of food (bread, milk, pizza, chocolate etc) and assign quality ratings to them.
Download this paper

6. "Machine Vision System for Food Grain Quality Evaluation: A review"
The research proposes the use of machine vision based systems as a replacement for visual methods of inspection.
Download this paper

7. "Fast and Accurate Deep Neural Networks by Exponential Linear Units (ELU)"
This research paper highlights the adoption of "exponential linear unit" as a means of  improving the learning process of deep neural networks. According to the authors, exponential linear units provides better performance than rectified linear unit (RELU) in terms of learning rate and generalization performance.
Download this paper

8. "Application of Counterpropagation Networks"
This introduces a completely novel learning algorithm - counterpropagation as a better alternative the existing algorithms like backpropagation for neural networks.
Download this paper

9. "Exploring Strategies for Training Deep Neural Networks"
The paper focuses on experiments to analyze the performance of various training algorithms as well as relationship between the depth of the network and quality of the model.
Download this paper

10. "Deep Speech 2: End-to-End Speech Recognition in English and Mandarin"
This publication explores a method of recognizing natural language building a Neural Network based model for handling different variation of speech including noise-filtering as well as accent and language variations.
Download this paper

Disclaimer: This papers does not belong to me ( but it's provided by the owners for free. I simply provide links in this website( to the location of the publications and I bear no responsibility with respects to the use of this publications.

Saturday, 27 October 2018

How I Lost My Programming and Machine Learning Research Studio in Nigeria

I still cry when I remember what I lost in the in Nigeria couple of months before I relocated to Budapest.
It's a very long story but I would just tell you a summary of it.

  1. Activities Carried out in the Studio
  2. Studio Equipment
  3. How I Lost Everything
  4. The Aftermath

I started building this research studio by late 2016 in my apartment in Port Harcourt Nigeria, and completed it by early 2017 and I wish I could explain better how much I values this studio. And just as you know, it is a home studio. I actually demarcated the living room(because it has much space) into two parts and used one part for the studio

1. Activities Carried Out

Some of the activities carried out in this studio include:

  1. Training: Online training sessions are conducted for my subscribers and local students
  2. Mobile Application Development/Testing: I worked on a number of Mobile applications for android and IOS 
  3. Tech Video Production: Tutorial videos are produced in this studio for 'The Tech Pro' and 'Kindson The Genius' channel
  4. Research on Artificial Intelligence, Machine Learning, Deep Learning and other related topics
  5. Writing Tech blogs for
  6. Reading, studying etc.

2. Equipment in the Studio

  • Hp Server
  • Magnetic Board
  • IPhone for testing mobile apps
  • IPad for testing Mobile apps
  • Macbook for XCode Development
  • 3 Windows Laptops for .Net and Android Programming
  • Recording Equipment
  • Network Accessories
  • Monitors etc

3. How I Lost Everything

On the night of August 8, 2017, same day I came back from Abuja where I went to the Hungarian embassy for an interview on my visa application. It was a quite night just like every other night.

There were 5 of us at home. Jadon and Shola slept in the second bedroom, Ishuka was in the living room while I was in my bedroom.

What I could remember was a voice in my room (sounded like a dream) asking: "Where is the money?" Before I could raise my head from the bed, I felt the nose of the gun in my neck. So I clearly realized what is happening and simply followed instructions. Now I can't continue with any details.

At the end of about 20 mins when everywhere was calm, we all came out. That was when I realized that almost everything I labored for to build my studio are gone. Phones, tablet, cash, laptops etc

4. Aftermath

Went to the police and all that stuff, but no results. I simply have so auction and give away what was left of my vandalized studio/lab.

The worst part of it all was that I was so much demoralized and lost all motivation for learning and research and I could tell that even now I've not recovered from that night's ordeal. And neither have I recovered from all the valuables that was stolen that nigh. I wish I could still have my home lab again.