Sum-of-products and product-of-sums expressions are
alright as solutions to Boolean problems, but most of the times they
are far from parsimonious solutions. On the other hand, limiting
oneself to the use of just AND-OR-NOT might not be the right
approach to finding good solutions to more complex problems. With
GeneXproTools you can use an extremely wide spectrum of logical
functions (a total of 258 built-in functions plus all kinds
of user defined functions) to design your logic circuits.
And, for instance, if you are just interested in NAND-only or
NOR-only circuits, you might try and find a solution to your problem
using just this particular function instead of applying De Morgan's
theorem to your sum-of-products solutions to design your circuits,
as most of the times a more parsimonious expression can be found.
And if you are interested in less conventional circuits, say a
MUX-only circuit or a AND-XOR-NOT circuit, GeneXproTools has no
problems working with just these functions to build your circuits.
Below are briefly introduced the most important tools you have at
your disposal in GeneXproTools:
Data Screening Engine
GeneXproTools
accepts two different data formats: the standard Samples x
Variables format where samples are in rows and variables in
columns, with the function output occupying the
rightmost position (this format corresponds obviously to the
standard truth table used in logic); and Gene Expression Matrixes commonly used
in DNA microarray studies where samples are in columns and
variables in rows, with the function output occupying the topmost position. Note,
however, that GeneXproTools uses
the Samples x
Variables format and therefore all formats are automatically
converted and shown in this format.
The data screening engine of GeneXproTools 4.0 checks the validity of all the data sets used both in the creation and testing of the model.
The data screening engine is operative every time you load data sets
either for training or testing. Only the values of False and True
(case insensitive) or "0" and "1" are valid as
input. Note,
however, that GeneXproTools uses 0's and 1's internally and,
therefore, False and True are respectively converted into
"0" and "1" and shown in this format. Missing or
invalid values can be detected by the data screening engine so that
you can identify these faulty samples and correct them.
Data Visualization Tool
The data visualization tool of GeneXproTools 4.0 enables you to analyze the distribution of all the inputs and to spot simple relationships between the independent variables and the dependent variable.
The visualization of both the distribution and relationships between variables is a valuable modeling tool as it can help you detect simple relationships between your variables that can be used to evolve more efficient models.
Built-in Fitness Functions
GeneXproTools 4.0 offers 30 built-in fitness functions based on well-known statistical functions.
Fitness functions are fundamental modeling tools for they determine the nature of the search landscape. And different fitness functions open and explore different paths in the solution space. The
30 built-in fitness functions of
GeneXproTools 4.0 are named as follows: Number of Hits,
Hits with Penalty, Accuracy,
Squared Accuracy, Sensitivity/Specificity,
PPV/NPV, SSPN,
MSE, RMSE,
MAE, RSE,
RRSE, RAE,
R-square, and Correlation Coefficient.
Furthermore, all these fitness functions have their own counterpart
with parsimony pressure.
User Defined Fitness Functions
Despite the wide set of GeneXproTools built-in fitness functions, some users sometimes want to experiment with fitness functions of their own.
GeneXproTools 4.0 gives the user the possibility of creating custom tailored fitness functions and evolve models with them.
The code for the custom fitness function must be in JavaScript and is written in the Custom Fitness Function window and can be tested before evolving a model with it.
Built-in Logical Functions
GeneXproTools 4.0 offers a total of 258 built-in
logical functions, including
all the Boolean functions with one and two inputs, 92 functions with
three inputs, and 146 functions with four inputs. This wide set of
logical functions opens new doors to the creation of new logical
circuits that might then be automatically redesigned using certain
kinds of gates (All Gates, Not-And-Or Only, Nand Only, Nor Only, Mux System, Reed-Muller System).
Sum-of-products and product-of-sums expressions are alright as solutions to Boolean problems, but most of the times they are far from parsimonious solutions. On the other hand, limiting oneself to the use of just AND-OR-NOT might not be the right approach to finding good solutions to more complex
problems or you might just be interested in a different kind of
circuit. The broad palette of GeneXproTools functions offers you
unlimited possibilities in terms of design. For instance, if you are just interested in NAND-only or NOR-only circuits, you might try and find a solution to your problem using just this particular function instead of applying De Morgan's theorem to your sum-of-products solutions to design your circuits, as most of the times a more parsimonious expression can be
found if the circuit is built from scratch using these gates. And if you are interested in less conventional circuits, say a MUX-only circuit or a AND-XOR-NOT circuit, GeneXproTools has no problems working with just these functions to build your circuits.
Built-in Logical Systems
GeneXproTools 4.0 allows you to design logic circuits using a
total of 258 built-in
logical functions,
which are the logical functions at the disposal of GeneXproTools
learning algorithms and also part of the basic Boolean grammar of
all built-in grammars (Ada, C, C++, C#, Fortran, Java, Java Script, Matlab, Pascal, Perl, PHP, Python, Visual Basic, VB.Net,
Verilog, and VHDL). But it also allows you to redesign immediately
the generated circuits using six different kinds of logical systems
(All Gates, Not-And-Or Only, Nand Only, Nor Only, Mux System,
and Reed-Muller System).
Function Selection Tool
For some problems, the basic Boolean operators AND-OR-NOT are more than
enough to create elegant and efficient solutions. But for
other problems more complex functions are necessary to create good
models and when inside knowledge of the problem at hand is not
producing the expected results, it might be interesting to
experiment with different combinations of functions. The Function
Selection Tool of GeneXproTools 4.0 helps you to experiment with
different function sets very quickly either by pressing the Random
button in the Functions Panel or by selecting certain sub-sets of
functions.
In addition, although you can always handcraft your function set so
that it is well-balanced relatively to the number of independent
variables in your data, in GeneXproTools 4.0 this is no longer
essential as GeneXproTools balances automatically all function sets.
This is particularly important for high-dimensional datasets, say
more than 20 variables.
Dynamic User Defined Functions (DDFs)
Despite the wide set of GeneXproTools built-in
logical functions,
some users sometimes want to model with different functions.
GeneXproTools 4.0 gives the user the possibility of creating custom tailored functions and evolve models with them.
So, if the 92 functions with three inputs plus the 146 functions with four inputs
of
GeneXproTools are not enough for you, you can implement all the
remaining functions of three and four inputs as DDFs and work with
them as building blocks. A note of
caution though: the use of DDFs slows considerably the evolutionary process and therefore should be used with moderation.
The code for the DDFs must be in JavaScript and is written in the Edit DDF window (in the Functions Panel, select the Functions Tab and then click Add in the Dynamic UDFs tool box).
Static User Defined Functions (UDFs)
Sometimes it is fundamental to use complex building blocks to
build even more complex ones, and
GeneXproTools 4.0 allows you to design your own basic building
blocks (UDFs). These building blocks might represent any kind of
logical expression (not just functions of 1-4 arguments) and are
therefore ideal to design complex models composed of several simpler
components.
The code for the UDFs must be in JavaScript and is written in the Edit UDF window (in the Functions Panel, select the Static UDFs Tab and then click Add in the Static UDFs tool box).
Learning Algorithms
GeneXproTools 4.0 is equipped with two different learning
algorithms for evolving
logic circuits.
The first is the fastest and simplest of the two. And because it is also the most efficient, this algorithm is the default in
GeneXproTools 4.0. The second algorithm is very similar to the first, with the difference that it gives the user the possibility of
sprinkling "0" and "1" to help in the design.
In order to evolve models using the second algorithm, select Numerical Constants in the Settings Panel and then check the box that activates this algorithm. You will notice that additional parameters become available, including a small set of genetic operators especially developed for handling numerical constants (if you are not familiar with these operators, please use the default values for they work very well in all cases).
To use the first algorithm, just uncheck the Use Random Numerical
Constants box.
Monitoring the
Modeling Process
GeneXproTools 4.0 allows you to monitor the modeling
process by showing the essential parameters of a run during the discovery process, including the
fitness,
classification accuracy,
and confusion matrix (true positives, true negatives, false positives, and false negatives) of the best-of-generation model.
Furthermore, GeneXproTools allows you to visualize the modeling
process by plotting the essential features of a run during the discovery
process. In the Run
Panel, a total of eight different charts are
shown:
- The Variables Usage map.
This map shows not only the variables that are being used by the
best-of-generation models but also their weight. Not only after
a run but also during evolution, by placing the cursor over each
square you can access the variable ID and the number of times it
appears in the current model. And by clicking the right button
of your mouse, you can also change its appearance: Heat Map,
Random Colors, or Monochromatic.
- The Evolutionary Dynamics chart.
This chart shows
the average fitness of the population plus the fitness and accuracy of the best-of-generation model.
- The Average/Best Size chart.
This chart shows
the average program size of the population versus the program size of the best-of-generation model.
This chart is especially useful during simplification
and can be activated any time during evolution by selecting Avg/Best
Size in the rightmost combo box in the bottom.
- The Target/Model chart.
This chart plots the first 50 data points of the training set
and shows how well the evolving models are fitting the target.
The Target/Model chart can be activated any time during
evolution by selecting Target/Model in the rightmost combo box
in the bottom.
- The Sub-Program Sizes chart.
This chart shows
the sizes of all the sub-programs in the best-of-generation model.
Not only after a run but also during evolution, by placing the
cursor over each bar you can access the size of all sub-programs
in your model. The Sub-Program Sizes chart can be activated any
time during evolution by selecting Sub-Program Sizes in the
leftmost combo box in the bottom.
- The All Sizes chart.
This chart shows
the sizes of all the models in the population. Not only after a run
but also during evolution, by placing the cursor over each bar
you can access the size of a particular model; the
best-of-generation model always occupies the first position so
you can also easily see how it fares relatively to the others.
The All Sizes chart can be activated any time during evolution
by selecting All Sizes in the leftmost combo box in the bottom.
- The All Fitnesses chart.
This chart shows
the fitnesses of all the models in the population. Not only after a
run but also during evolution, by placing the cursor over each
bar you can access the fitness of a particular model; the
best-of-generation model always occupies the first position so
you can also easily see how it fares relatively to the others.
The All Fitnesses chart can be activated any time during
evolution by selecting All Fitnesses in the leftmost combo box
in the bottom.
- The Program Size chart.
This chart shows
the size of the best-of-generation model. Not only after a run but
also during evolution, by placing the cursor over the horizontal
bar you can access the size of the best model.
The evolutionary process can be stopped whenever you are satisfied with the results by pressing the Stop button or you can use one of the stop criteria of
GeneXproTools for picking up your model exactly as you want it.
When the evolutionary process stops, the best-of-run model is ready either for analysis or scoring. And if you are still not happy with the results, you can still try to fine-tune the evolved model by pressing the Optimize button and repeat this process until you are completely satisfied with your model.
In addition, you might also wish to try and simplify your model and
for that you just have to press the Simplify button.
Analyzing Intermediate Models
GeneXproTools 4.0 gives you the possibility of gaining some insights into the modeling process by analyzing all the best-of-generation intermediate models.
All the best-of-generation models discovered during a run are saved and you can pick them up for analysis at the
History Panel by checking the model you are interested in. Each of these intermediate models can then be analyzed exactly as you do for the best-of-run model, that is, check their vital statistics, automatically generate code with them, visualize their parse trees, use them as seed to create
more parsimonious models and so forth.
Simplifying a Model
The whole business of circuit design revolves around finding the
most parsimonious circuits and GeneXproTools deals with this task excellently.
No matter in what form your circuits are (sum-of-products,
product-of-sums, NAND-only, NOR-only, AND-XOR-NOT-only, MUX-only,
and so on), you can feed them to GeneXproTools and let it have a go
at simplifying them. The results of its efforts can be clearly
observed in the Run Panel where both the size and number of literals
are plotted during the simplification process.
GeneXproTools 4.0 allows you to simplify an existing model (which could have been either generated by
GeneXproTools or by another modeling tool) either by pressing the
Simplify button on the Run
Panel or by choosing a fitness function
with parsimony pressure and then press Optimize or Simplify on the
Run Panel.
For models created outside of GeneXproTools or for GeneXproTools
models modified by the user, the starting model is fed to the algorithm through the Change Seed window where both the fitness and structural soundness of the model are tested.
Then, in the Run Panel, by clicking the
Simplify button, an evolutionary process starts in which all the subsequent models will be descendants of the
model you want to simplify. Keep in mind, however, that the
simplification algorithm used by GeneXproTools is an evolutionary
one and, despite parsimony pressure being applied, models continue
to be selected preferentially by fitness and sometimes their
complexity might even increase temporarily if the gain in fitness outweighs
the loss in simplicity. But, obviously, if your model has already
maximum fitness, it can only improve by becoming more and more
parsimonious.
For models created in the GeneXproTools 4.0 environment, you just
have to select the model you want to simplify (either the
best-of-run or an intermediate model picked up in the History Panel)
and then click the Simplify button and let the algorithm create
better descendants not only in terms of fitness but also in terms of
size.
Comparing Actual and Predicted Values
GeneXproTools 4.0 offers two different ways of analyzing and comparing the output of your model with the actual or target values both for the training and testing sets.
In the first, the target or actual values are listed in a table side by side with the predicted
or model values.
In the second, the target and predicted values are plotted in a
Target/Model chart for easy visualization. By moving the scroll bar
in the bottom, you can see the results for the entire dataset.
Essential Statistics
GeneXproTools 4.0 allows a quick and easy assessment of a wide set of
statistical functions. Some of them are immediately computed and shown every time you check the
Results Panel
(classification error,
classification accuracy,
confusion matrix (true positives, true negatives, false positives, and false negatives),
sensitivity, specificity,
positive predictive value, and
negative predictive value).
Others, tough, are only shown in the Report Panel (mean squared error,
root mean squared error,
mean absolute error,
relative squared error,
root relative squared error,
relative absolute error,
R-square, and correlation coefficient) after their evaluation in the
Results Panel.
Modeling from Seed
The whole business of circuit design revolves around finding the
most parsimonious circuits and GeneXproTools deals with this task excellently.
No matter in what form your circuits are (sum-of-products,
product-of-sums, NAND-only, NOR-only, AND-XOR-NOT-only, MUX-only,
and so on), you can use them as seed and let GeneXproTools have a go
at simplifying them. The results of its efforts can be clearly
observed in the Run Panel where both the size and number of literals
are plotted during the simplification process.
GeneXproTools 4.0 allows the use of an existing model (which could have been either generated by
GeneXproTools or by another modeling tool) as the starting point of an evolutionary process so that more
rigorous or more parsimonious models could be created.
For models created outside of GeneXproTools or for GeneXproTools
models modified by the user, the starting model or seed is fed to the algorithm through the Change Seed window where both the fitness and structural soundness of the model are tested.
Then, in the Run Panel, by clicking the Optimize button, an evolutionary process starts in which all the subsequent models will be descendants of the seed you introduced. A note of caution though: if your seed has a very small fitness, you risk losing it early in the run as better models could be randomly created by
GeneXproTools and your seed would, most probably, not be selected for breeding new models. If your seed has zero fitness, though, you will receive a warning so that you could
modify your seed until it becomes a viable seed capable of breeding new models.
For models created in the GeneXproTools 4.0 environment, the seed is fed to the algorithm every time you click the Optimize
or Simplify buttons during modeling, that is, the seed (in this case, the best model of the previous run)
is introduced automatically by
GeneXproTools.
Adding a Neutral Gene
The addition of a neutral gene to a seed might seem, at first sight, the wrong thing to do as most of the times we are interested in creating parsimonious models. But one should look at this as modeling in progress as, for really complex
circuits, it is not uncommon to design them by progressively
incorporating simpler elements.
Thus, being able of introducing extra terms in your seed is a powerful modeling tool and
GeneXproTools 4.0 allows you to do that by selecting Add Neutral
Gene in the Edit Menu or through the Change Seed window. For
instance, by choosing OR as linking function, you could use a
different gene for each minterm of your circuit, and then try and
evolve a more parsimonious solution from here.
By pressing the Add Neutral Gene button in the Change Seed window, you will see a neutral gene being added to your model. By doing this, you are giving the learning algorithm more room to play and, hopefully, a
better and more complex program will evolve.
Neutral genes can also be introduced automatically by GeneXproTools 4.0
using the Complexity Increase
Engine.
Complexity Increase Engine
GeneXproTools 4.0 also allows you to introduce neutral genes automatically by activating the Complexity Increase
Engine in the Settings Panel -> General Settings Tab.
Whenever you are using the Complexity Increase engine of GeneXproTools 4.0, you must fill the Generations Without Change box to set the period of time you think acceptable for evolution to occur without improvement in best fitness, after which
a mass extinction or a neutral gene (an extra term) is automatically added to your model; the Number of Tries box corresponds to the
number of consecutive evolutionary epochs (defined by the parameter
Generations Without Change) you will allow before a neutral gene is
introduced in all evolving models; in the Max. Complexity box you write the maximum number of terms (genes) you’ll allow in your model and no other terms will be introduced beyond this threshold.
The Complexity Increase Engine of GeneXproTools 4.0 might be a very powerful modeling tool, but you must be careful not to create excessively complex models
as a greater complexity does not necessarily imply a greater efficiency.
Visualizing Models as Parse Trees
GeneXproTools 4.0 comes equipped with a parse tree generator that automatically converts your models into diagram representations or parse trees.
Indeed, all the models evolved by GeneXproTools in its native Karva language
can be automatically parsed into visually appealing expression trees, allowing a quicker and more complete understanding of their
structural intricacies.
Generating Code Automatically Using GeneXproTools Built-in Grammars
GeneXproTools 4.0 offers a total of 16 built-in grammars so that the models evolved by
GeneXproTools in its native Karva language
can be automatically translated into the most commonly used programming languages
(Ada, C, C++, C#, Fortran, Java, Java Script, Matlab, Pascal, Perl, PHP, Python, Visual Basic, VB.Net,
Verilog, and VHDL). Furthermore, for all languages, the generated
code can be automatically transcribed to six different logical
systems (All Gates, Not-And-Or Only, Nand Only, Nor Only, Mux System, Reed-Muller System)
using six different Boolean grammars. This code can then be used in other applications.
Generating Code Automatically Using User Defined Grammars
GeneXproTools 4.0 allows the design of User Defined Grammars so that the models evolved by
GeneXproTools in its native Karva language
can be automatically translated into the programming language of your choice if you happen to prefer a programming language not already covered by the
16 built-in grammars of
GeneXproTools 4.0 (Ada, C, C++, C#, Fortran, Java, Java Script, Matlab, Pascal, Perl, PHP, Python, Visual Basic, VB.Net,
Verilog, and VHDL).
As an illustration, the All Gates VHDL grammar of GeneXproTools 4.0 is shown
here.
Other grammars may be easily created using this or other GeneXproTools
built-in grammars as reference.
Scoring Engine
GeneXproTools 4.0 comes equipped with a scoring engine for scoring your databases/Excel or text files in the
GeneXproTools environment. The scoring engine of GeneXproTools uses
the All Gates JavaScript code of your models to score your data.
Scoring logic circuits is not current practice, but you can make
use of the scoring engine of
GeneXproTools 4.0 just to check your code or for the fun of it. As
usual, the scores are saved to
Excel (csv) or text files.
|