NeurApp 1.1
NeurApp - software for exploring approximation by artificial neural networks on functions of one or two variables.

IG::Neural::Forms::NeuralDemo1D Class Reference

A 1D neural network approximation demo control. More...

Inheritance diagram for IG::Neural::Forms::NeuralDemo1D:
Collaboration diagram for IG::Neural::Forms::NeuralDemo1D:

List of all members.

Public Member Functions

 NeuralDemo1D ()

Static Public Member Functions

static ColorScale CreateGreenRedYellow (double minValue, double maxValue)

Public Attributes

System.ComponentModel.BackgroundWorker backgroundWorker1D

Protected Member Functions

override void Dispose (bool disposing)
 Clean up any resources being used.

Protected Attributes

INeuralApproximator _neuralApproximator

Properties

virtual INeuralApproximator NeuralApproximator [get, set]
 Gets or sets th the neural approximator for the containing class.

Private Member Functions

void LoadForm (object sender, EventArgs e)
void PredictFromApproximator (ref IVector[] exactInputParameters1D, ref IVector[] approximatedOutputValues1D)
 Calculate approximation response on verification points stored in approximator.
IRealFunction createFunction1D ()
 Creates a function loader and uses it for dynamic definition of functions.
void EnableControls1D (bool enabled)
void InitializeApproximator1D ()
 Clean the approximator.
void GraphDimensions1D (SampledDataSet data1D)
 Prepare graph for 1 dimension.
void PrepareTrainingPoints1D (bool randomPoints1D)
 Preparing training points.
void WriteDefaultFunction1D ()
 Write default Function for 1 dimension.
void WriteTrainingPoints1D (SampledDataSet trainingData1D)
 Write training points for 1 dimension.
void WriteApproxGraf1D ()
 Write approximation line 1 dimension.
void WriteErrors1D ()
 Write training and verification errors in text box.
void ClearDefaultGraph ()
 Clear Graph with default function for 1 dimension.
void ClearApproximationGraph ()
 Clear Graph with approximative function for 1 dimension.
void ClearTrainingGraph ()
 Clear Graph with training points for 1 dimension.
void ClearErrorGraph1D ()
 Clear Graph with error convergence for 1 dimension.
void ResetAll1D ()
void btnReset1D_Click (object sender, EventArgs e)
 Reset button.
void btStart1D_Click (object sender, EventArgs e)
 Start training button.
void btStop1D_Click (object sender, EventArgs e)
void TrainNetworkThread1D ()
void btnGenerateOptData1D_Click (object sender, EventArgs e)
 Generate training data button.
void rbMaxTrainError_CheckedChanged (object sender, EventArgs e)
 Enable Maximum training error convergence to be written on graph.
void rbRmsTrainError_CheckedChanged (object sender, EventArgs e)
 Enable Rms training error convergence to be written on graph.
void rbMaxVerError_CheckedChanged (object sender, EventArgs e)
 Enable Maximum verification error convergence to be written on graph.
void rbRmsVerError_CheckedChanged (object sender, EventArgs e)
 Enable Rms verification error convergence to be written on graph.
void cbSelfMade1D_CheckedChanged (object sender, EventArgs e)
 Enable posibility to self made the equation.
void cbRandomData1D_CheckedChanged (object sender, EventArgs e)
 Enable random training points.
void cbEquation1D_SelectedIndexChanged (object sender, EventArgs e)
 Select equation from the list.
void tbSelfMadeEquation1D_TextChanged (object sender, EventArgs e)
 Equation string.
void numSamples1D_ValueChanged (object sender, EventArgs e)
 Number of training samples generated.
void numLowXLimit1D_ValueChanged (object sender, EventArgs e)
 Lower limit for x-axes on the graph.
void numHighXLimit1D_ValueChanged (object sender, EventArgs e)
 Higher limit for x-axes on the graph.
void numMaxEpoch1D_ValueChanged (object sender, EventArgs e)
 Maximum number of epochs.
void numEpochBundle1D_ValueChanged (object sender, EventArgs e)
 Number of epochs in bundle.
void numRMS1D_ValueChanged (object sender, EventArgs e)
 Rms error limit.
void numLearningRate1D_ValueChanged (object sender, EventArgs e)
 Learning rate.
void numMomentum1D_ValueChanged (object sender, EventArgs e)
 Momentum.
void numHiddenNeuron1D_ValueChanged (object sender, EventArgs e)
 Number of neurons in first hidden layer.
void numHiddenNeuronL21D_ValueChanged (object sender, EventArgs e)
 Number of neurons in second hidden layer.
void numInputSafety1D_ValueChanged (object sender, EventArgs e)
 Input safety factor.
void numOutputSafety1D_ValueChanged (object sender, EventArgs e)
 Output safety factor.
void backgroundWorker1D_DoWork (object sender, DoWorkEventArgs e)
 This event handler deals with the results of the background operation.
void backgroundWorker1D_RunWorkerCompleted (object sender, RunWorkerCompletedEventArgs e)
 This event handler deals with the results of the background operation.
void InitializeComponent ()
 Required method for Designer support - do not modify the contents of this method with the code editor.

Private Attributes

GraphPane pane1D
 Main Graph.
GraphPane pane1DError
 Error Graph.
int hiddenNeuronL11D = 5
int hiddenNeuronL21D = 0
int maxEpoch1D = 5000
int epochInBundle1D = 500
double rmsError1D = 0.001
double learningRate1D = 0.3
double momentum1D = 0.6
int samples1D = 6
double lowHorizontalLimit1D = -5.0
double highHorizontalLimit1D = 5.0
double lowVerificationHorizontalLimit1D = -5.0
double highVerificationHorizontalLimit1D = 5.0
double inputSafetyFactor1D = 1.3
double outputSafetyFactor1D = 1.3
int thread1D = 0
string equation1D = "x*x"
bool maxTrainErrorEnabled1D = true
bool rmsTrainErrorEnabled1D = false
bool maxVerErrorEnabled1D = false
bool rmsVerErrorEnabled1D = false
bool stopTraining1D = false
LineItem defaultFunction1D
 Default Function line.
LineItem trainingPoints1D
 Training points line.
LineItem approximatedLine1D
 Approximation line.
LineItem errorConvergenceFunction1D
NeuralNetworks network1D
 ANN.
SampledDataSet trainingData1D = null
 Training data.
SampledDataSet verificationData1D = null
 Verification data.
SampledDataSet defaultFunctionData1D = null
 Function data.
System.ComponentModel.IContainer components = null
 Required designer variable.
System.Windows.Forms.RadioButton rbRmsTrainError
System.Windows.Forms.RadioButton rbMaxTrainError
System.Windows.Forms.RadioButton rbRmsVerError
System.Windows.Forms.RadioButton rbMaxVerError
System.Windows.Forms.NumericUpDown numHiddenNeuronL21D
System.Windows.Forms.TextBox tbEquationError1D
System.Windows.Forms.Button btLoadANN1D
System.Windows.Forms.Button btSaveANN1D
System.Windows.Forms.TextBox tbRmsTrainError1D
System.Windows.Forms.Label label12
System.Windows.Forms.Label label13
System.Windows.Forms.TextBox tbMaxTrainError1D
System.Windows.Forms.TextBox tbRmsVerError1D
System.Windows.Forms.TextBox tbMaxVerError1D
System.Windows.Forms.Label label2
System.Windows.Forms.Label label1
ZedGraph.ZedGraphControl errorConvergence1D
System.Windows.Forms.Button btnReset1D
System.Windows.Forms.Button btStart1D
System.Windows.Forms.NumericUpDown numOutputSafety1D
System.Windows.Forms.Label label16
System.Windows.Forms.NumericUpDown numInputSafety1D
System.Windows.Forms.Label label15
System.Windows.Forms.NumericUpDown numHiddenNeuron1D
System.Windows.Forms.Label label11
System.Windows.Forms.NumericUpDown numMomentum1D
System.Windows.Forms.NumericUpDown numLearningRate1D
System.Windows.Forms.NumericUpDown numRMS1D
System.Windows.Forms.NumericUpDown numEpochBundle1D
System.Windows.Forms.NumericUpDown numMaxEpoch1D
System.Windows.Forms.Label label8
System.Windows.Forms.Label label7
System.Windows.Forms.Label label6
System.Windows.Forms.Label label5
System.Windows.Forms.Label label4
System.Windows.Forms.CheckBox cbRandomData1D
System.Windows.Forms.Button btnGenerateOptData1D
System.Windows.Forms.NumericUpDown numHighXLimit1D
System.Windows.Forms.NumericUpDown numLowXLimit1D
System.Windows.Forms.NumericUpDown numSamples1D
System.Windows.Forms.Label label9
System.Windows.Forms.TextBox tbSelfMadeEquation1D
System.Windows.Forms.ComboBox cbEquation1D
System.Windows.Forms.Label label19
System.Windows.Forms.CheckBox cbSelfMade1D
System.Windows.Forms.Button btLoad1D
ZedGraph.ZedGraphControl functionGraph
System.Windows.Forms.GroupBox groupBox5
System.Windows.Forms.GroupBox groupBox6
System.Windows.Forms.Button btStop1D
System.Windows.Forms.GroupBox groupBox7
System.Windows.Forms.GroupBox groupBox9

Static Private Attributes

static readonly Color enabledColor1D = Color.Tomato
static readonly Color disabledColor1D = Color.Goldenrod

Detailed Description

A 1D neural network approximation demo control.

$A Tadej xx; Igor Feb13;


Constructor & Destructor Documentation

IG::Neural::Forms::NeuralDemo1D::NeuralDemo1D ( ) [inline]

Member Function Documentation

void IG::Neural::Forms::NeuralDemo1D::LoadForm ( object  sender,
EventArgs  e 
) [inline, private]
void IG::Neural::Forms::NeuralDemo1D::PredictFromApproximator ( ref IVector[]  exactInputParameters1D,
ref IVector[]  approximatedOutputValues1D 
) [inline, private]

Calculate approximation response on verification points stored in approximator.

Parameters:
exactInputParameters1DExact input parameters from verification points.
approximatedOutputValues1DApproximated output values from verification points.
IRealFunction IG::Neural::Forms::NeuralDemo1D::createFunction1D ( ) [inline, private]

Creates a function loader and uses it for dynamic definition of functions.

static ColorScale IG::Neural::Forms::NeuralDemo1D::CreateGreenRedYellow ( double  minValue,
double  maxValue 
) [inline, static]
void IG::Neural::Forms::NeuralDemo1D::EnableControls1D ( bool  enabled) [inline, private]
void IG::Neural::Forms::NeuralDemo1D::InitializeApproximator1D ( ) [inline, private]

Clean the approximator.

void IG::Neural::Forms::NeuralDemo1D::GraphDimensions1D ( SampledDataSet  data1D) [inline, private]

Prepare graph for 1 dimension.

Parameters:
dataData set.
void IG::Neural::Forms::NeuralDemo1D::PrepareTrainingPoints1D ( bool  randomPoints1D) [inline, private]

Preparing training points.

void IG::Neural::Forms::NeuralDemo1D::WriteDefaultFunction1D ( ) [inline, private]

Write default Function for 1 dimension.

void IG::Neural::Forms::NeuralDemo1D::WriteTrainingPoints1D ( SampledDataSet  trainingData1D) [inline, private]

Write training points for 1 dimension.

Parameters:
trainingData1DTraining data.
void IG::Neural::Forms::NeuralDemo1D::WriteApproxGraf1D ( ) [inline, private]

Write approximation line 1 dimension.

void IG::Neural::Forms::NeuralDemo1D::WriteErrors1D ( ) [inline, private]

Write training and verification errors in text box.

void IG::Neural::Forms::NeuralDemo1D::ClearDefaultGraph ( ) [inline, private]

Clear Graph with default function for 1 dimension.

void IG::Neural::Forms::NeuralDemo1D::ClearApproximationGraph ( ) [inline, private]

Clear Graph with approximative function for 1 dimension.

void IG::Neural::Forms::NeuralDemo1D::ClearTrainingGraph ( ) [inline, private]

Clear Graph with training points for 1 dimension.

void IG::Neural::Forms::NeuralDemo1D::ClearErrorGraph1D ( ) [inline, private]

Clear Graph with error convergence for 1 dimension.

void IG::Neural::Forms::NeuralDemo1D::ResetAll1D ( ) [inline, private]
void IG::Neural::Forms::NeuralDemo1D::btnReset1D_Click ( object  sender,
EventArgs  e 
) [inline, private]

Reset button.

void IG::Neural::Forms::NeuralDemo1D::btStart1D_Click ( object  sender,
EventArgs  e 
) [inline, private]

Start training button.

void IG::Neural::Forms::NeuralDemo1D::btStop1D_Click ( object  sender,
EventArgs  e 
) [inline, private]
void IG::Neural::Forms::NeuralDemo1D::TrainNetworkThread1D ( ) [inline, private]
void IG::Neural::Forms::NeuralDemo1D::btnGenerateOptData1D_Click ( object  sender,
EventArgs  e 
) [inline, private]

Generate training data button.

void IG::Neural::Forms::NeuralDemo1D::rbMaxTrainError_CheckedChanged ( object  sender,
EventArgs  e 
) [inline, private]

Enable Maximum training error convergence to be written on graph.

void IG::Neural::Forms::NeuralDemo1D::rbRmsTrainError_CheckedChanged ( object  sender,
EventArgs  e 
) [inline, private]

Enable Rms training error convergence to be written on graph.

void IG::Neural::Forms::NeuralDemo1D::rbMaxVerError_CheckedChanged ( object  sender,
EventArgs  e 
) [inline, private]

Enable Maximum verification error convergence to be written on graph.

void IG::Neural::Forms::NeuralDemo1D::rbRmsVerError_CheckedChanged ( object  sender,
EventArgs  e 
) [inline, private]

Enable Rms verification error convergence to be written on graph.

void IG::Neural::Forms::NeuralDemo1D::cbSelfMade1D_CheckedChanged ( object  sender,
EventArgs  e 
) [inline, private]

Enable posibility to self made the equation.

void IG::Neural::Forms::NeuralDemo1D::cbRandomData1D_CheckedChanged ( object  sender,
EventArgs  e 
) [inline, private]

Enable random training points.

void IG::Neural::Forms::NeuralDemo1D::cbEquation1D_SelectedIndexChanged ( object  sender,
EventArgs  e 
) [inline, private]

Select equation from the list.

void IG::Neural::Forms::NeuralDemo1D::tbSelfMadeEquation1D_TextChanged ( object  sender,
EventArgs  e 
) [inline, private]

Equation string.

void IG::Neural::Forms::NeuralDemo1D::numSamples1D_ValueChanged ( object  sender,
EventArgs  e 
) [inline, private]

Number of training samples generated.

void IG::Neural::Forms::NeuralDemo1D::numLowXLimit1D_ValueChanged ( object  sender,
EventArgs  e 
) [inline, private]

Lower limit for x-axes on the graph.

void IG::Neural::Forms::NeuralDemo1D::numHighXLimit1D_ValueChanged ( object  sender,
EventArgs  e 
) [inline, private]

Higher limit for x-axes on the graph.

void IG::Neural::Forms::NeuralDemo1D::numMaxEpoch1D_ValueChanged ( object  sender,
EventArgs  e 
) [inline, private]

Maximum number of epochs.

void IG::Neural::Forms::NeuralDemo1D::numEpochBundle1D_ValueChanged ( object  sender,
EventArgs  e 
) [inline, private]

Number of epochs in bundle.

void IG::Neural::Forms::NeuralDemo1D::numRMS1D_ValueChanged ( object  sender,
EventArgs  e 
) [inline, private]

Rms error limit.

void IG::Neural::Forms::NeuralDemo1D::numLearningRate1D_ValueChanged ( object  sender,
EventArgs  e 
) [inline, private]

Learning rate.

void IG::Neural::Forms::NeuralDemo1D::numMomentum1D_ValueChanged ( object  sender,
EventArgs  e 
) [inline, private]

Momentum.

void IG::Neural::Forms::NeuralDemo1D::numHiddenNeuron1D_ValueChanged ( object  sender,
EventArgs  e 
) [inline, private]

Number of neurons in first hidden layer.

void IG::Neural::Forms::NeuralDemo1D::numHiddenNeuronL21D_ValueChanged ( object  sender,
EventArgs  e 
) [inline, private]

Number of neurons in second hidden layer.

void IG::Neural::Forms::NeuralDemo1D::numInputSafety1D_ValueChanged ( object  sender,
EventArgs  e 
) [inline, private]

Input safety factor.

void IG::Neural::Forms::NeuralDemo1D::numOutputSafety1D_ValueChanged ( object  sender,
EventArgs  e 
) [inline, private]

Output safety factor.

void IG::Neural::Forms::NeuralDemo1D::backgroundWorker1D_DoWork ( object  sender,
DoWorkEventArgs  e 
) [inline, private]

This event handler deals with the results of the background operation.

void IG::Neural::Forms::NeuralDemo1D::backgroundWorker1D_RunWorkerCompleted ( object  sender,
RunWorkerCompletedEventArgs  e 
) [inline, private]

This event handler deals with the results of the background operation.

override void IG::Neural::Forms::NeuralDemo1D::Dispose ( bool  disposing) [inline, protected]

Clean up any resources being used.

Parameters:
disposingtrue if managed resources should be disposed; otherwise, false.
void IG::Neural::Forms::NeuralDemo1D::InitializeComponent ( ) [inline, private]

Required method for Designer support - do not modify the contents of this method with the code editor.


Member Data Documentation

readonly Color IG::Neural::Forms::NeuralDemo1D::enabledColor1D = Color.Tomato [static, private]
readonly Color IG::Neural::Forms::NeuralDemo1D::disabledColor1D = Color.Goldenrod [static, private]

Main Graph.

Error Graph.

Default Function line.

Training points line.

Approximation line.

SampledDataSet IG::Neural::Forms::NeuralDemo1D::trainingData1D = null [private]

Training data.

SampledDataSet IG::Neural::Forms::NeuralDemo1D::verificationData1D = null [private]

Verification data.

Function data.

System.ComponentModel.IContainer IG::Neural::Forms::NeuralDemo1D::components = null [private]

Required designer variable.

System.Windows.Forms.RadioButton IG::Neural::Forms::NeuralDemo1D::rbRmsTrainError [private]
System.Windows.Forms.RadioButton IG::Neural::Forms::NeuralDemo1D::rbMaxTrainError [private]
System.Windows.Forms.RadioButton IG::Neural::Forms::NeuralDemo1D::rbRmsVerError [private]
System.Windows.Forms.RadioButton IG::Neural::Forms::NeuralDemo1D::rbMaxVerError [private]
System.Windows.Forms.NumericUpDown IG::Neural::Forms::NeuralDemo1D::numHiddenNeuronL21D [private]
System.Windows.Forms.TextBox IG::Neural::Forms::NeuralDemo1D::tbEquationError1D [private]
System.Windows.Forms.Button IG::Neural::Forms::NeuralDemo1D::btLoadANN1D [private]
System.Windows.Forms.Button IG::Neural::Forms::NeuralDemo1D::btSaveANN1D [private]
System.Windows.Forms.TextBox IG::Neural::Forms::NeuralDemo1D::tbRmsTrainError1D [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label12 [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label13 [private]
System.Windows.Forms.TextBox IG::Neural::Forms::NeuralDemo1D::tbMaxTrainError1D [private]
System.Windows.Forms.TextBox IG::Neural::Forms::NeuralDemo1D::tbRmsVerError1D [private]
System.Windows.Forms.TextBox IG::Neural::Forms::NeuralDemo1D::tbMaxVerError1D [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label2 [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label1 [private]
ZedGraph.ZedGraphControl IG::Neural::Forms::NeuralDemo1D::errorConvergence1D [private]
System.Windows.Forms.Button IG::Neural::Forms::NeuralDemo1D::btnReset1D [private]
System.Windows.Forms.Button IG::Neural::Forms::NeuralDemo1D::btStart1D [private]
System.Windows.Forms.NumericUpDown IG::Neural::Forms::NeuralDemo1D::numOutputSafety1D [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label16 [private]
System.Windows.Forms.NumericUpDown IG::Neural::Forms::NeuralDemo1D::numInputSafety1D [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label15 [private]
System.Windows.Forms.NumericUpDown IG::Neural::Forms::NeuralDemo1D::numHiddenNeuron1D [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label11 [private]
System.Windows.Forms.NumericUpDown IG::Neural::Forms::NeuralDemo1D::numMomentum1D [private]
System.Windows.Forms.NumericUpDown IG::Neural::Forms::NeuralDemo1D::numLearningRate1D [private]
System.Windows.Forms.NumericUpDown IG::Neural::Forms::NeuralDemo1D::numRMS1D [private]
System.Windows.Forms.NumericUpDown IG::Neural::Forms::NeuralDemo1D::numEpochBundle1D [private]
System.Windows.Forms.NumericUpDown IG::Neural::Forms::NeuralDemo1D::numMaxEpoch1D [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label8 [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label7 [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label6 [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label5 [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label4 [private]
System.Windows.Forms.CheckBox IG::Neural::Forms::NeuralDemo1D::cbRandomData1D [private]
System.Windows.Forms.Button IG::Neural::Forms::NeuralDemo1D::btnGenerateOptData1D [private]
System.Windows.Forms.NumericUpDown IG::Neural::Forms::NeuralDemo1D::numHighXLimit1D [private]
System.Windows.Forms.NumericUpDown IG::Neural::Forms::NeuralDemo1D::numLowXLimit1D [private]
System.Windows.Forms.NumericUpDown IG::Neural::Forms::NeuralDemo1D::numSamples1D [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label9 [private]
System.Windows.Forms.TextBox IG::Neural::Forms::NeuralDemo1D::tbSelfMadeEquation1D [private]
System.Windows.Forms.ComboBox IG::Neural::Forms::NeuralDemo1D::cbEquation1D [private]
System.Windows.Forms.Label IG::Neural::Forms::NeuralDemo1D::label19 [private]
System.Windows.Forms.CheckBox IG::Neural::Forms::NeuralDemo1D::cbSelfMade1D [private]
System.Windows.Forms.Button IG::Neural::Forms::NeuralDemo1D::btLoad1D [private]
ZedGraph.ZedGraphControl IG::Neural::Forms::NeuralDemo1D::functionGraph [private]
System.Windows.Forms.GroupBox IG::Neural::Forms::NeuralDemo1D::groupBox5 [private]
System.Windows.Forms.GroupBox IG::Neural::Forms::NeuralDemo1D::groupBox6 [private]
System.Windows.Forms.Button IG::Neural::Forms::NeuralDemo1D::btStop1D [private]
System.Windows.Forms.GroupBox IG::Neural::Forms::NeuralDemo1D::groupBox7 [private]
System.Windows.Forms.GroupBox IG::Neural::Forms::NeuralDemo1D::groupBox9 [private]
System.ComponentModel.BackgroundWorker IG::Neural::Forms::NeuralDemo1D::backgroundWorker1D

Property Documentation

virtual INeuralApproximator IG::Neural::Forms::NeuralDemo1D::NeuralApproximator [get, set]

Gets or sets th the neural approximator for the containing class.

Implements IG::Neural::INeuralApproximatorContainer.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Properties