Information Technology Reference
In-Depth Information
int apsModel(double d[])
{
const double ROUNDING_THRESHOLD = 0.5;
double dblTemp = 0.0;
dblTemp = ((d[1]/(d[4]/d[0]))*((d[5]+d[4])+d[5]));
dblTemp += (d[6]*((d[8]*(d[0]+d[2]))+d[5]));
dblTemp += (d[3]*(d[3]*d[1]));
return (dblTemp >= ROUNDING_THRESHOLD ? 1:0);
}
(5.25b)
Note that, of the 30 numerical constants at its immediate disposal, this
highly accurate model makes use of none of them as not even one numerical
constant is part of the fully expressed program. No wonder the simpler ap-
proach without numerical constants produces better results (see Table 5.9),
as it seems that, in this case, numerical constants are an unnecessary burden.
5.6.5 Analog Circuit Design
For all the problems analyzed thus far (sequence induction, “V” function, and
diagnosis of breast cancer), we have seen that numerical constants were not
really crucial for designing good models and, overall, better results were ob-
tained in their absence. This indeed holds true for the vast majority of prob-
lems I've dealt with in my professional life, but there are some problems,
however, for which numerical constants play a very important role and, in
their absence, only mediocre models can be created. The analog circuit we
are going to design in this section is particularly interesting because it belongs
to this category of problems.
For this problem, a more eclectic function set consisting of the basic arith-
metical operators plus the square root function “Q”, the exponential function
“E”, the natural logarithm “L”, and the power function “P” was chosen for
all the three approaches, that is, F = {+, -, *, /, Q, E, L, P}. For the GEA-B
algorithm, the set of terminals consists of the three tolerances L 1 , L 2 , and C 1
established for this circuit (Zielinski and Rutkowski 2004), which were re-
spectively represented by T = {a, b, c}. For the GEP-NC algorithm, besides
the three tolerances, five different integer constants randomly chosen from
the interval [0, 100] and represented by the numerals 1-5 were used, thus
giving T = {a, b, c, 1, 2, 3, 4, 5}, where “1” corresponds to 40, “2”
corresponds to 37,“3” corresponds to 77, “4” corresponds to 4, and “5”
Search WWH ::




Custom Search