IGLib
1.5
The IGLib base library EXTENDED - with other lilbraries and applications.
|
A 1D neural network approximation demo control. More...
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. More... | |
Protected Attributes | |
INeuralApproximator | _neuralApproximator |
Properties | |
virtual INeuralApproximator | NeuralApproximator [get, set] |
![]() | |
INeuralApproximator | NeuralApproximator [get, set] |
Gets or sets th the neural approximator for the containing class. More... | |
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. More... | |
IRealFunction | createFunction1D () |
Creates a function loader and uses it for dynamic definition of functions. More... | |
void | EnableControls1D (bool enabled) |
void | InitializeApproximator1D () |
Clean the approximator. More... | |
void | GraphDimensions1D (SampledDataSet data1D) |
Prepare graph for 1 dimension. More... | |
void | PrepareTrainingPoints1D (bool randomPoints1D) |
Preparing training points. More... | |
void | WriteDefaultFunction1D () |
Write default Function for 1 dimension. More... | |
void | WriteTrainingPoints1D (SampledDataSet trainingData1D) |
Write training points for 1 dimension. More... | |
void | WriteApproxGraf1D () |
Write approximation line 1 dimension. More... | |
void | WriteErrors1D () |
Write training and verification errors in text box. More... | |
void | ClearDefaultGraph () |
Clear Graph with default function for 1 dimension. More... | |
void | ClearApproximationGraph () |
Clear Graph with approximative function for 1 dimension. More... | |
void | ClearTrainingGraph () |
Clear Graph with training points for 1 dimension. More... | |
void | ClearErrorGraph1D () |
Clear Graph with error convergence for 1 dimension. More... | |
void | ResetAll1D () |
void | btnReset1D_Click (object sender, EventArgs e) |
Reset button. More... | |
void | btStart1D_Click (object sender, EventArgs e) |
Start training button. More... | |
void | btStop1D_Click (object sender, EventArgs e) |
void | TrainNetworkThread1D () |
void | btnGenerateOptData1D_Click (object sender, EventArgs e) |
Generate training data button. More... | |
void | rbMaxTrainError_CheckedChanged (object sender, EventArgs e) |
Enable Maximum training error convergence to be written on graph. More... | |
void | rbRmsTrainError_CheckedChanged (object sender, EventArgs e) |
Enable Rms training error convergence to be written on graph. More... | |
void | rbMaxVerError_CheckedChanged (object sender, EventArgs e) |
Enable Maximum verification error convergence to be written on graph. More... | |
void | rbRmsVerError_CheckedChanged (object sender, EventArgs e) |
Enable Rms verification error convergence to be written on graph. More... | |
void | cbSelfMade1D_CheckedChanged (object sender, EventArgs e) |
Enable posibility to self made the equation. More... | |
void | cbRandomData1D_CheckedChanged (object sender, EventArgs e) |
Enable random training points. More... | |
void | cbEquation1D_SelectedIndexChanged (object sender, EventArgs e) |
Select equation from the list. More... | |
void | tbSelfMadeEquation1D_TextChanged (object sender, EventArgs e) |
Equation string. More... | |
void | numSamples1D_ValueChanged (object sender, EventArgs e) |
Number of training samples generated. More... | |
void | numLowXLimit1D_ValueChanged (object sender, EventArgs e) |
Lower limit for x-axes on the graph. More... | |
void | numHighXLimit1D_ValueChanged (object sender, EventArgs e) |
Higher limit for x-axes on the graph. More... | |
void | numMaxEpoch1D_ValueChanged (object sender, EventArgs e) |
Maximum number of epochs. More... | |
void | numEpochBundle1D_ValueChanged (object sender, EventArgs e) |
Number of epochs in bundle. More... | |
void | numRMS1D_ValueChanged (object sender, EventArgs e) |
Rms error limit. More... | |
void | numLearningRate1D_ValueChanged (object sender, EventArgs e) |
Learning rate. More... | |
void | numMomentum1D_ValueChanged (object sender, EventArgs e) |
Momentum. More... | |
void | numHiddenNeuron1D_ValueChanged (object sender, EventArgs e) |
Number of neurons in first hidden layer. More... | |
void | numHiddenNeuronL21D_ValueChanged (object sender, EventArgs e) |
Number of neurons in second hidden layer. More... | |
void | numInputSafety1D_ValueChanged (object sender, EventArgs e) |
Input safety factor. More... | |
void | numOutputSafety1D_ValueChanged (object sender, EventArgs e) |
Output safety factor. More... | |
void | backgroundWorker1D_DoWork (object sender, DoWorkEventArgs e) |
This event handler deals with the results of the background operation. More... | |
void | backgroundWorker1D_RunWorkerCompleted (object sender, RunWorkerCompletedEventArgs e) |
This event handler deals with the results of the background operation. More... | |
void | InitializeComponent () |
Required method for Designer support - do not modify the contents of this method with the code editor. More... | |
Private Attributes | |
GraphPane | pane1D |
Main Graph. More... | |
GraphPane | pane1DError |
Error Graph. More... | |
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. More... | |
LineItem | trainingPoints1D |
Training points line. More... | |
LineItem | approximatedLine1D |
Approximation line. More... | |
LineItem | errorConvergenceFunction1D |
NeuralNetworks | network1D |
ANN. More... | |
SampledDataSet | trainingData1D = null |
Training data. More... | |
SampledDataSet | verificationData1D = null |
Verification data. More... | |
SampledDataSet | defaultFunctionData1D = null |
Function data. More... | |
System.ComponentModel.IContainer | components = null |
Required designer variable. More... | |
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 |
A 1D neural network approximation demo control.
$A Tadej xx; Igor Feb13;
|
inline |
|
inlineprivate |
|
inlineprivate |
Calculate approximation response on verification points stored in approximator.
exactInputParameters1D | Exact input parameters from verification points. |
approximatedOutputValues1D | Approximated output values from verification points. |
References IG.Num.Vector.Length.
|
inlineprivate |
Creates a function loader and uses it for dynamic definition of functions.
References IG.Lib.RealFunctionLoader.CreateRealFunction(), IG.Lib.RealFunctionLoader.IndependentVariableName, IG.Lib.RealFunctionLoader.InvalidateDefinitions(), and IG.Lib.RealFunctionLoader.ValueDefinitionString.
|
inlinestatic |
|
inlineprivate |
|
inlineprivate |
Clean the approximator.
|
inlineprivate |
Prepare graph for 1 dimension.
data | Data set. |
References IG.Num.SampledDataSet.GetInputParameters(), IG.Num.SampledDataSet.GetOutputValues(), and IG.Num.SampledDataSet.Length.
|
inlineprivate |
Preparing training points.
|
inlineprivate |
Write default Function for 1 dimension.
|
inlineprivate |
Write training points for 1 dimension.
trainingData1D | Training data. |
References IG.Num.SampledDataSet.GetInputParameters(), IG.Num.SampledDataSet.GetOutputValues(), IG.Num.SampledDataSet.InputLength, IG.Num.SampledDataSet.Length, and IG.Num.SampledDataSet.OutputLength.
|
inlineprivate |
Write approximation line 1 dimension.
|
inlineprivate |
Write training and verification errors in text box.
|
inlineprivate |
Clear Graph with default function for 1 dimension.
|
inlineprivate |
Clear Graph with approximative function for 1 dimension.
|
inlineprivate |
Clear Graph with training points for 1 dimension.
|
inlineprivate |
Clear Graph with error convergence for 1 dimension.
|
inlineprivate |
|
inlineprivate |
Reset button.
|
inlineprivate |
Start training button.
References IG.Neural.NeuralNetworks.EpochBundle, IG.Neural.NeuralNetworks.HiddenNeuron1L, IG.Neural.NeuralNetworks.HiddenNeuron2L, IG.Neural.NeuralNetworks.InputSafetyFactor, IG.Neural.NeuralNetworks.LearningRate, IG.Neural.NeuralNetworks.MaxEpoch, IG.Neural.NeuralNetworks.Momentum, IG.Neural.NeuralNetworks.OutputSafetyFactor, and IG.Neural.NeuralNetworks.RMS.
|
inlineprivate |
References IG.Neural.NeuralNetworks.BreakTraining.
|
inlineprivate |
|
inlineprivate |
Generate training data button.
References IG.Neural.TestFunctions.GenerateFunctionTrainingSamples().
|
inlineprivate |
Enable Maximum training error convergence to be written on graph.
|
inlineprivate |
Enable Rms training error convergence to be written on graph.
|
inlineprivate |
Enable Maximum verification error convergence to be written on graph.
|
inlineprivate |
Enable Rms verification error convergence to be written on graph.
|
inlineprivate |
Enable posibility to self made the equation.
|
inlineprivate |
Enable random training points.
|
inlineprivate |
Select equation from the list.
|
inlineprivate |
Equation string.
|
inlineprivate |
Number of training samples generated.
|
inlineprivate |
Lower limit for x-axes on the graph.
|
inlineprivate |
Higher limit for x-axes on the graph.
|
inlineprivate |
Maximum number of epochs.
|
inlineprivate |
Number of epochs in bundle.
|
inlineprivate |
Rms error limit.
|
inlineprivate |
Learning rate.
|
inlineprivate |
Momentum.
|
inlineprivate |
Number of neurons in first hidden layer.
|
inlineprivate |
Number of neurons in second hidden layer.
|
inlineprivate |
Input safety factor.
|
inlineprivate |
Output safety factor.
|
inlineprivate |
This event handler deals with the results of the background operation.
References IG.Neural.NeuralNetworks.BreakTraining, IG.Lib.StopWatch.Start(), IG.Lib.StopWatch.Stop(), and IG.Neural.NeuralNetworks.TrainNetwork().
|
inlineprivate |
This event handler deals with the results of the background operation.
|
inlineprotected |
Clean up any resources being used.
disposing | true if managed resources should be disposed; otherwise, false. |
|
inlineprivate |
Required method for Designer support - do not modify the contents of this method with the code editor.
|
protected |
|
staticprivate |
|
staticprivate |
|
private |
Main Graph.
|
private |
Error Graph.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Default Function line.
|
private |
Training points line.
|
private |
Approximation line.
|
private |
|
private |
ANN.
|
private |
Training data.
|
private |
Verification data.
|
private |
Function data.
|
private |
Required designer variable.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
System.ComponentModel.BackgroundWorker IG.Neural.Forms.NeuralDemo1D.backgroundWorker1D |
|
getset |