You are on page 1of 12

JNTU COLLEGE OF ENGINEERING ::(AUTONOMOUS):: ANANTAPURAMU

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

NAME : BUKYA RAVINDRA NAIK


ADMISSION NO :18001D5408
COURSE : M. TECH –I YEAR, I SEMESTER
SPECIALIZATION : COMPUTER SCIENCE & ENGINEERING
BRANCH : COMPUTER SCIENCE & ENGINEERING
SUBJECT : COMPUTATIONAL INTELLIGENCE
SEMINAR TOPIC : COMPUTATIONAL INTELLIGENCE IMPLEMENTATION
COMPUTER INTELLIGENCE IMPLEMENTATION
Implementation Issues:
Computational intelligence has three core components:
1. Artificial neural networks,
2. Evolutionary computation algorithms
3. Fuzzy logic systems.

Combinations of these three components and/or other components comprise a computational


intelligence system.
The main issue in implementing computational intelligence is how to combine core
components to solve problems efficiently and effectively. In this chapter, we illustrate
common issues related to implementing computational intelligence systems with an example
of an implementation of a fuzzy evolutionary fuzzy rule system.
The relationships between the genetic algorithm and the fuzzy rule system in the
evolutionary fuzzy rule system are shown in Figure:
 The individual representation of the genetic algorithm represents the fuzzy rule
system to be evolved, which is decoded into a fuzzy rule system for evaluation.
 The decoded system performs on the training patterns to measure the system’s
performance, which is then fed back to the genetic algorithm to determine the fitness
of the individual. These relationships are. In this section, we focus on using a fuzzy
rule system to adjust the parameters of the genetic algorithm.

Figure: Relationships between the genetic algorithm and the fuzzy system in the
evolutionary fuzzy rule system.
Adaptation of Genetic Algorithms
Static genetic algorithm; that is, its parameters are fixed during the course of running
the GA. The performance of a genetic algorithm depends on the relationship between
exploration and exploitation, that is, the selection of its parameters.

Example: The crossover operation facilitates exploration (global search) and the mutation
operation facilitates exploitation (local search).
 A global search is generally favored at the beginning of the search process, and
 A local search is favored at the end.
A simple and straightforward approach is to use crossover with a relatively large
crossover rate and mutation with a relatively small mutation rate at the beginning of the
search process.
The crossover (mutation) rate is then linearly decreased (increased) over the course of the
search process.
This strategy can frequently result in getting caught in local optima. Ideally, the crossover
and mutation rate should be nonlinearly, dynamically adjusted to avoid local optima while
retaining the ability to fine-tune the near-global optimum resolution.
The adaptation of genetic algorithm can occur on four levels:
1. Environment,
2. Population,
3. Individual, and
4. Component
Environment Level:
The adaptation, the environment itself is changed over the course of the search process,
and the fitness function, which measures how well an individual fit into the environment, is
adapted to reflect the altered environment.
Population Level:

A) Adaptation of Genetic Algorithms


Most adaptation is performed by adjusting parameters at the population level.
Example: if a particular crossover (mutation) rate is used over the entire population,
then this crossover (mutation) rate is a candidate to undergo adaptation.
Individual Level:
In some implementations each individual has its own mutation rate, so the adaptation
of the mutation rate is performed at the individual level.
Component Level:
In Back (1992), the adaptation is performed at the component (element) level. Each
element in each individual is associated with a mutation rate that is encoded into the
individual representation to undergo evolution.

A.1) Fuzzy Adaptation


The main idea is to design a fuzzy rule system with its inputs based on the
performance measurements of the search process and its outputs being the parameters of the
genetic algorithms.
 The fuzzy rule system adjusts the parameters of the genetic algorithm (output) based
on the current performance measurements of the genetic algorithm.
 The relationships between the fuzzy rule system and the genetic algorithm are shown
in Figure: The fuzzy rule system obtains input (the performance measurements) from
the genetic algorithm and feeds back output (new parameter values) to the genetic
algorithm

Figure: Relationship between the fuzzy system and the genetic algorithm in fuzzy
adaption.
 The output from the fuzzy system can be parameters being adapted or changes to the
parameters being adapted.
 The parameters normally include the crossover and mutation rates, but other
parameters of genetic algorithms are also sometimes used.
 The adaptation is usually conducted at the population level because of the significant
increase in computation cost at the individual level or component level.
 The input to the fuzzy rule system is based on the performance measurements, which
can reflect the parameters of the genetic algorithm directly or indirectly.
Uses of Fuzzy Adaptation
 When a fuzzy rule system is used to adapt the parameters of the genetic algorithm, the
genetic algorithm, generally speaking, can have better performance.
Fixed parameters or a simple and fast parameter adjustment approach should be adopted
instead. when the computation cost of the evaluation of individuals is much higher than that
of a fuzzy rule system, however, we suggest that you develop a fuzzy rule system or other
adaptive approach to dynamically adjust the parameters of the genetic algorithm.

A.3) Knowledge Elicitation


Traditional expert system development known as knowledge acquisition and its most
important area: knowledge elicitation.
 The terms usually used to describe the process of extracting knowledge from human
experts for use in traditional AI-based expert systems.
 A detailed treatment of knowledge elicitation, or knowledge acquisition.
 It is accurate to characterize knowledge elicitation as difficult, time-consuming,
complex, and expensive.

B) Fuzzy Evolutionary Fuzzy Rule System Implementation


Fuzzy evolutionary fuzzy rule system, which is similar to the implementation of the
evolutionary fuzzy rule system.
The main difference with the previous system is that a predesigned fuzzy rule system
is added to the system to dynamically tune the crossover and mutation rates of the genetic
algorithm over the course of running the genetic algorithm.
 The purpose is to achieve a better balanced global and local search ability and
a more effective search process.
 The source code for the implementation is written in C++ and is being
distributed as shareware.

B.1) Programming the Fuzzy Evolutionary Fuzzy Rule System


 The ga() routine contains the only difference between the implementation of
the fuzzy evolutionary fuzzy rule system and that of the evolutionary fuzzy
rule system.
 The new ga() routine is shown program, in which the differences are in bold
type for clarity.
void ga(char *dataFile)
{
read_ga_runfile(dataFile);
read_adapt_rule();
vector<float> vecin_m(adaptRuleSet[0].get_variableSize());
vector<float> vecout_m(adaptRuleSet[0].get_outputSize());
read_fuzzy_base_rule();
read_ga_training_patterns();
form_range_vector();
IndividualInt range(rangeint,0);
int tmplen = get_population_length();
update_popu(p_size,tmplen,c_rate,m_rate);
popu_initialize(range);
fitvec.changeSize(p_size);
float prebest=0.1;
float nu=0.0;
float var;
float mrate=m_rate;
float crate=c_rate;
int bestfit;
for (int idx=0;i<generation;i++)
{
calculate_fitness(range);
bestfit=fitvec.maximum_index();
var=variance(fitvec,aver);
if (fitvec[bestfit]>criterion)
break;
if (idx != (generation -1))
{ //not the last generation
popu.selection(fitvec,bestfit,shift);
if (m_flag==1)
{ //change mutate/crossover rate
if (fitvec[bestfit]==prebest)
nu +=1.0;
else
nu=0.0;
vecin_m[0]=fitvec[bestfit];
vecin_m[1]=nu;
vecin_m[2]=var;
vecout_m = adaptRuleSet.output(vecin_m,0,1,1);
mrate=vecout_m[0];
crate=vecout_m[1];
prebest=fitvec[bestfit];
popu.change_mrate(mrate);
popu.change_crate(crate);
}
popu.crossover(flag_c,bestfit);
popu_mutate(range,bestfit);
}
}
write_ga_fuzzy_rules(idx,range,bestfit);
}
 In addition to the file-level variables declared in the evolutionary fuzzy rule system
implementation,
 a new file-level FuzzyRuleSet variable, adaptRuleSet, is defined to store the fuzzy
rule system that is used to adapt the crossover and mutation rates.
 The read_adapt_rule() routine is called to read in the
 FuzzyRuleSet variable adaptRuleSet. One example of the adaptive fuzzy rule system
is shown in below program Figure.
Fig: A fuzzy rule system for genetic algorithm adaptation.
 It has three input variables, two output variables, and eight fuzzy rules.
 The three input variables are the best fitness of the current generation, the number of
generations that the best fitness has not improved, and the variance of all the
individuals’ fitnesses in the current generation.
 The two output variables are the new mutation and crossover rates.
The linguistic descriptions of these eight rules follow.
1. If Fitness is Low, then Mrate (Migration Rate) is Low and Crate (Crossover Rate) is
High.
2. If Fitness is Medium and Number is Low, then Mrate is Low and Crate is High.
3. If Fitness is Medium and Number is Medium, then Mrate is Medium and Crate is
Medium.
4. If Number is High and Variance is Medium, then Mrate is High and Crate is Low.
5. If Fitness is High and Number is Low, then Mrate is Low and Crate is High.
6. If Fitness is High and Number is Medium, then Mrate is Medium and Crate is
Medium.
7. If Number is High and Variance is Low, then Mrate is High and Crate is Low.
8. If Number is High and Variance is High, then Mrate is Low and Crate is Low.
B.2) Running the Fuzzy Evolutionary Fuzzy Rule System
 To run the program, at the DOS prompt within the appropriate subdirectory, enter

flgafs flgafs.run
 The main run file flgafs.run contains only two items: the names of the GA run file
and the fuzzy rule system run file. An example of the contents of the main run file is
ga.run
fl.run
The fl.run file is the same as that in the evolutionary fuzzy rule system, and the ga.run file is
almost the same as that in the evolutionary fuzzy rule system except that two lines have been
added.

B.3) Choosing the Best Tools


 The basic information on each concept and only a few examples of how to combine
them into powerful computational intelligence tools.
 More information exists in other references, as do more examples of computational
intelligence. And we are sure that our readers will develop many more exciting
implementations and applications.
Strengths and Weaknesses:
 Strengths and weaknesses of have various tools. Here we
summarize some of the most general concepts.
 First, consider the individual concepts, or methodologies, and how to choose
one. All else being equal, in what cases would we choose to use a neural
network.
 A fuzzy system may also be indicated if a significant portion of our data is
linguistic or imprecise. Fuzzy sets allow us to quantify uncertainty.
 Another factor that can influence our choice of approach is data
representation.
Modeling and Optimization:
Many applications, such as system identification, can be handled as black-box
systems: A group of inputs is sent into the box and responses are expected as results.
In order to solve such a problem, two main steps need to be taken.
 First, we need to establish a model based on the knowledge we have to map the inputs
to the outputs; this is modeling.
 Second, we need to adapt the model to tune the outputs’ response to the inputs; this is
optimization.
There are many traditional methods to model various simple or complex, linear or
nonlinear, continuous or discrete systems.
Artificial neural networks (ANNs) and fuzzy systems are particularly suitable in
the modeling process, and evolutionary algorithms are often used in the optimization
process.
Evolutionary algorithms (EAs) are optimization techniques. They can be used
not only in evolving neural networks or fuzzy systems but also in optimizing parameter
sets.
 The advantages are that they do not need any domain knowledge to do the
optimization, and they can handle nonlinear, nondifferentiable, noncontinuous, and
large complex systems well.
 The trade-off is that EAs aren’t guaranteed to obtain the best (optimal) solution, only
a sufficient one.

B.4) Practical Issues


In an ideal world, you would be able to choose the computational tool for your
problem with total objectivity by selecting the tool most likely to give you the best solution.
 Every project has time, resource, and budget constraints.
 It is very unlikely that you will have the luxury of developing the best tool possible
(assuming you think you know what that is). In most cases, you will develop what we
call sufficient solutions.
 Recall that earlier in the book we defined a sufficient solution as one that is good
enough, fast enough, and cheap enough
If we develop a sufficient solution using good engineering practices and our customer is
happy, we’ve done our job.

Applying Computational Intelligence to Data Mining


Applying computational intelligence methodologies to data mining. The example illustrates
how the various methodologies of computational intelligence can be combined and even
intertwined.
 Data mining is the process of using computational algorithms to process large
databases to find useful patterns and relationships.
 Traditional computational tools include clustering, classification, and rule mining.
 Data mining is also commonly referred to as knowledge discovery in databases
(KDD). A comprehensive treatment of data mining is focused.
 Software that simply rearranges data in a database isn’t doing data mining.
 Data mining is used to find previously unrecognized patterns or relationships among
the data that are useful.
 Depending on the application, the object of data mining may include reducing cost,
improving performance, and predicting behavior or trends.
 An example of data mining is the detailed analysis of sales data by a large discount
store chain such as Wal-Mart to discover geographical patterns in customers’ buying
habits.
In the remainder of this section, we outline one approach using multiple
computational intelligence methodologies for a data mining system that deals with real-time
analysis of a large stream of textual data.

An Example Data Mining System


The system we have designed incorporates the three main constituent methodologies
of computational intelligence: evolutionary computation, neural networks, and fuzzy logic. At
the core of the system are clustering and classification models, such as neural networks, that
use both supervised and unsupervised algorithms.
These models can be evolved using particle swarm optimization (PSO), which is
capable of handling multimodal, multiple-constraint, nonlinear problems in complex and
changing environments.
Wrapped around the system’s core is a fuzzy logic shell. The fuzzy rules, membership
function shapes, and fuzzy set locations in the problem domain can be evolved using
evolutionary computation techniques such as genetic algorithms and PSO.
This fuzzy shell handles user preferences and rules at the macro level. The system is thus
capable of adapting to individual users over time. Figure: illustrates the components of the
system.
Figure: Diagram of the computational intelligence data mining system.
As indicated on the system output, it is important to provide users with an
“explanation facility” for this system and to indicate the confidence level of the outputs.
The hybrid nature and the complexity of the system make traditional explanation
facilities impossible.
However, recently developed techniques using evolutionary computation described in this
book can be used to develop such a facility.
This facility is also very important in that it would be usable as a prediction system to
identify and predict new (previously unseen) combinations of parameters and events that
might be expected to be indicators of interest.

You might also like