13.   PredictorPoly63 Class Library
13.1   PredictorPoly63 Interface
13.2   Link to Class Library
13.3   Prediction Buttons
13.4   Test Run

13.   PredictorPoly63 Class Library

This chapter introduces the class library, Attrasoft.PolyApplet63.PredictorPoly63, which is the library for prediction using the PolyNet algorithm; the last chapter uses the Abm algorithm. In this chapter, we will build prediction software similar to Attrasoft Predictor 2.6, but using the PolyNet algorithm. The prediction operation includes two steps:

The only difference between this chapter and the last chapter is to change a few commands.

Figure 13.1   The PolyPredictor Form.

13.1   PredictorPoly63 Interface

The PredictorPoly63 class library implements the following interface:

 public interface I_PredictorPoly63
  bool openPredictorTrainFile ();
  bool openOutputFile ();

  bool predictorDecodePolyLinearInt ();
  bool predictorDecodePolyLinearReal ();

In addition, the class library has the following properties:

 I/O Files:

public string PredictorTrainName
public string OutputName
 Presentation Layer parameters:
public int Trend
public double Emptyfield
 Neural Layer parameters:
public int Sensitivity
public int Blurring
public int InternalWeightCut

13.2   Link to Class Library

The class library is:


The class in this library will be:


To include the class library in the project,

In the Solution Explorer, right click References and select Add Reference;
Browse to find �PredictorPoly63.dll� in c:\polyapplet63\;
Highlight it and click the �OK� button.

To use the class library, add:

using Attrasoft.PolyApplet63.PredictorPoly63;

To declare an object, add:

public Attrasoft.PolyApplet63.PredictorPoly63.PredictorPoly63 z
= new Attrasoft.PolyApplet63.PredictorPoly63.PredictorPoly63 (richTextBox1);

Now PredictorPoly63 object, z, is ready to use.

13.3   Prediction Buttons

There are 2 commands in Figure 13.1; each button will simply use one of the 2 commands:

 private void button7_Click(object sender, System.EventArgs e)
   z.predictorDecodePolyLinearInt ();

 private void button8_Click(object sender, System.EventArgs e)
   z.predictorDecodePolyLinearReal ();

13.4   Test Run

Step 1. Files. (done automatically in the chapter project).

Enter the five data file in the following:

Input:   D_math1a.txt:
Train:   example1a.txt
Recognition:  example1c.txt
Neural Output: example1d.txt
Output:  example2c.txt

Step 2. Neural Prediction.

Click the �Int Linear� button to complete the prediction.

Step 3. Using Real Numbers.

Click the �Real Linear� button to complete the prediction.

We should see the same results as in chapter 9.