Python Notes for mca i year students osmania university.docx
Research methodology 3-sps
1. Unit-III
Computers and Its Role in Research
Introduction to Evolutionary Algorithms and Optimization
Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 1
“Zeal to go beyond Joy of Learning to Joy of Life as well”
2. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 2
Research Methodology
The Computer: Its Role in Research
Problem solving is an age old activity. The development of
electronic devices, specially the computers, has given added
impetus to this activity. Problems which could not be solved earlier
due to sheer amount of computations involved can now be tackled
with the aid of computers accurately and rapidly. Computer is
certainly one of the most versatile and ingenious developments of
the modern technological age. Today people use computers in
almost every walk of life.
To the researcher, the use of computer to analyse complex data
has made complicated research designs practical. Electronic
computers have by now become an indispensable part of research
Students not only in technological research but also in the
physical and behavioural sciences as well as in the humanities.
3. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 3
Research Methodology
The Computer: Its Role in Research
Performing calculations almost at the speed of light, the computer
has become one of the most useful research tools in modern
times. Computers are ideally suited for data analysis concerning
large research projects. Researchers are essentially concerned with
huge storage of data, their faster retrieval when required and
processing of data with the aid of various techniques. In all these
operations, computers are of great help. Their use, apart
expediting the research work, has reduced human exhausting
work and added to the quality of research activity.
Thus, computers do facilitate the research work. Innumerable
data can be processed and analyzed with greater ease and
speed. Moreover, the results obtained are generally correct and
reliable. Not only this, even the design, pictorial graphing and
report are being developed with the help of computers.
4. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 4
Research Methodology
The Computer: Its Role in Research
Uses of Computers in Research:
(i) data organisation and coding;
(ii) storing the data in the computer;
(iii) selection of appropriate statistical measures/techniques;
(iv) selection of appropriate software package;
(v) execution of the computer program.
5. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 5
Research Methodology
The Computer: Its Role in Research
Computers and Phases of Research
Conceptual Phase and Computer: In this phase, formulation of
research problem, review of literature, theoretical frame work
and formulation of hypothesis. Computer helps in searching the
existing literature. It helps in finding the relevant existing
research papers so that researcher can find out the gap from the
existing literature. Bibliographic references can also be stored
through World Wide Web. In the latest computers, references
can be written automatically in different styles like APA, MLA etc.
This saves time of researcher. He needs not to visit libraries and
wastes his time. It helps researchers to know how theoretical
framework can be built.
6. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 6
Research Methodology
The Computer: Its Role in Research
Computers and Phases of Research
Design and Planning Phase and Computer: Computer can be used
for, deciding population sample, questionnaire designing and data
collection. These are different internet sites which help to design
questionnaire. Several software's can be used to calculate the sample
size. It makes pilot study of the research possible. In pilot study,
sample size calculation, standard deviation are required. Computer
helps in doing all these activities.
7. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 7
Research Methodology
The Computer: Its Role in Research
Computers and Phases of Research
Empirical Phase and Computer: Computer helps in collecting data
and in data analysis. After collecting data, it is stored in computers in
word files or excels sheets. The important applications used in
scientific research are data storage, data analysis, scientific
simulations, instrumentation control and knowledge sharing.
Otherwise it will be a time consuming process. Computers help in
referring, editing and managing of data. Computer allows for greater
flexibility in recording the data and made the analysis of data easy. In
research, preparation and inputting data is the most labour intensive.
It consumes much time Data is being converted in a form which is
suitable for the computer. It can be coded on the excel sheet. These
excel spread sheets can be directly opened with the statistics
software for analysis.
8. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 8
Research Methodology
The Computer: Its Role in Research
Computers and Phases of Research
Data Analysis and Computer: Data analysis and interpretation can
be done with the help of computers. For data analysis, software's
are available. These software's help in using the techniques for
analysis like average, percentage and correlation etc. These
software's are SPSS, STATA, Minitab, etc. These can also be used
for checking the reliability of data, establishing and testing
hypothesis etc. Computers are used in interpretation also. They
can check the accuracy and authenticity of data. It helps is
drafting tables by which a researcher can interpret the results
easily. These tables give a clear proof of the interpretation made
by researcher.
9. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 9
Research Methodology
The Computer: Its Role in Research
Computers and Phases of Research
Research Dissemination and Computer: After interpretation,
computer helps is converting the results into a research article or
report which can be published. Article can be stored or published
on website.
References and computer: After completing the word document, a
researcher need to give source of the literature studied and
discussed in references. Computers help in preparing references.
References can be written in different styles like APA/MLA etc.
10. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 10
Research Methodology
Introduction to Evolutionary Algorithms and Optimization
techniques
Evolutionary algorithms are a heuristic-based approach to solving
problems that cannot be easily solved in polynomial time and
anything else that would take far too long to exhaustively process.
Heuristics are a problem-solving
method that uses shortcuts to
produce good-enough solutions
given a limited time frame or
deadline. Heuristics are
a flexibility technique for quick
decisions, particularly when
working with complex data.
11. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 11
Research Methodology
Introduction to Evolutionary Algorithms and Optimization
techniques
Most real world optimization problems involve complexities like
discrete, continuous or mixed variables, multiple conflicting
objectives, non-linearity, discontinuity and non-convex region. The
search space (design space) may be so large that global optimum
cannot be found in a reasonable time. The existing linear or
nonlinear methods may not be efficient or computationally
inexpensive for solving such problems.
EAs have the advantage of being applicable to any combination of
complexities (multi-objective, non-linearity etc) and also can be
combined with any existing local search or other methods.
12. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 12
Research Methodology
Introduction to Evolutionary Algorithms and Optimization
techniques
Traveling Salesman Problem
Imagine you're a salesman and
you've been given a map like the
one opposite. On it you see that
the map contains a total of 20
locations and you're told it's your
job to visit each of these locations
to make a sell.
Before you set off on your journey
you'll probably want to plan a
route so you can minimize your
travel time.
13. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 13
Research Methodology
Introduction to Evolutionary Algorithms and Optimization
techniques
Traveling Salesman Problem
For instance, a valid solution would need to represent a route
where every location is included at least once and only once. If a
route contain a single location more than once, or missed a
location out completely it wouldn't be valid.
For 3 locations, Probable routes are 06
So for 20 Locations, it is 2432902008176640000
Hence manually impossible!
14. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 14
Research Methodology
Genetic Algorithms
A genetic algorithm (GA) is a search technique used in computer
science to find approximate solutions to optimization and search
problems. Genetic algorithms are a particular class of evolutionary
algorithms that use techniques inspired by evolutionary biology
such as inheritance, mutation, selection, and crossover (also called
recombination).
EAs start from a population of possible solutions (called
individuals) and move towards the optimal one by applying the
principle of Darwinian evolution theory i.e., survival of the
fittest. Objects forming possible solution sets to the original
problem is called phenotype and the encoding (representation) of
the individuals in the EA is called genotype.
15. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 15
Research Methodology
Genetic Algorithms
Genetic Algorithms are the heuristic search and optimization
techniques that mimic the process of natural evolution.
Principle Of Natural Selection
“Select The Best,
Discard The Rest”
Note: The concept of a
genetic algorithm was first
introduced by John Holland
of the University of
Michigan, (1970).
16. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 16
Research Methodology
Genetic AlgorithmsAn Example….
Giraffes have long necks –
➢Giraffes with slightly longer necks could feed
on leaves of higher branches when all lower
ones had been eaten off.
➢They had a better chance of survival.
➢Favourable characteristic propagated
through generations of giraffes.
✓Now, evolved species has long necks
17. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 17
Research Methodology
Genetic AlgorithmsAn Example….
This longer necks may have due to the effect of mutation
initially. However as it was favourable, this was propagated over
the generations.
18. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 18
Research Methodology
Genetic Algorithms Evolution of Species
19. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 19
Research Methodology
Genetic Algorithms
Thus genetic
algorithms
implement
the
optimization
strategies by
simulating
evolution of
species
through
natural
selection
20. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 20
Research Methodology
In metallurgy and materials science, annealing is a heat
treatment that alters the physical and sometimes chemical
properties of a material to increase its ductility and reduce
its hardness, making it more workable. It involves heating a
material above its recrystallization temperature, maintaining a
suitable temperature for an appropriate amount of time and then
cooling.
Simulated Annealing:
Figure : When temperature is high, the
material is in a liquid state (left) and the
structure of atoms in non symmetric. During
Slow annealing process , the material
reaches to solid state with symmetry in
atoms.
21. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 21
Research Methodology
Simulated Annealing:
Simulated annealing (SA) is analogous to annealing in three ways:
1.The energy in annealing corresponds to the cost function in SA. The
cost function evaluates every solution, and the cost of the best-
known solution generally decreases during the SA process. The goal
of an optimization problem is to find a solution with a minimum cost.
2.The movements of molecules correspond to small disturbance in
the current solution. SA repeatedly upset the current solution so that
different regions in the solution space are explored.
22. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 22
Research Methodology
Simulated Annealing:
3.The temperature corresponds to a control
parameter temperature T in SA. T controls the probability of
accepting a new solution that is worse than the current solution.
If T is high, the acceptance probability is also high, and vice
versa. T starts at the peak temperature, making the current
solution changes almost randomly at first. T then gradually
decreases, so that more and more suboptimal disturbances are
rejected.
The algorithm normally terminates when T reaches a user-
specified value.
The simulated annealing algorithm explained with an
analogy to a toy.mp4
23. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 23
Research Methodology
Artificial Neural Network (ANN):
“Artificial Neural Networks or
ANN is an information
processing paradigm that is
inspired by the way the
biological nervous system
such as brain process
information. It is composed
of large number of highly
interconnected processing
elements(neurons) working
in harmony to solve a specific
problem.”
24. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 24
Research Methodology
Artificial Neural Network (ANN):
Biological Neurons (also called
nerve cells) or simply neurons are
the fundamental units of the brain
and nervous system, the cells
responsible for receiving sensory
input from the external world via
dendrites, process it and gives the
output through Axons.
Dendrites: Each neuron has fine, hair-like tubular structures
(extensions) around it. They branch out into a tree around the cell
body. They accept incoming signals.
Axon: It is a long, thin, tubular structure that works like a
transmission line.
25. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 25
Research Methodology
Artificial Neural Network (ANN):
The following diagram represents the general model of ANN which is
inspired by a biological neuron. It is also called Perceptron.
A single layer neural network is called a Perceptron. It gives a single
output.
26. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 26
Research Methodology
Artificial Neural Network (ANN):
In the above figure, for one single observation, x0, x1, x2,
x3...x(n) represents various inputs(independent variables) to the
network. Each of these inputs is multiplied by a connection weight
or synapse. The weights are represented as w0, w1, w2,
w3….w(n) . Weight shows the strength of a particular node.
b is a bias value. A bias value allows you to shift the activation
function up or down.
Mathematically, x1.w1 + x2.w2 + x3.w3 ...... xn.wn = ∑ xi.wi
Now activation function is applied 𝜙(∑ xi.wi)
27. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 27
Research Methodology
Artificial Neural Network (ANN):
Activation function
The Activation function is important for an ANN to learn and make
sense of something really complicated. Their main purpose is to
convert an input signal of a node in an ANN to an output signal.
This output signal is used as input to the next layer in the stack.
Activation function decides whether a neuron should be activated
or not by calculating the weighted sum and further adding bias to
it. The motive is to introduce non-linearity into the output of a
neuron.
28. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 28
Research Methodology
Artificial Neural Network (ANN): Example
The input values go through the weighted synapses straight over
to the output layer. All four will be analyzed, an activation function
will be applied, and the results will be produced.
29. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 29
Research Methodology
Artificial Neural Network (ANN): Example
Now in the above figure, all 4
variables are connected to neurons
via a synapse. However, not all of
the synapses are weighted. they
will either have a 0 value or non-0
value.
here, the non-0 value → indicates
the importance
0 value → They will be discarded.
30. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 30
Research Methodology
Artificial Neural Network (ANN): Example
Let's take the example of Area and Distance to City are non-zero for the first
neuron, which means they are weighted and matter to the first neuron. The
other two variables, Bedrooms and Age aren’t weighted and so are not
considered by the first neuron.
You may wonder why that first neuron is only considering two of the four
variables. In this case, it is common on the property market that larger homes
become cheaper the further they are from the city. That’s a basic fact. So what
this neuron may be doing is looking specifically for properties that are large but
are not so far from the city
31. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 31
Research Methodology
Artificial Neural Network (ANN): Example
Now, this is where the power of neural networks comes from. There are many
of these neurons, each doing similar calculations with different combinations
of these variables.
Once this criterion has been met, the neuron applies the activation function
and do its calculations. The next neuron down may have weighted synapses
of Distance to the city and, Bedrooms.
This way the neurons work and interact in a very flexible way allowing it to
look for specific things and therefore make a comprehensive search for
whatever it is trained for.
32. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 32
Research Methodology
Fuzzy Logic or Fuzzy System:
The word fuzzy refers to things which are not clear or are vague.
Any event, process, or function that is changing continuously
cannot always be defined as either true or false, which means
that we need to define such activities in a Fuzzy manner.
33. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 33
Research Methodology
Fuzzy Logic or Fuzzy System:
Definition of fuzzy
Fuzzy – “not clear, distinct, or precise; blurred”
Definition of fuzzy logic
A form of knowledge representation suitable for notions
that cannot be defined precisely, but which depend upon
their contexts.
An Introduction to Fuzzy Logic.mp4
35. FUZZY LOGIC :
Slowest Fastest
float speed;
get the speed
if ((speed >= 0.0)&&(speed < 0.25)) {
// speed is slowest
}
else if ((speed >= 0.25)&&(speed < 0.5))
{
// speed is slow
}
else if ((speed >= 0.5)&&(speed < 0.75))
{
// speed is fast
}
else // speed >= 0.75 && speed < 1.0
{
// speed is fastest
}
Slow Fast
Research Methodology
Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 35
36. TEMPERATURE CONTROLLER
The problem
Change the speed of a heater fan, based off the room
temperature and humidity.
A temperature control system has four settings
Cold, Cool, Warm, and Hot
Humidity can be defined by:
Low, Medium, and High
Using this we can define
the fuzzy set.
Research Methodology
FUZZY LOGIC :
Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 36
37. Research Methodology
FUZZY LOGIC :
Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 37
Air-Conditioning
Old air conditioners were set to a
minimum and maximum room
temperature. When that lower
number was reached, the unit turned
off. When the temperature hit the
higher point, the air conditioner
turned back on.
In today’s HVAC systems, fuzzy logic
doesn’t rely on the two “extremes”. It
manages the temperature to remain
steady. By sensing slight fluctuations
and making adjustments, the air
conditioning system is more energy-
efficient.
TV
Similarly, televisions
control the screen’s
brightness, automatically
adjusting the picture when
light is streaming in or the
room is darkened.
Washing machines now use
fuzzy logic. They can sense
how heavy a load is and
determine the correct
amount of water and
detergent, speed of
agitation, and length of the
wash cycles.
38. 9/8/2020 38Prof. Sanjay Shekhawat, SSBT COET Jalgaon
ASSIGNMENT -III
1. How are computers used as a tool in research? Explain giving
Examples.
2. Write a note on “ Role of Computers, Internet, Statistical Packages
and Researchers”
3. Name and describe the main features of Genetic Algorithms (GA).
4. Describe the concept of development of the simulated annealing
algorithm.
5. Explain Activation function in ANN.
6. Write the advantages and disadvantages of Artificial Neural
Networks.
40. Prof. Sanjay Shekhawat, SSBT COET Jalgaon9/8/2020 40
Research Methodology
References
1. Role of Computer in Research, Aryan Singh, DPS, Faridabad, India
2. Optimization Methods: Introduction and Basic Concepts, D Nagesh Kumar , Isc ,
Banglore
3. http://www.iitg.ac.in/rkbc/ce515/L14%20-%20Introduction%20to%20GAs.pdf
4. An introduction to genetic algorithms, KALYANMOY DEB, Kanpur Genetic Algorithms
Laboratory (KanGAL), Department of Mechanical Engineering, Indian Institute of
Technology Kanpur,
5. https://towardsdatascience.com/introduction-to-artificial-neural-networks-ann-
1aea15775ef9
6. https://www.l-tron.com/fuzzy-logic-in-real-life/