Getting started

Before we get started, let me show you the product we are going to create. When we are done you will have an application that allows you to view graphically how a function minimizes or maximizes over iterations. This is contrary to the typical text-based representations of such systems, as follows:

3D Plot

As you can see, this is a very visual application. Let's go ahead and break this down into sections that we will refer to as we progress.

The first section is the three-dimensional plot and is located on our main page. Three dimensions can provide much more insight into the path that each particle in the swarm takes, and the swarm itself is taking. It is also much easier to see when a particle or the swarm converges on the global minimum. For this plot we will use the incredible Nevron chart control. You can find more information about this Chart control at https://www.nevron.com/products-open-vision-nov-chart-control-overview.aspx. The main user interface is developed with DotNetBar. For those looking for a different user interface with all the bells and whistles such as crumbbars, tabs, grids, listviews, charts, sparklines, and more, this is a great and more affordable choice than say Infragistics or DevExpress. You can find more information about this suite of controls at http://www.devcomponents.com/dotnetbar/

Main Page

The second section is the two-dimensional plot, and is located on our fourth page, the Charts tab. Some people would also call this type of plot a spaghetti plot. Its job is to plot the swarm on a two-dimensional plane. For this plot we will use the Microsoft Chart control. As you can see, this control becomes very busy when trying to plot on a two-dimensional surface. The more particles in the swarm that you have, the busier your chart will become:

2D Visualization

The third section is the information tree, and is located on our third page, the Details tab. This tree houses detailed information from each iteration. The total number of iterations is a hyperparameter we will discuss shortly. Each iteration will track all swarm particle information such as position, speed, best position, and fitness, as follows:

Information Tree

The fourth section is the function hyperparameters and is located on our main page. These parameters control the function and function optimizations and are essential for plotting both the two and three-dimensional plots. The individual parameters themselves will be discussed in a later section:

Parameters

The fifth section is the plot replay controls, also located on our main page at the bottom, underneath the hyperparameters. Aside from running the main function optimization iteration loop, they are responsible for replaying the function optimization plot for both the two and three-dimensional plots. You can play, pause, rewind, step forward, and step backward, as follows:

Run controls

With the details behind us, let's move on to discussing exactly how we are going to create our application. Let the fun begin!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset